mirror of
https://github.com/bitcoin/bitcoin
synced 2026-12-04 10:47:36 +00:00
validation: improve block data I/O error handling in P2P paths #35003
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!35003
Loading…
Reference in a new issue
No description provided.
Delete branch "2026_abc_io_exception"
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?
Early note: the majority of this PR consists of test coverage. The changes per se are quite small, just the issue shows up in multiple paths in slightly different forms.
The goal of the PR is to ensure I/O errors are not silently ignored during validation or P2P message handling. In some cases, such as
GETDATAorGETBLOCKTXNrequests, errors can be swallowed, leaving the node unresponsive to the request without any action. In a harder to reach but more severe case, a swallowed error can leave the node alive but stuck, unable to process new blocks and advance the chain. Also, silently ignoring errors obviously makes problems harder to diagnose. So this PR seeks to improve all of that.Currently, the same root cause, inability to access the blocks directory, can produce different behaviors depending on where it occurs:
If it happens during block connection, inside
AcceptBlock(), the error gets caught and triggers a fatal error graceful shutdown. This is the correct behavior.If it happens during block connection (due to the unguarded
FlatFileSeq::Open->fs::create_directoriescall), afterAcceptBlock(), insideActivateBestChain(), the error gets thrown and swallowed by the P2P general try-catch, leaving the node in a living but stuck state. WhereActivateBestChain()will always silently fail on any posterior block processing, retrying to active the failing block.If it happens during
GETDATArequest, the file system error gets swallowed by the message handling general try-catch, only logging a net-debug-level message. The remote peer is not disconnected, nor the node aborts. It just silently ignores the request. This is different to a missing block data, which currently logs the error + disconnects the peer.If it happens during
GETBLOCKTXNrequest, the file system error either gets swallowed by the message handling general try-catch or crashes the system via an assertion, depending on if the problem is at the blocks directory level or at the block data level, which is inconsistent.If it happens during
GETCFILTERSrequest, the file system error gets swallowed by the message handling general try-catch.If this happens in any of the index functions, the node crashes.
So, this PR makes failure handling consistent and ensures the node never enters a stuck state due to a block I/O error. Changes:
GETDATAnow treats the issue in the same way as other I/O errors: it logs the error + disconnect the remote peer.GETBLOCKTXNnow triggers a fatal error and graceful shutdown. The error here is stricter than inGETDATAbecause it can only access the last 10 blocks, which must be available for reorgs.ActivateBestChain()now triggers a fatal error and graceful shutdown when it happens. Fixing the silent stuck node state scenario.GETCFILTERSnow logs the error through the expected path: "Failed to find block filter in index". A more descriptive error message can be added in a follow-up PR.OpenFileto throw. Better error handling can be added in a follow-up PR.Testing Note
Can reproduce the different behaviors that cause the stuck node scenario by running the second commit’s unit test 28af683b5dfdce88892e367b308857b94ec630fe or by manually introducing an exception in
ConnectTip()(which occurs insideActivateBestChain()). Previously, the thrown exception would have being caught by the general P2P try-catch and logged only at net-debug level, which most users do not have enabled, leaving the node alive but stuck, as subsequent block connections repeatedly attempt to process the failing block, throw the exception again, and get silently swallowed. Adding a functional test for this scenario is not possible due to the requirement of failing insideActivateBestChain(), which always occurs afterAcceptBlock(), which correctly captures the error.Separate Note
There is another assertion scenario that we can move to graceful shutdown (fatal error) in the compact block relay that I haven't done here.
Extra Note
If want to see a similar error producing a crash, but in the wallet, go to #34176.
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:
MSG_BLOCKby stripping witnesses in place by l0rinc)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/flatfile_tests.cpp:FlatFileSeq seq(data_dir, "a", 100)Possible places where comparison-specific test macros should replace generic comparisons:
src/test/flatfile_tests.cpp:BOOST_CHECK_THROW(seq.Allocate(...), fs::filesystem_error)→ PreferBOOST_CHECK_EXCEPTIONwith a predicate that checks the expected failure message, rather than only the exception type.2026-11-03 21:13:23
concept ACK
Thanks for the thorough PR description! Definitely helps me to understand the code changes before even looking at them. Can also see its minimal changes with lots of test coverage, will review.
tACK 72f7a67370255cab1bf0dfcf39920dd23a3c268b
Built from source. All new tests pass:
flatfile_tests: 9 cases, no errorsvalidation_chainstate_tests: 5 cases, no errorsblockmanager_tests: 8 cases, no errorsp2p_handle_io_errors.py: both scenarios passAlso manually reverted the GETBLOCKTXN fix (commit ba034f4) by removing the
fatalErrorcall and replacing with a silentreturn. The functional test correctly caught this kind of mutation. the test expected the node to shut down, but the mutant node stayed alive, causing a timeout failure. Mutant killed byp2p_handle_io_errors.py. Unit tests did not detect this mutation. Alsoprocess_messagesandprocess_messagefuzz harnesses both passed without detecting the mutation, confirming the functional test is providing the critical oracle here.Line 5915 in
SendMessageshasassert(ret)after aReadBlockcall in the compact block announcement path. I think this is the same pattern as the GETBLOCKTXN assert fixed in commit 4. I believe this is the "another assertion scenario in compact block relay" mentioned in the PR description. Is this planned as a follow-up? Happy to take it if so.concept ack, left a test suggestion, which could make review easier
Is there a reason why the p2p block msg flow is not tested end-to-end? I understand that the end-to-end behavior is already correct for it, and that there are unit tests, but they only look at the problem from a zoomed-in-on-flatfile perspective.
I mention it, because the error flow happens in reality. I've last seen it in https://github.com/bitcoin/bitcoin/issues/34592#issuecomment-3915534591.
So I think it could make sense to test it, to avoid regressing on it.
Also, I think, it could make sense to make the first commit of the pull request the functional test. This way, it is easier to see what the end-to-end behavior changes are, without having to manually undo commits or patches.
Feel free to grab the test from this diff:
Sure, thanks! Test taken, and also reworked the branch per suggestion.
Yes @frankomosh. All yours :).
Note: intentionally not checking for a specific filesystem error msg, since it slightly vary across OS. Specific msg doesn't matter, this first commit just proves the error is swallowed in master.
Looks like the test fails on the second commit, or so?
Also, provided some more test nits. Feel free to ignore.
825dfc200520d503fec64346ed01a8b12ec8fa54~4 📭
Show signature
Signature:
nit in 75a8a957a5181a3cebfc9d3dd064330d52c51dbb: Is there a reason for this guard? The following seems stricter and what we want in this test. It also passes locally for me on this commit:
nit in 75a8a957a5181a3cebfc9d3dd064330d52c51dbb:
From the pull description:
You claim that a failure in
ActivateBestChainwill leave the node alive, but stuck. However, when writing a test for this, I found that it properly shut down:I guess it could make sense to add the test?
Also, it could make sense to clarify that point 2 in the pull request description refers to a thrown exception, presumably only from
create_directories, and does not refer to any IO error?Just a nit, and up to you, if you want to keep this pull focussed only on the
create_directoriescall, or be a more general io error handling improvement in P2P paths, with test coverage.nit in the first commit: Any reason to disable something that is already skipped? Diff:
nit: Same here about
sync_fun.It seems the assertion error message is libc-dependent.
Linux logs "Assertion `expr' failed" while MacOS logs "Assertion failed: (expr), ...".
Will make the
wait_until_stoppedexpected error a bit more general and check for "Assertion" wording only. That is more than enough to check the crash reason.The last commit makes it clear with the fatal error change anyway.
Yeah ok. Your test exercises a missing block file, not the inability to access the directory. If we want to replicate the stuck, the goal there should be to get the node stuck by making it throw inside the
create_directoriescall.I had a test early in this branch that reproduced the "throw inside
ActivateBestChain" through the P2P path in a deterministic way (which is not easy due toAcceptBlockhappening first). But I did not like that it relied on another bug inreconsiderblockto trigger this one.Basically, the approach was to invalidate the tip, submit a fork, make the directory inaccessible, and then reconsider the block, which throws internally but resets the block validity flags (the operation is not atomically reverted upon failure). After that, sending any number of descendant blocks via P2P will be swallowed due to the inability to activate the very first block. But it was ugly to depend on
reconsiderblockto trigger it.Yes! for sure. Pulling it.
Sure. Will do.
Not anymore. I had more tests here before. Will drop it. Thanks.
Done as suggested.
Done as suggested.
Nice changes. I think the added tests are useful to have proper coverage for this. Also, the code changes move in the right direction. I also like that further places are pointed out where stuff can be improved.
Everything looks great, and I've left more nits on the tests, given that all the code changes are tests. Feel free to ignore any of them, but I'd be happy to re-review all of them.
lgtm 476fc0f8991141f9d2d4f687b38b45b82a98bb39 🏸
Show signature
Signature:
nit in 476fc0f8991141f9d2d4f687b38b45b82a98bb39 from the llm:
nit in 55ac4b4f2f389b588a1f372e506c2f5d63db701b: would be easier to read, if integral literal args used names. In this case, I guess it is
/*nHeight=*/999?nit in 55ac4b4f2f389b588a1f372e506c2f5d63db701b : Should also check undo beside the block?
Also, when assuming a pointer can not be null, it would be better to use a reference.
Diff to achieve both:
nit in a98cebe088a31933b5ee1c12e862f93165c32263 : It is a bit confusing to see all those oddly specific (and different) numbers for the chunk size, when none of them matter. It would be better to just define a dummy once and use it in all places that don't matter:
nit in a98cebe088a31933b5ee1c12e862f93165c32263: This function is pretty large, and there is no need to inline it, so it would be better to move it to the Cpp file:
a98cebe088a31933b5ee1c12e862f93165c32263: same here: Any reason for the check?
nit in 63e45414952b4cd155921b0cee20e3d3f97142a5: Could use named arg for
/*disconnectpool=*/?Ah interesting. I presume the bug still exists after this pull requests, as the
ReconsiderBlockfunction is not changed here? Just wondering, as the bug seems unrelated to the bug fixed in this pull request. Also, I agree that such a test may be too spicy to include here.nit in a98cebe088a31933b5ee1c12e862f93165c32263: Now that the disconnect happens, the timeout here is not needed and confusing and should be removed. Also, I think the
unexpected_msgsshould be removed, as they depend on the exact log formatting, which may change in the future, so they will likely go silently stale anyway, and the disconnection is what matters here and is already checked.(Same in other places in this commit)
Suggested diff:
nit on the title: Maybe the prefix should be
validation:, because it not only affects the p2p validation flow, but also the RPC one, and possibly the kernel one?Sure, taken. Thanks!
Sure, taken. Thanks!
looks good!, taken. Thanks
not anymore. Removed. Thanks.
Sure. Done.
Sure. Done.
Looks good!, taken. Thanks.
Done as suggested.
Updated per feedback and very nice suggestions. Thanks maflcko!
Only change is the nits.
review ACK f6c62f1bd4887d7865bf64c1fb399d47286fe531 🐟
Show signature
Signature:
reACK f6c62f1bd4887d7865bf64c1fb399d47286fe531.
Concept ACK
github.com/bitcoin/bitcoin@f6c62f1bd4, will review.+1 for the detailed PR description and verbose commit messages that makes the reviewer feel like a story is unfolding in the PR.
Would say it is partially fixed but haven't tried it.
ReconsiderBlockinternally callsActivateBestChain, which triggers a fatal error after this PR, instead of throwing an exception. So it is a matter of whether we are flushing the block flags reset to disk prior to aborting or not. Because, if we do, the node would fail early on any following up startup.Started reviewing at f6c62f1bd4887d7865bf64c1fb399d47286fe531, shared few comments in the test.
In bd19cea30865efc0c8a353843662090446f4aada: s/large_block/large_block_hex
Nit: s/({'55'*100_000})/({'55'*66_000}) can also work because the file size is 64kib for fast prune.
In bd19cea: I usually find these standalone calls unintuitive because no value is captured and no assertion done, often time it takes me a second to realise that this is there just to show that it works.
Maybe add the following assertion as well to show that forked block is gone now.
In bd19cea30865efc0c8a353843662090446f4aada:
Isn't it generating one block?
In c673aacfd78653a3d49cdcac355df3b6024c0608: this is the last test, is starting node here really required?
Better to leave the test in a consistent state than force the next person working on it to figure out why their test isn't working.
sure, pushed.
yep, fixed. Thanks.
string fixed, thx.
Updated per feedback. Test comments fixed. Thanks rkrux.
Overall lgtm at c990e375dbbc5ac2d2ed701dbc0f4f51533d2650
Nit: Can consider switching the order of 3rd and 4th commits because latter is more closely related to the changes in 2nd commit as blockman methods are directly dependent on flatfile methods.
In c4204d9137b66593a5d38c0e210dac863f6453d0: This new test that has been added seems fine on its own. However, the reviewer might try to relate it to the 2nd point in the PR description because the error here is of ActivateBestChain. But this testcase doesn't exactly test that point, which I found confusing. Can consider moving the following statement from the testing note of the description in the 2nd point itself there to make it obvious.
In c990e375dbbc5ac2d2ed701dbc0f4f51533d2650: A new error has been added in the commit and it seems like a missed opportunity that it's not asserted for in the corresponding test.
or
That's thoughtful but it also adds marginal latency in the test - will leave it to your preference.
This behaves properly not because of the functions calls ordering, but because we are unlinking one single blk file and not the entire directory. The test that is above (
test_block_accept_on_broken_fs()) is the one exercising the note you are mentioning.Done as suggested.
Updated per feedback. Single test line diff to target a specific error msg during fatal error shutdown.
Ready to go.
I don't think large_block_hex makes sense here. This is the hash of the block, not the full block data in hex. The naming should either be reverted to
large_blockor uselarge_block_hash.lgtm.
Only nit changes in the test.
re-ACK 65347588a1488d13f925da071a5cbf6af56d7a3f 🏹
Show signature
Signature:
lgtm ACK 65347588a1488d13f925da071a5cbf6af56d7a3f
I like the
simulate_io_errorcontext manager - I have noticed similar use cases in other functional tests as well, this might be generalised in the future and made as a utility.Concept ACK
I'm not sure on this approach. If this is just for this single
ReadBlockpath, might it be easier ascertain that this does not introduce unwanted side effects by moving the call toOpenBlockFile(...)inReadRawBlockinto the try...catch block? I did not test this, but it seems like the same failure could trigger a runaway exception in the indexes at the moment, but I'm not sure if we are still terminating in all cases after this patch. Similarly does this now ignore the exception inImportBlock?Nit on the description: Is the node being "stuck" is the best way to describe it? After all, it does not freeze up, but rather can not do any block processing. I guess an admin could theoretically also "unstuck" it in this scenario.
Generally, I think it would be better to use one type of error handling (at least inside a single function). IIUC, if someone were to
rma blockfile,FlatFileSeq::Open(with read_only=true) would returnnullptrand log an error. Same, if someone were to truncate a file. So it seems odd to treatcreate_directoriesdifferently. Either all of them should return nullptr, or all of them should throw (and then return a NotNull). So I think the current patch is preferable to moving the call around insideReadRawBlock. The alternative patch of reworking the error handling to use exceptions consistently for this function, may be more involved, but I haven't checked.If the indexers are not properly checking the return value of
Open(), then it seems like a pre-existing issue, because it can happen also when a file is removed or truncated. If this is the case, it would be good to fix those issues in a separate pull request.IIUC it will be leading to a break, just like other
Open()errors. I think this is fine, becausefs::existswas called prior, so the error could only happen in a racy way, in which case it can't reliably be detected anyway. And it will lead to an abort of the node on the next block read or write anyway.So I think this PR is the a minimal and still correct patch. Alternative patches are certainly possible, though I think (regardless of who writes them), they should go into a fresh pull request, as they are conceptually different. Then, one of them can be merged and the other one can be closed or rebased.
The scenarios where this is not handled adequately at the moment are pretty contrived, but I feel like so are the ones that would make us reach the conditions we aim to guard against in this PR. As far as I can tell by sprinkling in a few error conditions into the code, they do trigger an unclean exit of the node in the indexes, and will instead continue after this patch. It would be good to document that this may go from crashing to ignoring the error on non-p2p paths.
Other than that, the changes do look correct to me. I think it would also be nice to annotate the various member functions using
Openin the block manager andOpenitself withnodiscard.Heh, right. Completely unrelated (just related to the error handling mess): IIRC, in other code paths, the indexes do not properly catch exceptions, so if such an exception (which should lead to a fatal node shutdown) is thrown in an rpc thread, it may silently continue (See also https://github.com/bitcoin/bitcoin/pull/34132#discussion_r2753566733)
Yeah, I guess that can't hurt. I'd also be curious about re-thinking the error handling wholesale from the ground up, but maybe this should be a brainstorming issue.
Looks like this wasn't addressed in the latest push
It seems the latest push predates your comment. That's why it isn't there.
Done as suggested.
Updated per feedback. Annotated the various flat file functions as
nodiscard.The indexes discussion made me realize we are also moving from swallowing a p2p
getcfiltersexception to properly handling the error now. Which is nice. We could have a test for it.What type of doc are you expecting? Commit message pointing to each place or go through each caller and add a comment on top?
While it is true that this changes the indexes paths behavior, it is evident that the previous behavior was not intentional. The code was not expecting
OpenFileto throw and crash the process. It was just missing that failure path. So someone could also argue that this is correcting unexpected crashes as well.If you are not that strong on it, I would rather move forward here, and work on the indexes in a separate PR. I'm happy to continue moving forward over #34897, #34489, #26966 and more. There is a lot we can do there.
Yes, I was only asking for mentioning the various affected paths in the PR description. I don't think it should hold up this pull request.
Done. Ready to go.
Only change is basically adding the last commit, but I think it should be dropped again.
review ACK d09974cf3d5db404b11e7f1f3f959feae19838c3 🐚
Show signature
Signature:
in the last commit: Not sure I understand what the benefit of those would be. Of course, it is a bug to open a file and not use the returned file. But this is conceptually true for all functions whose goal is to call them to use their return value. Personally I don't think we should be adding
[[nodiscard]]to all those functions, because this is extra verbosity/bloat and I don't think there has ever been a bug of this kind in this codebase, and I fail to see how one can be added in the future. Code like this won't compile anyway with or without the attribute:I am not saying that
[[nodiscard]]is useless, there are certainly valid use-cases, when a function name does not imply that something (e.g. an error) must be returned and could plausibly return void. For example, two lines upbool Flush()correctly uses the attribute. Also, onAutoFileitself, the attribute is correctly used onfclose. Otherwise, there could be code that compiles, like this:So I htink the last commit should be dropped.
Concept ACK
I pretty much agree with you, that's why I did not add it before. I just assumed you guys were agreeing there based on your comment: https://github.com/bitcoin/bitcoin/pull/35003#issuecomment-4419336678
And I didn't feel like arguing against it was worth the extra back and forth for such a small change.
Just dropped the last commit.
review ACK 01daa552c3ce06c8c8bfdab8c5b93a662cee6e79 🌴
Show signature
Signature:
@sedited @rkrux wanna take another look? nothing changed from the past review round.
ACK 65347588a1488d13f925da071a5cbf6af56d7a3f
While I don't think these are the most desirable mechanics for handling system errors, this is an improvement over the status quo. Some followup work improving the handling in the indexes and in the file allocation path would be good. I like the additional tests.
lgtm re-ACK 01daa552c3ce06c8c8bfdab8c5b93a662cee6e79
I have not gone through the last 3-4 comments in the PR discussion above but the range-diff is minimal since last a-c-k.
In https://github.com/bitcoin/bitcoin/pull/35003#pullrequestreview-4353425125
This seems to be an outdated commit.
Rebased due to conflicts with #33966. Ready to go.
ACK 400a5b16e396498d41ec1ae70ec91f7baf45d1db
nit: in unsupported environments, the assertions never run, but the tests still pass. This can create false-positive test coverage.
diff
Cool, thanks. Taken.
Updated per @w0xlt feedback, thanks. Added test warn logging message on unsupported environments.
not sure about the recent test-change push. this was done to avoid "false coverage" on windows. However, i don't think anyone creates coverage reports on Windows. Also, after the first warning, the later ones are dead and unreachable code.
Also, the patch is incomplete, because the "skipping" regex in
src/test/CMakeLists.txtwould have to be updated as well.Also, even with this patch, there will be "false coverage" through all of the code that is run before the check. That is this will be "false coverage":
My recommendation would be to either revert the last test-only push for now and leave it for a follow-up, or properly do it:
Asserting insideSimulateFileSystemErrorthat the simulation did work. This also avoids the[[nodiscard]] boolbloat and a simplevoidcan be used.Concept ACK
Fault suppression masquerading as defensive programing strikes again! Big fan of not swallowing the errors and of improving the test coverage!
I know this is not a fair critique, since I assume this is the best we can come up with, but the file permissions approach seems hacky and the fact you have to work around root users and windows is evidence. Thats not really a blocking piece of feedback, but it would be nice if you could add a TODO comment.
I think the meat of this PR is your change to flatfileseq, so I left the majority of my review there. I've been reading https://sean-parent.stlab.cc/presentations/2022-08-31-exceptions/2022-08-31-exceptions.pdf and really enjoying it, so a lot of the ideas and terminology in my review are borrowed from there.
More generally, I'd recommend everyone reviewing this PR or interested in error handling read/watch the presentation. I think the principles laid out are clear and very applicable to our codebase. h/t @purpleKarrot for recommending it to me.
I think this is the wrong direction.
The problem is, based on my understanding of the PR description, this
fs::filesystem_errorwas bypassing the validation fatal-error path and bubbling up to a broad P2P catch-all, where it was logged and swallowed. More generally, the problem was that the exception was not handled at the right layer, and in practice was not handled at all.What you're doing now is folding the exception into the existing
nullptrreturn fromFlatFileSeq::Open()and then expecting every caller to check and do the right thing with a now more ambiguous failure value.Ideally, albeit a much bigger change, we would have something like:
..where "required" indicates the postcondition of the function. More specifically, if
FlatFileSeqis given valid pos and mode arguments (preconditions), it is required to open the file at that position. If it cannot satisfy its postcondition, it throws an exception because it is now violating the contract. Then we would have:..and
GETDATAwould catch ablockstorageerror, discard the request, disconnect the peer and keep running.GETBLOCKTXNwould catch ablockstorageerrorand fatally shutdown, etc etc.I realise what I preposed above is likely too expansive of a refactor at this stage, but what you are doing here feels like the wrong abstraction boundary. What about something like this instead:
Then callers choose how to handle or propagate:
GETDATA: disconnect peer on IoError, ignore/handle pruned as appropriate.GETBLOCKTXN: fatal on IoError for recent block.ActivateBestChain: fatal on any required block/undo read failure.Strongly agree with the change here! But based on my previous comment, why couldn't this be catching and handling a
fs::filesystem_errorruntime throw? Or the typed errors I proposed?Same comment as the functional test: feels a bit smelly. Perhaps theres a better way to do the fault injection?
It would be much nicer to write the postconditions of the test, e.g.: "GETDATA must discard the failed request and disconnect during block I/O issues", instead of writing the behaviour you are trying to avoid.
I think this makes it easier to assess the correctness of the test and whether or not the test is testing the right things. This also prompts the reviewer to consider other faults that could cause the postconditions to be violated , rather than only focusing their attention on the (possibly) more narrow set of bad behaviour you're testing for here.
Same comment regarding post conditions, perhaps this could be more specific: "GETBLOCKTXN block read failures must trigger a fatal shutdown, not an assertion or silent catch."
This feels a bit gross and it indicates to me we should be doing the fault injection differently. I don't have a good suggestion on how to do the fault injection better but perhaps this could at least be a
skip_windowsstyle function , same as the other functional tests?Thanks for taking care of this, went over the changes quickly, left a few comments.
I had to read it multiple times, maybe we could simplify it a bit:
Seem to me we should hold
cs_mainfor the duration of the test and inside theSimulateFileSystemErrorlambda, matching other blockmanager test cases.Running it with
-DDEBUG_LOCKORDERfails with:Something like this makes it pass again:
(I'm surprised this passed CI, cc: @maflcko)
In the new tests we're validating the state of
AllocateandFlush, could we backport it to existing tests, something like:This passes on
masteras well, maybe we could add this to the end for completeness:Could we fix this instead?
Is this safe against a sibling path like
/tmp/node10/blocksstarting with/tmp/node1?These helpers rename a path before changing permissions - but if we fail we should probably still put the path back:
nit: we could use a smaller block that still crosses the fastprune file boundary:
Instead of discarding the result, could the P2P block-connect test assert that the active-tip block is still readable?
Can we assert that reindexing actually recovered the chain?
Could we also cover that
GETCFILTERSfailures reach the existing filter-index error path in a new testcase?Hmm, not sure. It is set in one CI config:
Also, the clang TSA do not seem to be hitting?
@l0rinc See
ec6cf49b91My preference would be to fix it with a minimal lock guard, not a recursive guard that spans over several scopes.
🚧 At least one of the CI tasks failed.
Task
test ancestor commits: https://github.com/bitcoin/bitcoin/actions/runs/27427396736/job/81068654537LLM reason (✨ experimental): CI failed because Clang
-Wthread-safety-analysis(treated as-Werror) reportedWriteBlockwas called without exclusively holdingcs_maininblockmanager_tests.cpp.Hints
Try to run the tests locally, according to the documentation. However, a CI failure may still
happen due to a number of reasons, for example:
Possibly due to a silent merge conflict (the changes in this pull request being
incompatible with the current code in the target branch). If so, make sure to rebase on the latest
commit of the target branch.
A sanitizer issue, which can only be found by compiling with the sanitizer and running the
affected test.
An intermittent issue.
Leave a comment here, if you need help tracking down a confusing failure.
I don't think that is the right frame for the changes. Here we are accommodating the return value to the current function's contract. The issue exists because the current
FlatFileSeq::Openimplementation does not respect it. Callers expectnullptrreturn whenFlatFileSeq::Opencannot open the file for any reason, and there is only one spot inside the function that doesn't follow such rule.About your proposal:
I think the back and forth in your comment over how to handle errors, either through exceptions or
expected, kinda presents the difficulty of deciding the right approach to follow. I'm sure people will have different perspectives on this, so I think it deserves its own standalone issue/PR.The idea was to connect the sentence to the lines above. I don't find the repeated "If" at the beginning helpful.
Maybe
This is related to the comment above, the discussion deserves its own issue/PR.
But to at least explain where I currently stand, I think the approach depends on what the caller expects and whether knowing the exact error would let it do anything differently, or whether it would just handle all errors the same way, as is the case here.
At least in this scenario, and in
net_processingmore generally, adding small try-catch blocks everywhere would be quite noisy and make the code harder to read and maintain.Done as suggested. thanks
Done as suggested. thanks
Done as suggested. thanks
I thought about this initially, but the try-catch seemed something we may want inside
CheckDiskSpacerather than the per call try-catch. There isn't any diff for the caller between "no disk space" and "no disk access", they both should probably makeCheckDiskSpacereturn false.The change isn't big but introducing it would affect other areas that are not being tested; like the scheduler disk space check and
FlushStateToDisk. That's why thought about leaving it for a focused follow-up and not expand this PR more than what is needed.it seems good material for an investigation issue/PR. Here I looked for the simplest and most contained way to trigger the error path. We surely can come up with a more involved approach. The nice point about this PR is that only
simulate_io_errorwill need to change in the future.Overall, I find this + #34176 the beginning of a long journey.
sure, reverted.
Done as suggested. thanks
Done as suggested. thanks
Done as suggested. thanks
Done as suggested. thanks
Sure, taken. thanks
Sure, taken. thanks.
We surely could. We just need to set up + sync the index first, then send the request.
We actually do something similar inside
wallet_multiwallet.py. But I agree, we could do a follow-up standardizing this in the test framework properly; instead of a broadskip_windows, would say we should have a general "can_change_permissions" (or a better name) that explicitly checks for the test requirement.Thanks everyone, updated per feedback. I hope to have tackled them all.
I think that is too strong a claim. The contract you describe was not documented, still is not documented, and was not actually followed before this PR, since
fs::create_directories()could throw before the nullablefopenpath. This is, to me, is an example of why this sort of implicit contract and mixing error handling is a bad design: it leaves room for bugs like these to happen.Even after this change,
FlatFileSeq::Open()is not a no-throw API; it can still throw from support code such as path construction/conversion, formatting, logging, or allocation. So we can't really enforce your desired contract with a noexcept. Separately,FlatFileSeq::Allocate()still has a filesystem-throwing path throughCheckDiskSpace(). So I do not thinkFlatFileSeqcurrently has a consistent error-handling contract, which, again, leads to bugs like this.But I suspect where we actually disagree is that you view the nullable
Open()contract as the right direction, while I think it is the wrong abstraction. This PR expands the meaning ofnullptrto cover null position, missing/pruned files, ordinaryfopenfailure, seek failure, and now parent directory creation failure. Those cases do not all have the same recovery semantics, as demonstrated in this PR:GETDATAcan disconnect the peer and continue.GETBLOCKTXNshould fatal.I would strongly prefer we go in the other direction and stop using
nullptrto mean “something went wrong; infer what from surrounding context.”I also think my earlier proposal may not have been clear. I am not arguing back and forth between exceptions and typed errors as equivalent options. My preferred approach is exceptions: if a function is called with satisfied preconditions but cannot satisfy its postconditions, it should throw, and that exception should be handled or translated at the appropriate layer, likely block storage here, not with small try/catch blocks all over the code. This is the approach described in the presentation I linked.
I only mentioned typed errors as a lesser evil if exceptions (and their consistent handling) are considered too large a change for this PR. I still think that is suboptimal, but it would at least avoid collapsing distinct failure modes into an ambiguous nullptr. I understand your desire to keep this PR scoped, but if we are touching this code, I think we should try to move it toward a more robust, self-documenting, idiomatic C++ error model rather than further entrenching the ambiguous
nullptrcontract.Another useful companion reference that helped frame my thinking on this: https://isocpp.org/wiki/faq/exceptions
It seems you constructed a bad view of what I said and went really deep on it. Almost all of it doesn't represent the position I hold.
No, I never said that. I do not think returning
nullptris necessarily the right long term direction. This is just an improvement over the current status quo. The simplest form of it. The one that lets us introduce proper test coverage before making bigger changes in the future.Btw, we have a very similar view on when to use exceptions vs typed errors vs something else.
I never said this was my desired contract, nor did I propose
noexcept(which I'm actually not a fan of). I just described the current state. I was strictly talking about the current source code, which talks for itself. The three lines change fixes all callers because they all expectnullptrwhen the file cannot be accessed.I agree. This PR is just about consistency and test coverage over what we currently have. We can dream bigger after it, I have no doubts about that.
The unit tests root is not
/tmp/, the root is/tmp/test_common bitcoin/<test_name>/<rand_id>. Where<rand_id>is unique per run, and unit test initialize a single node.Handling all failures identically does not imply they should be collapsed into an ambiguous return value. A domain exception lets a caller handle the whole class uniformly while still preserving cause and context.
I also don't think existing caller's expectations should dictate the strategy: a functions error propagation strategy should be based on its own contract and boundary. Different callers have different needs, the expectations of callers may change over time, and new callers may have new requirements.
I agree that scattered try/catch blocks would be noisy, and that is not what I am advocating as the ideal design. imo, these disk I/O errors should be handled or translated in
BlockManager. But as you've said, this is not a PR for the ideal state. In that case, I think a small amount of local try/catch at the current failure sites would be a better incremental tradeoff than expandingFlatFileSeq::Open()’s nullptr. It fixes the swallowed error behaviour problem stated in the PR while preserving the exception, which keeps us set up for a cleaner refactor of the handling/translation boundary later.Fair enough, I may have inferred too much about your longterm preference. I was reading that from the framing that
Open()has a current contract of returningnullptrwhenever the file cannot be accessed, and that callers expect this (said in a different response to me). If your view is only “this is the smallest consistency fix for the current code,” then thanks for clarifying.My concern remains, though. Desipte neither of us wanting
nullptras the model, this PR still expands the set of distinct failures represented bynullptrat the lowest layer. That makes the eventual cleanup harder imo, because error information is discarded before a domain layer can decide how to translate it.I took a look at the call sites again and I think the better incremental fix is to preserve the exception at
FlatFileSeq::Open()and translate it at a block storage boundary. For example,BlockManager::ReadRawBlock()/ReadBlockUndo()/ write helpers can catchfs::filesystem_errorand convert it into their existingfalse,Unexpected{ReadRawError::IO}, or fatal paths. That still keeps this PR scoped and avoids try/catch noise innet_processing, but it does not collapse another distinctFlatFileSeq::Open()into a nullptr. This might be more lines of code but I fee this would be much easier to reason about from an architecture standpoint and clear improvement over the existing code while setting us up for success in the future.If that boundary change is too much for this PR, I would still prefer a small amount of local try/catch at the currently affected call sites over expanding
Open()’s nullable contract. That keeps the exception as the error propagation, so a later PR can move the translation boundary to block storage without needing to touch theFlatFileSeqcode again.Went over the change more thoroughly, I love the structure, covering current behavior first, followed by fix and surgical test changes.
I left a few comments, mostly about isolating effects of the file/folder corruptions to make sure they don't affect each other and about covering all mentioned cases with tests.
Alternatively we could group the two branches and have a single return:
No lock order problems now 👍
Running every assertion under the same
SimulateFileSystemErrorblock makes it harder to see which operation depends on state left by a previous check, could we split them out (the test is very fast, don't see the need to optimize it):Resetting only
exit_statusafter an expected fatal error seems fragile - it does not fully reset the node context, becausefatalError()also requests shutdown and leaves the fixture interrupt set - and could leave lingering state.Could we rather prevent it from sending the shutdown signal, something like:
We're simulating two unrelated failures here where the first might theoretically cause/affect the second - could we do the full disconnect-tip/simulate-the-specific-path-failure/reconnect-after-restoration for both cases, something like:
We're doing
OP_TRUE << OP_TRUEinstead of previousOP_TRUEcoinbases because the fork blocks need to be different from the original blocks created just above?nit: please consider making the distinction slightly simpler with something like:
Similarly to before, can the reorg failure test make the pending reorg precondition visible for each disk-read failure path separately?
beautiful, I love that you've covered the existing functionality separately
Given that you explicitly mention
GETCFILTERSin the description, could you please cover that as well?This doesn't seem to work for me. I don't have Windows access so I just changed this to
if True:and I'm getting:This one did work for me locally:
showing:
Haven't read all of the discussion threads, but since my last review, the only change seems to be moving the chmod, which doesn't seem like a good change. (See inline comment)
Also, the suggestion by @josibake to use exceptions here sounds interesting. However, I haven't looked at the details and code, so it is harder to tell which is the right fit here. I'd be happy to review either approach, and wonder what other reviewers prefer here?
lgtm ACK d4f95399b5af4643b90bb396c4d172e908ae87c2 🐻
Show signature
Signature:
.
https://github.com/bitcoin/bitcoin/pull/35003#discussion_r3394953429: I don't think this change was a beneficial change. When the chmod fails, the test should also fail, not silently pass and even skip running the
fn/yield.I think the correct fix would be to revert this change and then wait for the test to fail, and then figure out if that env/platform should be skipped or supported.
The suggestion was about renaming before we check for permissions.
I don't see how this would make any eventual change harder, and the error isn't being discarded either, it's logged exactly like every other file access error. None of that information is used anywhere today, every file access error is treated the same, and that equal treatment is the consistent part of this PR.
Would also argue that the half-way path you are proposing would just introduce an inconsistency. As one file access error would go through a channel while all others access errors go through a different one. Which would make this structure harder to follow and more error-prone, not easier as you are suggesting.
Overall, I don't think a partial implementation of a different error handling path is useful really. We should either change it all or don't touch it.
I partially answered this above in the inconsistency argument, but can also add that
ReadRawBlock() / ReadBlockUndo()are not the only ones using theOpenfunction. Constraining the changes there only would leave other places un-fixed:TxIndex::FindTx,TxoSpenderIndex::ReadTransactionopen the file directly viaOpenBlockFile, not throughReadRawBlock/ReadBlockUndo, same for the startup checks and the reindex loop. AndBlockFilterIndex::ReadFilterFromDiskuses its ownFlatFileSeqdirectly.My reply here would be similar to what I wrote here https://github.com/bitcoin/bitcoin/pull/35003#discussion_r3494069535.
Yeah. We agree on the future, just not on the first step. I understand your point, I'm just not in favor of leaving inconsistencies around since they are usually source of bugs. This error is not treated different by any caller, so I fail to see the point of having two error signaling paths.
Done as suggested
Done as suggested
Yes. A quick way of getting a different hash. There wouldn't be a fork if blocks are the same.
Done as suggested
What I am proposing is not worse than todays behaviour. Today we already have two error channels: most
Open()failures returnnullptr, whilefs::create_directories()throws and escapes. The bug exists because that exception crosses the wrong boundary and gets swallowed by the P2P catch all. Preserving the exception untilBlockManagertranslates it would not introduce any inconsistency, rather it would put the exceptional path at the layer that actually knows the recovery semantics, while preserving error information.Logging does not preserve the error in the sense that matters here. A log line is a diagnostic side effect for humans, not error propagation. Once
Open()logs and returnsnullptr, the caller has lost cause and context.The reason I keep harping on this is because this PR itself assigns different contexts different recovery semantics. So “all file access errors are treated the same” is only true after the lower layer has already collapsed the information.
I think we both agree that a full cleanup is bigger than this PR, but I don’t agree that the only reasonable options are “change it all” or “keep consistency and collapse this into nullptr too.” Translating the existing throw at a block storage boundary is a valid incremental step, imo, as it fixes the swallowed error bug while preserving the information needed for a cleaner error model later.
It doesn't feel like we see eye to eye on this, though, so I'll leave my review at that.
Yes, I understand. I don't see the risk in renaming before changing permissions. Either changing the permissions will work fine, in which case nothing was gained. Or, changing the permissions will fail, in which case the test should fail anyway, and also nothing was gained by silently renaming back. In fact, it seems harmful, because it will silently be skipping the test.
A test failure should lead to a loud failure, not a silent skip.
Done as suggested
Done as suggested
I hopefully tackled all remaining feedback. Also added coverage for the
GETCFILTERSp2p path (swallowed exception) and the RPCgetrawtransactionandgettxspendingprevoutpaths (low-level filesystem exception reaching the user).Added coverage for
GETCFILTERS, and txindex + spendtxoindex.code review ACK 81cddf0d878a27b84c85db831be0165648b89e94
The changes look correct to me and the new coverage exercises the relevant failure paths well.
Seems to me the remaining compact-block announcement should likely get the same fatal-error treatment, but I'm also fine with handling it as a follow-up.
(nit: PR description needs slight adjustment now regarding commit order)
It seems to me compact-block announcements still abort on the same kind of failure:
github.com/bitcoin/bitcoin@dc282ff31d/src/net_processing.cpp (L5997-L5998)Is that deliberate, or could we use the same fatal-error style there?
nit: please see my suggestion above on how we can simplify the code after the assertion removal.
Yes, it is in the PR description. You probably forgot this one https://github.com/bitcoin/bitcoin/pull/35003#pullrequestreview-4072836130 and my reply https://github.com/bitcoin/bitcoin/pull/35003#issuecomment-4230097950.
As it is a style nit, will leave it as is for now.
only test changes since last review, re-ACK 81cddf0d878a27b84c85db831be0165648b89e94 🌊
Show signature
Signature:
in cfdcd3b3136b58e3815e8e1333da7d50fb668cfc: I don't think this recent force push is correct.
Not the target_path's parent is renamed, but the target_path itself.
in the first commit: Just like getdata, it would be kind to the peer to disconnect it, rather than silently not reply to the request?
I was thinking about tackling it in a separate PR because it would be good to cover all filter-related messages at once, not just this one. We disconnect inside
PrepareBlockFilterRequestfor all of them, but not in any of the subsequent lookups.ups, comment fixed.
reACK
768014068btest-doc-only re-ACK
768014068b🍏Show signature
Signature:
@rkrux @w0xlt @frankomosh @josibake can you take another look here?
Approach NACK
While I certainly appreciate the work @furszy has put into this, the PR in its current form is not the direction I think we should be going. I spent some time reading and thinking through a more comprehensive error handling strategy for the codebase in order to convince myself I'm not pushing back simply for aesthetics, and I am convinced removing exceptions from the low level file primitive and folding it into a
nullptris the wrong direction.I would much prefer something like this in, instead of the
FlatFileSeqcommit:This preserves the exception, and moves the translation of that error into
BlockManagerwhich I have argued is the appropriate layer for handling the exception. This directly solves the stated problem: exceptions were being swallowed at a higher layer and not handled. It solves the problem by handling the exception at the appropriate layer, without needing to touch the lower level file primitives.What my proposal does not address is the
BlockFilterIndexuses of FlatFileSeq. I think thats fine, as those are not in the critical path. I'd argue its even desirable, as we may want to have a different policy on how FlatFileSeq failures are handled there, further demonstrating the strength of this approach.I do understand that the approach in this PR was done with consistency in mind, but I don't think that is enough of a justification when the thing being made consistent is, as I've tried to argue here, a bad design.
Note: this is unrelated to error handling afaict and could be pulled out into its own PR with its own test, no?
Let's recall this pull has more than 150 comments and is sitting for 3 months (which is reasonable for its size). However, it doesn't seem to be getting traction and has outstanding issues, some of which are enough to NACK it.
So, I don't think the pull will be merged as-is. Even if it was merged, there'd be a bunch of follow-ups, so it would be good to decide how to address them before merge.
I think it would be good to step back and answer a meta question:
There are different answers:
Thanks for zooming out @maflcko , I think its helpful. I'll respond here, but this is starting to feel like a discussion that can be moved to an issue around error handling in general, considering the discussion now spans two PRs.
This is a policy question. I think its up to the caller to decide, which is why I've been pushing back on folding multiple errors into a nullptr, and pushing back on having the low level function abort instead of propagating the error up. Said differently, the answer to this question will change in the future, and it will likely be different for different callers.
I think we should stop swallowing errors with broad catch alls that do nothing. Instead, if we can't catch it, let it terminate. If we would prefer a graceful fatal shutdown instead, have broad catch all that executes a safe shut down. Even better, have each boundary own their own error handling policy as I recommend here: BlockManager should own storage errors, BlockfilterIndex should manage storage errors related to indexes, etc etc.
In each of these boundaries, if they have the information they need to know that a graceful fatal shutdown is possible/safe/etc, they can do that. If the cant make that call, they should allow the error to propagate.
Restating the discussion we already had: https://github.com/bitcoin/bitcoin/pull/35003#discussion_r3387729140.
Today, every filesystem error in
FlatFileSeq::Openis handled through the same path except for this one case. Your proposal @josibake keeps that one case special, how leaving a function with two error-signaling paths for the same class of failure makes sense to you? That is just error-prone. It doesn't really matter which kind of error we are talking about.Overall, following the by the books approach without pondering the actual sources is just bad in my view. And treating this bug fix PR as a broader architectural design discussion spot, instead of just creating a new issue or PR (as it was suggested in my first replies to you), is just blocking progress unnecessarily.
The PR is 97% about adding tests. It changes 5 lines of code in the node at most.
Sorry for being unclear, with size I didn't mean the LOC in
./src, but the review size, also approximated by the number of diverse tests. Let's recall that the exceptions involved here concern all threads:scheduler, indexes, initload,main, p2p, rpc, except for the script and fetcher threads. Also, the exceptions here (or the return value) can propagate up ~anywhere in the codebase (except maybe for wallet and unrelated low-level utils). So any reviewer must be familiar with the whole codebase.I can't provide an answer here, but I think reviewers should ask themselves the meta question (https://github.com/bitcoin/bitcoin/pull/35003#issuecomment-4925615702) and then hopefully there is rough consensus on the answer, whatever that will be.
@furszy @maflcko do you have suggestions on how to continue here? There are stale approvals, but I don't think the discussion was fully resolved. I'm still fine with patching this case.
I did not continue the discussion on the other PR to avoid blocking progress if others were happy with it. I'm generally not fan of nacking, while at the same time I disagree with the abrupt termination approach for the reasons stated there. I don't think it is safe to assume crashing at any point is harmless. And aborting from low-level objects/functions obscures it even more in my view, and could affect other running systems like the wallet that may not be affected.
I think we stalled here due to #36101 rather than any concrete drawback from this approach. Plus no one really wants to move
AutoFileto throw exceptions at this point in time, as it is not clear the advantages we will get from it.At least in my view, this PR seems the pragmatic approach, as it follows our current code structure, the
AutoFilecontract (file opening errors presented asAutoFile ::IsNull()), introduces lot of test coverage, and can easily evolve to any other error handling mechanism we decide to adopt in the future.Yeah, same. I think it is fine to patch. I don't care too much about the implementation details (exceptions vs return values), but I think the current blockers for me is explained in https://github.com/bitcoin/bitcoin/pull/35676#discussion_r3588398949: It introduces a regression for indexes, and I think it is unclear if people want to fully fix this class of problem (i.e. merge #35676 in some way or another, or if #35676 should be closed for some given rationale ...)
One concern I see here is the behavior of
getrawtransactionwith-txindex: when the blocks directory is missing and cannot be recreated, it previously reported a filesystem error. With the newif (!read_only) guard, it instead reports that the transaction wasn’t found.#35728 would address this regression as well as related issues already present on master. The
CheckDiskSpace()issues also predate this PR, and #35676 proposes handling them by explicitly aborting. However, its overlapping changes toFlatFileSeq::Open()would need to be reconciled with the approach here.🟠 Minor · Use component-aware containment for the test target
common.cpp:160 still uses a raw string starts_with check, so a sibling path sharing the root's prefix passes the guard. Every current caller passes paths under m_path_root (the unique per-test datadir), so this is a weak guard, not an active hazard.
Location:
src/test/util/common.cpp:156(head).🔵 Suggestion · Write-open failure coverage is skipped on root and Windows
The permission-based write-open unit test passes without checking the new null-return behavior on Windows or root runs.
Location:
src/test/flatfile_tests.cpp:170(head).🔵 Suggestion · Connect-failure recovery assertions can pass without reconnecting
The connect-failure unit test accepts no-op success from ActivateBestChain, so its recovery assertions do not directly establish that the disconnected tip returns.
Location:
src/test/validation_chainstate_tests.cpp:212(head).Review coverage was incomplete.
Reviewed:
ec966ebaa86f· Full review report · Previous reportspermalink
Another point is that this is fixing the rare case (blocks on p2p are expected every ~10min or so), but the same i/o error is hit every ~5min via
CheckDiskSpace. Of course, there is no need to include this in this pull here, but at least there should be agreement what the expected user outcome in the other case should be. See the discussion in https://github.com/bitcoin/bitcoin/pull/35676 (discussion can continue in that closed thread).🐙 This pull request conflicts with the target branch and needs rebase.
🚧 At least one of the CI tasks failed.
Task
lint: https://github.com/bitcoin/bitcoin/actions/runs/41711678048/job/126181051799LLM reason (✨ experimental): CI failed the lint check because
src/test/util/common.cppis missing a trailing newline.Hints
Try to run the tests locally, according to the documentation. However, a CI failure may still
happen due to a number of reasons, for example:
Possibly due to a silent merge conflict (the changes in this pull request being
incompatible with the current code in the target branch). If so, make sure to rebase on the latest
commit of the target branch.
A sanitizer issue, which can only be found by compiling with the sanitizer and running the
affected test.
An intermittent issue.
Leave a comment here, if you need help tracking down a confusing failure.
Rebased post #35728 merge. I presume we may be able to proceed now? but I may be wrong too.
re
CheckDiskSpace: I think we can tackle it in a separate PR, and keep this one as is.