test: display abrupt shutdown errors in console output#28253
test: display abrupt shutdown errors in console output#28253fanquake merged 1 commit intobitcoin:masterfrom
Conversation
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code CoverageFor detailed information about the code coverage, see the test coverage report. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. |
|
Concept ACK |
|
The CI uses the combine logs helper. Can you link to a CI output before and after? |
Sure. Before https://github.com/furszy/bitcoin-core/runs/15887889073. No information provided. The commit causing the abrupt shutdown is the one shared in the PR description. |
maflcko
left a comment
There was a problem hiding this comment.
Ok, so this will only be hit when Bitcoin Core is completely non-functional and completely refuses to start (in create_cache.py)? In all other cases, this should already be printed.
2e6df14 to
6ac03a5
Compare
furszy
left a comment
There was a problem hiding this comment.
Updated per feedback. Thanks Marco.
Placed stderr error inside the thrown exception instead of printing it directly.
This is how the CI error looks now https://github.com/furszy/bitcoin-core/runs/16145060771.
6ac03a5 to
36b6f30
Compare
|
Updated per feedback. Thanks. Same CI result as before: https://github.com/furszy/bitcoin-core/runs/16146994349. |
|
Concept ACK. |
|
Concept ACK |
9923c59 to
2633152
Compare
|
Updated per feedback, thanks theStack! Diff is minimal. |
hebasto
left a comment
There was a problem hiding this comment.
ACK 2633152, tested on GHA:
- native macOS:
test_framework.test_node.FailedToStartError: [node 0] bitcoind exited with status -6 during initialization.
************************
'node0' abruptly aborted with error:
EXCEPTION: St11logic_error
I'm an ugly error. The blockchain is completely messed up.
bitcoin in initload
libc++abi: terminating due to uncaught exception of type std::logic_error: I'm an ugly error. The blockchain is completely messed up.
************************
2023-10-05T09:09:57.765000Z TestFramework (INFO): Stopping nodes
- native Windows:
test_framework.test_node.FailedToStartError: [node 0] bitcoind exited with status 3 during initialization.
************************
'node0' abruptly aborted with error:
EXCEPTION: class std::logic_error
I'm an ugly error. The blockchain is completely messed up.
D:\a\bitcoin\bitcoin\src\bitcoind.exe in initload
************************
2023-10-05T09:10:35.169000Z TestFramework (INFO): Stopping nodes
Making it easier to debug errors in the CI environment, particularly in scenarios where it's not immediately clear what happened nor which node crashed (or shutdown abruptly).
2633152 to
0f83ab4
Compare
|
Updated per feedback, small diff. |
|
lgtm ACK 0f83ab4 |
|
Nice. Just tested this to debug a crash and found it useful. |
Making it easier to debug errors in the CI environment,
particularly in scenarios where it's not immediately clear
what happened nor which node crashed (or shutdown abruptly).
A bit of context:
Currently, the test framework redirects each node's stderr output
stream to a different temporary file inside each node's data directory.
While this is sufficient for storing the error, it isn't very helpful for
understanding what happened just by reading the CI console output.
Most of the time, reading the stderr file in the CI environment is not
possible, because people don't have access to it.
Testing Note:
The displayed error difference can be observed by cherry-picking this
commit furszy@9cc5393 on top of this branch and running any
functional test.