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

rpcclient: resolve all batch futures if Send fails

Public commit record

What the developer wrote

Authored by Boris Nagaev

83/100 · Strong
rpcclient: resolve all batch futures if Send fails

Batch requests were only clearing batchList on Send() errors. The
per-request futures remained unresolved, so callers waiting on Receive
could block forever after a failed batch round trip.

Add failBatchRequests to fan out the Send() error to every queued batch
request and clear tracking state in one place. A regression test now
verifies queued futures complete with the same error returned by Send().
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
The short version

What changed, and why it matters

This commit fixes a bug in btcd's RPC batch client. Previously, if sending a batch of RPC requests failed (for example, due to a network or server error), the client would clear its internal list of batched requests but would never signal the failure to each individual request's 'future' result object. Callers waiting for results could therefore block forever. The patch adds a helper that fans out the Send() error to every queued request and clears tracking state in one place, plus a regression test verifying queued futures complete with the same error.

Recommended action

Treat this as a reliability/availability fix rather than an active exploit. Users relying on batch RPC should upgrade to the patched version to avoid stuck goroutines and leaked waiters when RPC batch submissions fail. Review any long-running services using batch mode for symptoms of goroutine accumulation or stuck Receive calls.

Security signals we found

01

Denial-of-service via indefinite caller blocking on RPC batch failure

02

Resource exhaustion from goroutines waiting on unresolved futures

03

Missing error propagation in asynchronous batch request path

Risk score

Why this scored 50/100

Our methodology →
Potential impact 12/30
Exploitability 8/25
Stealth signal 10/15
Affected reach 8/15
Confidence 8/10
Evidence quality 4/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.