-
Notifications
You must be signed in to change notification settings - Fork 21
Race condition? #12
Comments
Yes, I think you're right. I'll implement a fix as soon as I can. (Basically, the key is created and then the process checks if it's there: if it is, the -N or -n flags are ignored.) As a workaround, you can create the keys yourself and not use the -N or -n flags for now. This is only blowing up now because fork+exec causes the check to occur twice. |
That's what it seemed like, but orchestrating a fix among the co-processes is probably better left to you than me. :) Thanks, much appreciated! |
kristapsdz/acme-client-portable#12 that pushes the check for file pre-existence with -n and -N only into the main process, stripping out the arguments before passing them to the child. This fixes a race condition.
I just merged the above fix (in the main codebase) into the portable one. It pushes the check into the main process, splicing out the arguments on failure. Does this fix your issue? |
Yes, this is working for me. Thanks for the quick fix! |
Still needs work, though, for situations like -nN. |
Works now for all possible invocations. Can you test it again? If it works fine, close out and it'll be in the next release. |
kristapsdz/acme-client-portable#12 that pushes the check for file pre-existence with -n and -N only into the main process, stripping out the arguments before passing them to the child. This fixes a race condition.
Thanks for your work on this. It looks very promising.
I'm running -portable on Linux. I've gotten it built and am able to run a command to register and request some certs from the staging service. However, during this run I get the following:
It appears that the client is trying to authorize to request certificates before it's registered.
I've only begun digging into what's happening, but in the course of diagnosing, I encountered a Heisenbug: some of my debug printfs caused the whole routine to work. Reducing this, if I put a usleep(500) at the top of xrun(), I get a successful run every time. If I remove the usleep(), it fails every time. (I am clearing and replacing the whole of /acme with each run.)
This begins to smell of a race condition, so I thought I'd go ahead and report it even though I don't have a solution yet.
The text was updated successfully, but these errors were encountered: