mirror of
https://github.com/bitcoin/bitcoin
synced 2026-12-04 10:26:38 +00:00
net: only monitor select exceptions while connecting #36716
Labels
No labels
Android
Backport
Block storage
Brainstorming
Bug
Build system
CI failed
Consensus
Data corruption
Descriptors
Docs
DrahtBot Guix build requested
Feature
Fuzzing
GUI
Good First Review
IPC
Insufficient Review
Kernel
Linux/Unix
Mempool
Mining
Needs Backport (31.x)
Needs Backport (32.x)
Needs Benchmark
Needs Conceptual Review
Needs backport (30.x)
Needs rebase
Needs release note
Net
P2P
PSBT
Privacy
Private Broadcast
Questions and Help
RPC/REST/ZMQ
Refactoring
Resource usage
Review club
Scripts and tools
Settings
TX fees and policy
Tests
Tracking Issue
UTXO Db and Indexes
Up for grabs
Upstream
Utils/log/libs
Validation
Waiting for author
Wallet
Windows
good first issue
interfaces
macOS
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
bitcoin/bitcoin!36716
Loading…
Reference in a new issue
No description provided.
Delete branch "2026/10/windows-select-exceptions"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Alternative approach to #36688, citing the relevant parts of its description:
Fix this by only adding a socket to the
select()exception set while waiting for a non-blockingconnect()to complete. Windows needs that to detect a failed connection. Established connections no longer monitor the exception set on any platform. This approach was suggested by theuni in https://github.com/bitcoin/bitcoin/pull/36716#issuecomment-6931290348.To opt in,
ErrorEventcan now be requested fromSock::Wait(), likeRecvEventandSendEvent. Withselect()that adds the socket to the exception set.ConnectToSocket()is the only caller that requests it. There is no behavior change withpoll(), which reports errors whether or not they are requested. UsingErrorEventfor this was suggested by vasild in https://github.com/bitcoin/bitcoin/pull/36716#discussion_r4692637894.We could instead have set
SO_OOBINLINEon our sockets, sorecv()returns any urgent data sent to us (and likely leads us to disconnect the peer). RFC 6093 doesn't forbid this, but the current approach seems more clear and direct to me.A new unit test in
sock_testscovers the fix itself: with an urgent byte pending, waiting forRecvEventmust not reportErrorEvent. Without the fix it fails on aselect()build.Backports until 29.x are straight-forward, but for 31.x and before require compensating for the scripted-diff in
github.com/bitcoin/bitcoin@f395acdeee.The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
External sites
Reviews
See the guideline and AI policy for information on the review process.
If your review is incorrectly listed, please copy-paste
<!--meta-tag:bot-skip-->into the comment that the bot should ignore.Conflicts
Reviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
LLM Linter (✨ experimental)
Possible places where named args for integral literals may be used (e.g.
func(x, /*named_arg=*/0)in C++, andfunc(x, named_arg=0)in Python):src/test/sock_tests.cpp:sender.Send("x", 1, 0)2026-11-25 16:42:31
(I'll update the PR description later, for now see discussion in #35918 36688)
Earlier concerns neither republished nor resolved: 1 suggestion. See the Run archive linked from the Review report for their assessments.
🔵 Suggestion · Failed-connect tests do not guard the explicit
ErrorEventrequestThe current code preserves Windows connect-failure detection, but the tests do not directly guard against dropping
ErrorEventand making refused non-blocking connects wait until timeout.Location:
src/netbase.cpp:606(head).Review coverage was incomplete.
Reviewed:
97e3c9562291· Review report · Previous reportspermalink
Mine as well apply the same logic to HTTP, probably right here:
github.com/bitcoin/bitcoin@5669fda5ed/src/httpserver.cpp (L916-L918)I wrote functional test for the first PR, could be adapted to ensuring HTTP disconnects on urgent data:
https://gist.github.com/pinheadmz/f5bb77865f870865e44c54d5751b569a
My preference is to fix HTTP separately as a followup, but I'm open to doing it here.
Should the below
if (recvSet || errorSet)be revised as well? If we only seterrorSeton Windows and we already handle it here, then the below can be justif (recvSet).Or, given that we only set
errorSeton Windows, this#ifdef WIN32here is not needed.Some lines below is this code:
which handles the outcome of
select(2). Is it true that with this PR that would be no-op on non-Windows? Because we onlyFD_SET(s, &err)on Windows. If yes, then consider also putting it inside#ifdef WIN32to make that more clear.crACK
1fde57f1debecause it fixes the issue in P2P, but i prefer @theuni's suggestion to just always fail on error/exception during a wait (And i guess start listening for POLLPRI on Linux to consistently disconnect on URG data rather than ignoring it on one platform and disconnecting on another).I don't understand the point of the second commit.
This does not follow, and regardless that seems like a confusing comment to add here.
My reading of RFC 6093 is that it 1) discourages applications from sending urgent data 2) advises applications to set SO_OOBINLINE to fix the broken out of band mechanism regardless of their use for urgent data.
But regardless, i think that comment just adds more confusion than it clears up, and it would be better to drop it.
The RFC says:
This isn't about a misbehaving sender, but rather about application design (both sides).
I'm not sure what exactly "this" refers to. It's true that the RFC does not forbid applications from setting
SO_OOBINLINEif they don't "employ urgent indications".I do think it's good to document that we don't "employ urgent indications". The absence of the setting implies it, but an actual code comment is more clear.
In any case, I'll drop the comment commit.
Added a commit for this.
I added a commit to check
errorSetseparately and earlier, forpoll().I spent some time trying to understand if that's a behavior change, but AFAIK it just emits a different log message. I added a test to demonstrate that.
I dropped the comment-only commit.
Added two commits based on @vasild's feedback.
Also added and expanded @pinheadmz's tests.
Finally, I added the http fix at the end. It should be simple to review since it's the same approach.
I also tested on Windows native.
I believe it's possible to construct an oob urgent ptr for data which will never be sent and which will then never be received but will still trigger the exception set. Setting SO_OOBINLINE thus can't ultimately clear the select() exception because no data is actually inline to read. On the BSDs I examined (and therefore likely OS/X) this will still generate an exception so the current select() call will return immediately again. As noted elsewhere, this doesn't technically prevent eventual node progress.
fwiw, I strongly suggest that oob data be considered an error condition based on this. There is nowhere for UNIX-y OSes which an oob byte will ever be generated by a valid p2p peer, and thus it'll only ever be generated in this context — therefore disconnection is a logical and completely fair result. I personally think at this point it's worth a ban.
(Uh, just to be clear, at the very least I think we should delete the exceptfds from the select() call entirely, so strong ACK for this approach.)
I agree that if there was a
DISCONNECT_ON_OOBflag, we should set it. But we can't directly detect if such data was present. All we can know is thaterrorSetwas triggered, which could be for unrelated OS reasons. That could cause us to disconnect a well behaved peer.That's why this PR simply ignores the exception set (outside Windows), instead of trying to handle it. It might be possible with poll(), but that would be better for a followup.
@midnightmagic agreed.
Imo we should just always disconnect when an exception is set, or when oob/prio are found. I don't see any need for platform-specific behavior here. I'd rather go with: https://github.com/theuni/bitcoin/commits/net-oob-error/
That branch unifies the select/poll behaviors, and causes a disconnect (on all platforms) if any of those conditions are true.
It differs from what's here in that it turns
POLLHUPinto a read event as it should be, rather than an error. That simplifies things significantly, as it allows draining to happen naturally, and it means that the exception set is truly only comprised of exceptions.If receiving is off (meaning that we have data to send) and we receive a SIGHUP, we'll disconnect on the next send.
It fixes up the tests to show that OOB data always causes a disconnect.
🐙 This pull request conflicts with the target branch and needs rebase.
Rebased after #36744.
@theuni wrote:
So you're not worried about the operating system triggering this set for reasons that have nothing to do with OOB data?
Since that's a completely different approach from this PR, it seems better to open it as a separate (and alternative) PR.
Ok, I retract the above. After experimenting for the last few days, nothing really works here to align the two behaviors without logical hacks.
I really dislike the platform-specific hacks here, but I agree that they're a necessary evil as long as we're supporting
selectandpoll. I'll drop the suggestion to use my branch and review what's here for correctness.Sorry to throw yet another wrench in this, but when trying to tease apart the uses and platform differences for the select error set, it occurred to me that all of the hacks have to do with the fact that we have a single obscure use-case for that set, and in all other cases it's harmful. Rather than trying to isolate the platforms that require that use-case, why not isolate the use-case instead?
Please see here:
github.com/theuni/bitcoin@f8fbc168bbfor a change that splits out the connection failure case. That allows us to completely ignore the select error set in all other cases where it'd be considered harmful. Imo that's much cleaner because it requires a single opt-in where needed, rather than opt-outs sprinkled all around.With that change, I don't think the early
if (errorSet && !recvSet)disconnects are needed at all, but could (and probably should) be added for belt-and-suspenders.@Sjors @darosior mind taking a look?
@theuni to put it into my own words, IIUC:
There's two phases to a connection, phase 1 establishes it
ConnectToSocketand phase 2 maintains it after (inGenerateWaitSockets, etc). Your proposal makes it so that in phase 2 nothing watcheserrorSet, while in phase 1 it's now watched on all platforms. A follow-up could narrow phase 1 to just Windows as belt-and-suspenders.This makes sense, and I adopted it.
On ancient versions of Windows it was unsafe to ignore
errorSet, and it had to be drained to prevent memory exhaustion. See https://mailarchive.ietf.org/arch/msg/tcpm/55ecR94wP1NkrL5cuPj0PWtTIXc/The following checks for this: https://gist.github.com/Sjors/9582259267a038e06c7f0730356416de
I tested on a physical Windows 11 Home 26H2 machine. Connections reset after 17 urgent bytes. I also tested Windows Server 2022 on a Github CI runner: https://github.com/Sjors/bitcoin/actions/runs/44390882699/job/135107875034
The latter should roughly match Windows 10 in this regard, which is the oldest version we support. So this is no longer a concern in theory, but it doesn't hurt to actually try if you can find such a machine.
BSD is probably also worth testing, cc @vasild.
Approach ACK, thanks for the update.
See my comment about keeping the
(recvSet || errorSet)check as-is.Other than that, looks good to me.
According to the
pollLinux manpage, we may receive a lonePOLLHUP(withoutPOLLINorPOLLERR) when the socket has been drained and the next recv would close it. I think if we skip the|| errorSethere, we could end up waking for the error (POLLHUP) event, and never doing anything with it. Then we're back to the tight loop.Since
selectis a no-op here now, I don't see the harm in leaving this asif (recvSet || errorSet)?Here's the output of the Linux manpage example. It's a file descriptor rather than a socket, it's possible that the behavior is different.
I experimented with removing
select()entirely on top of this changeset, and ended up needing a little change here. Rather thanrecvSet, what we really want to test (as your comment states) isrecvReq, whereI don't think it matters here, but in order to support poll in a cross-platform way, the exact condition we want to test is "did we see an error when we didn't request a receive event", which is slightly different than "did we see an error when we didn't SEE a receive event" as we have here.
This matters for platforms (Windows) which raise only
POLLERR | POLLHUPfor disconnections, even whenPOLLINwas requested.Again.. it shouldn't matter here. Just pointing it out for the future.
The concept of
recvRequestedmakes a lot of sense, so I added this and used it for the early disconnect.67bdc2d3b5->8b8a2f4926Also applied to http in
05084e7879.The poll code in
WaitManysetserrorSetif it gets POLLHUP. Theif (errorSet && !recvSet)check above disconnects, so we don't get here.I still dropped this change:
67bdc2d3b5->8b8a2f4926Given that
SocketHandlerConnected()only handles established connections:select(),errorSetis never set, sorecvSet || errorSetis justrecvSetpoll(), a lonePOLLHUPorPOLLERRgiveserrorSet && !recvSet, which the early disconnect above already handlesWhy the jump from (1 << 2) to (1 << 4)?
This PR has changed multiple times, and considerably grown, since it was opened. And it's also losing momentum, now failing CI, whereas it's currently the main PR for an important fix. So i think it's worth taking a step back and asking what it's trying to achieve.
I think the initial goal was to get a minimal fix in, because a proper cleanup of this logic like #36761 would be riskier to backport. But now this PR adds as much code as switching to poll entirely (and removes 10 times less).
It's not exactly trivial code either: we introduce new flags to Sock, leak the connection stage down to the socket wait logic to only register the exception set at this point, have some callers (but not all!) now disconnect on errors.. That's a bunch of behaviour changes not strictly necessary to fix the bug, that i would be hesitant to backport (i.e. ship with much less testing --especially if we deem the bug important enough to cut minor releases as soon as the fix is ready).
On top of that, this PR adds a whole bunch of functional tests that seem pretty brittle to me, since they rely on kernel settings that may differ between machines, or break when we update CI (that's the reason why i did not push similar tests i had performed locally to #36688). It's also not clear to me how useful they are, as they wouldn't even catch the bug this PR set out to fix in the first place (following my review comment below i tested this by cherry-picking your tests on master and running them on a Windows VM).
Why not go back to the simple approach of simply always disconnecting when a wait returns an
ErrorEvent? It's short, easy to reason about and safer to backport.Sure, it preserves the behaviour difference between platforms using select() and those using poll(). That can be cleaned up later, in a more involved change we don't intend to backport, since this is a pre-existing issue.
Yes, it demonstrates progress. But the bug you are trying to fix in this PR is not a lack of progress on urgent data.
Just keeping the low half reserved for Events and the high for Flags. I can't imagine it matters in any real way...
1 << 3is fine if you prefer it.After all, this is just a hack to keep the diff small as opposed to adding the more straightforward
WaitForNewConnection()function.Minor context: On many OSes (mostly BSD-derived) I believe there is only a single trigger for the exceptfd set in a select() call for a normal TCP socket and that's OOB data. The reason to consider OOB data now almost certainly hostile incoming data in all cases is because the codebase's current (?) behaviour makes it so the only reasonable interpretation is a hostile action — i.e. there is no well-behaving peer which will ever generate OOB data and send it to us.
If the codebase ignores it in a way where someone sending it means nothing — yes absolutely that will solve the problem in the least and most minimally-invasive fashion, and people like myself will just run our own detection patch independently. I agree with you in that if we're immune to it in the first place, detecting it above that is just special-case pointlessness. My only concern really is making sure the .. uh error condition isn't possible anymore. So, yeah you're right.
Elsewise if we retain the ability to detect OOB data, a noisy log entry and a disconnect would be welcome to folks like myself but certainly not necessary. I really don't have a particular dog in this race either way, and I'll just be grateful when the error condition gets fixed.
@darosior would it make sense to merge this and backport your simpler version?
If you do want to go for a different approach, it's better if you or someone else (possibly me) opens a PR for that, rather than changing this PR back and forth.
The tests were added because reviewers suggested them. You're the first to push back on them. They help illustrate what this PR changes and what stays the same. For the master branch I think they're fine, and if they turn out difficult to maintain they can just be dropped.
I don't think it is based on my current understanding. I would rather see the backport properly tested, and then it can be shipped along with whatever more urgent backport fix comes next.
I don't think it makes sense to backport something different than what gets merged on master. The vast majority of our testing comes from development, which happens on master. Release candidates barely receive any testing. Backporting something other than what gets merged in master boils down to releasing code that will only have been tested / ran by whomever looks at the backport PRs (which usually get less attention than regular PRs). At that point i'd rather we don't backport anything.
I didn't want to step on your toes, and figured it would be better that we concentrate attention on a single PR to fix this bug. But i also agree with changing this PR back and forth, and if you'd rather i open a different approach, and reviewers can judge which they prefer, i am happy to do that.
Why insist on committing to master tests that do not even catch the bug you are fixing, but still may introduce flakiness because they rely on low level kernel parameters which may change across time and machines? That just does not make any sense to me.
I agree it is not necessary to rush a minor release for this. Having it backported in the branch, ready to be released, would be good though: it means that we can make binaries available within a couple days if people are encountering the issue in the wild.
I plan to drop the http commit to make it easier to backport, given that 30.x and 31.x still use Libevent. I'll open a follow-up with that (if and) after this is merged.
I tested backports down to 29.x, which indeed reveals problems. I'm going to try to make the test more robust, and otherwise drop it and instead add it to a gist that reviewers can use (like the windows stress test).
You said it was brittle, not that it didn't work. Obviously I don't want to include tests that don't work.
Opened my suggested alternative as https://github.com/bitcoin/bitcoin/pull/36953.
I disagree with this framing. Yes, it was a winding road to get here, but the changes are straightforward:
selectis harmful in all but one case (detecting connection failures), and in that one it is required. Require callers to opt-in if they require this failure. Forpoll, this is a noop. This has the effect of disabling select "errors" that weren't really errors.Otherwise, things stay the same. Draining for
poll/selecthappens as before, but we avoid the harmful non-error "errors". We could add a few harmless#if[n]def USE_POLLin the higher layers to demonstrate where the changes have effects if that would help?As I mentioned above, the less hackish way of doing this would be to introduce a
WaitForNewConnection()which would be straightforward as the only way to register for an error event when usingselect. I proposed the more hackish event flag here instead to avoid having to change theSockclass and its derivatives, and the tests/fuzzers to go with it. I don't think we can have it all here.. either a quick hack that is small and targeted and backportable, or a more correct fix that's more invasive.I'll admit I don't love the tests for this either. I'm not sure what to add here.
IIRC my tests showed this was a behavioral change on Linux as we no longer do any socket draining once that error is received. We've had some discussions offline about the importance of that... I'm willing to concede that it might not matter in the end, but I'd be nervous to just assume it's fine and backport it. So to me, that's actually harder to reason about.
@theuni i agree with your concern but there is no behaviour change on Linux for a clean connection close. My approach leads to an earlier disconnect only in case a connection is reset. I'm investigating now how "normal" such connection resets are, and whether we do actually handle them properly today.
I dropped
check_urgent_pointer_aheadfromp2p_socket_errors.py, added a unit test, and moved the HTTP change to a follow-up.The tests now do one of two things:
select()platforms(I was confused above about the distinction between tests being broken vs. not covering the fix itself)
See https://github.com/Sjors/bitcoin/actions/runs/45217725537/job/137861056516 for how the new unit tests fails on Windows without the fix. And https://github.com/Sjors/bitcoin/actions/runs/45217725537/job/137861056296 with the fix.
I checked that everything can be backported down to 29.x (with minor conflicts, see below).
The http commit is dropped for easier backport. For the same reason
9a61d7f17ais deferred for the followup PR.Backports are easy, but for 31.x and before require compensating for the scripted-diff in
f395acdeee, for the log format change in22335474d7. If we also want to backport to 29.x then the scripted diff forfa9cf38ab6and the infamous9f36962b07need to adjusted for.Adjusted the comment.
That seems fine to do as part of a larger cleanup, but as far as i know this is unrelated to the bug fix from this PR?
That makes sense to me. I agree with that approach conceptually, even if i dislike the specific implementation in this PR.
Fine. I can live with that, and would be happy to ACK a PR that does only this.
However the hackish way does show its limitations:
FuzzedSock's implementation now contradictsEventFlag's documentation because it setsgithub.com/bitcoin/bitcoin@dbe9eacd17/src/test/fuzz/util/net.cpp (L434)whereas the doc says "They share the bits of an
Eventand are never set in the occurred events."Yes, I suppose this is left-over from the version of this PR where Windows still needed to react to errors with disconnects. It's required for other poll impls, but not for Linux. I suppose for the sake of keeping this as narrow in scope as possible, it can be removed.
Approach ACK for only setting the exception set when the caller wants connection errors. I would be happy to review a cleaner
WaitForConnectionErrors()approach, but i don't mind too much as that code would go once we switch to using poll() everywhere.That said, i still think this PR is doing way too much:
Can this PR be trimmed down to only the one commit that is relevant to fix this bug, and further cleanups / unrelated testing be considered in followups?
Thanks, @darosior, I think we're finally getting somewhere.
I agree that the second commit is the meat of the issue here.
(I argued above for the change to add the disconnect in the
recvRequested && POLLERR | POLLHUPcase on poll+Linux, as if it's not currently an issue it's only by luck, but that is indeed independent of theselectissue being fixed here)I opened a followup PR #36963 (draft) and moved all commits except
net: only use the select error set while connectingthere. Reviewers can use it to better understand the change here, and e.g. see for themselves that its new functional tests pass before the fix too.Back-porting still (textually) interacts with:
f395acdeeescripted-diff: Rename Sock::{RECV,SEND,ERR}(31.x and older)d22d356512util, cli: name the Sock wait timeout cap and use it for -rpcclienttimeout=0(all releases)Thanks @Sjors. Reviewing now.
ACK
1719ea7584Hope we can get rid of that soon.. It's confusing and ugly that callers need to know specific implementation details, such as the syscall used on each platform, in order to use the interface correctly.
ACK
1719ea7584Thanks @sjors for sticking with this and dealing with being pulled in so many directions.
Hmm, the code in
Sock::WaitMany()ignoredErrorEventin requested events and internally would askselect(2)to check for error events if the caller is interested inRecvEvent.This PR adds a new flag to tell
WaitMany()that it needs to setErrorEvent. Why not just passErrorEventand stop ignoring it? No caller is passingErrorEvent, so the un-ignoring will be a no-op. Then change theConnectToSocket()function to useErrorEvent, it will be the only caller.Tuu many words, diff better:
That does seem more consistent with the original code, i.e. checking
events.requested & ErrorEventthe same way checkevents.requested & RecvEventandevents.requested & SendEvent. And it avoids the newConnErrorEventFlag.Implemented in https://github.com/Sjors/bitcoin/pull/135, which I'll study a bit more and then push here if I don't find a new problem.
I switched to @vasild's approach: https://github.com/bitcoin/bitcoin/pull/36716#discussion_r4692637894
It's simpler, yet as far as I can tell identical in behavior in the current code. It gets rid of the new
ConnErrorEventFlagthat @darosior didn't like. It also avoids touching the fuzzer and test/util.Additionally I (well, my agent...) made
wait_ignores_urgent_datahandle CI memory pressure better:I re-ran the Windows (backport) stress test: https://github.com/Sjors/bitcoin/actions/runs/45636345549
Ok if you are going to make changes here, please update the doc comments not to mention internal syscalls, which do not mean anything on their own to the user of that interface, but the platforms they correspond to, which at least is meaningful to the caller to some extent.
"On Linux, this happens when ... On other platforms (Windows, macOS, BSDs) this happens when ..."
If we are giving up the strict check that nothing is reported, i think the synchronisation with the raw calls is not necessary anymore: you can just send two bytes, one urgent and one non-urgent to wake up the wait and assert it reports a RecvEvent and not an ErrorEvent:
utACK
d87ab6523dI like less code.
Re-running some tests now: https://github.com/Sjors/bitcoin/actions/runs/45652336143
I overlooked this comment earlier today, but will be fixed in the next push.
Fwiw, the reason I opted for the flag rather than using
ErrorEventdirectly was to obviate to the caller that the only way to receive errors is to specify the "I'm connecting" flag. Imo it's weird to allow callers to request errors when the request is a no-op on Linux and harmful elsewhere in all but one specific case. I agree this is less of a hack, but I think it's more of a footgun.But I don't feel strongly enough to argue. I'd rather pour that energy into nuking
selectentirely :)ACK
d87ab6523dI adjusted the
ErrorEventcomment and moved some details tosrc/util/sock.cpp.Also took @darosior's test shrink.
Sorry @theuni for racing your ACK.
@Sjors No worries. I'm really not too worried about the details or the tests, as I hope we can get this all deleted soon anyway.
ACK
97e3c95622re-utACK
97e3c95622I don't think we need comments like this. A mention/rationale in the PR or commit message is enough. (not blocking).
I'll drop it if I need to retouch.
ACK
97e3c95622Show Signature
vasild's public key is on openpgp.org
Backported to
32.xin #36984.Continued in:
#36963 drops it
ralph referenced this pull request2026-11-27 15:36:31 +00:00
post-merge ACK
97e3c95622This is a nice surgical approach to the issue. We only care about exceptional events when using
select()(on Windows) when connecting to a socket. We already have the Error Event flag defined but it has been paired with the Receive Event flag. This patch isolates the exceptional cases to connection, and ignores it in all other cases (like when urgent data is received)Show Signature
pinheadmz's public key is on openpgp.org
And switch to "with
select()" belowAbsorbed into #36963.