AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Informational 19 Bitcoin

test: Test SIGTERM handling during waitforblockheight call

Public commit record

What the developer wrote

Authored by Ryan Ofsky

95/100 · Strong
test: Test SIGTERM handling during waitforblockheight call

Currently when CTRL-C is pressed and there is an active `waitforblockheight`,
or `waitforblock`, or `waitfornewblock` RPC call, or a mining interface
`waitTipChanged` IPC call with a long timeout, the node will not shut down
right away, and will wait for the timeout to be reached before exiting.

This behavior is not ideal and only happens when the node is stopped with
CTRL-C or SIGTERM. When the node is stopped with `bitcoin-cli stop`, the wait
calls are interrupted and the node does shut down right away.

The next commit improves node behavior. This commit just adds test coverage to
simplify the next commit and clarify the change in behavior there.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides detailed explanatory context✓ Mentions testing or verification
The short version

What changed, and why it matters

This commit only adds a new automated test. The test checks that when a user presses Ctrl-C (or sends SIGTERM) while the node is handling a long-running 'waitforblockheight' RPC call, the node currently does not shut down immediately and instead waits for the RPC to time out. The commit itself does not fix the problem; it only creates test coverage so a later commit can prove the fix works.

Recommended action

No immediate action required for this commit. Treat it as a regression test. Review the subsequent commit that the message references to confirm the actual fix for SIGTERM handling of wait RPCs and IPC waitTipChanged calls is implemented and also covered by this test.

Security signals we found

01

Denial-of-service-like shutdown delay: SIGTERM/CTRL-C is ignored until a long RPC timeout expires

02

Test-only commit: no production code change, only regression test added

03

Behavioral inconsistency between stop RPC and signal-based shutdown

Risk score

Why this scored 19/100

Our methodology →
Potential impact 2/30
Exploitability 0/25
Stealth signal 1/15
Affected reach 2/15
Confidence 9/10
Evidence quality 5/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.