-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Address the race condition #101
Comments
Do you have evidence of flaky tests? Because ATM But yes if |
It's just my guess that it could happen. I was looking at using this library but so far I went for extending a shell script which I already had. I'm still contemplating rewriting, though. |
This comment was marked as outdated.
This comment was marked as outdated.
Can second the wallet flakiness, we're seeing the same issue pop up in CI (cf lightningdevkit/rust-lightning#2098 (comment)):
Not sure if this the same issue as OP though, and not sure what exactly is the source of this. |
I think your races are unrelated to port binding. |
For the record, this was most likely due to wrapping |
If my understanding is correct this crate launches a separate instance per test, which is nice but because of the race condition and tests being run in parallel this can cause flaky tests which is quite bad. It'd be great to fix the race completely.
I took a look at the obvious "what happens if I set
-port 0 -rpcport 0
" The answer is `bitcoind seems to attempt to bind the default port anyway (WTF?) and doesn't log the actual port so if we do this we have no way of figuring it out.I see only two solutions that include existing bitcoind instances:
LD_PRELOAD
a library that overridesbind()
to pass in port 0 and then reports the mapping over a pipe. We could read that report and learn the actual port number.Of course the long term solution is to add direct support to
bitcoind
itself.The text was updated successfully, but these errors were encountered: