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

Fix race condition in `Postman` causing flaky `OfferPayment` tests (#3270)

Public commit record

What the developer wrote

Authored by Bastien Teinturier

100/100 · Strong
Fix race condition in `Postman` causing flaky `OfferPayment` tests (#3270)

The integration test "send blinded multi-part payment a->b->c (single
channel a->b)" in `OfferPaymentSpec` fails intermittently. The root
cause is a race condition in `Postman` where the subscription for an
onion message reply is registered after the message is sent, allowing
the reply to arrive and be silently dropped before the subscription
exists.

In integration tests where all 3 nodes run on the same JVM, the onion
message round-trip (Alice -> Bob -> Carol -> creates invoice -> Carol
-> Bob -> Alice) can complete in just a few milliseconds - fast enough
to beat the `Subscribe` message to the `Postman`'s mailbox.

This explains why the test is flaky: it usually works (round-trip slower
than subscribe), but occasionally fails (round-trip faster than
subscribe, reply dropped).

We simply move the subscription registration to *before* the message is
sent to the network.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This commit fixes a timing bug in Eclair's message-delivery component called Postman. When sending an onion message that expects a reply, the code used to register for the reply *after* sending the message. In fast local tests (and potentially fast real networks), the reply could arrive before the registration completed, causing the reply to be lost. The fix registers the subscription *before* sending the message. The commit describes this as a test flakiness issue, not a security vulnerability.

Recommended action

Treat as a reliability/timing fix rather than an urgent security patch. Review whether lost replies could affect any production protocol flows (e.g., BOLT 12 offer payments) that rely on timely replies, and consider adding metrics or logging for dropped replies. No immediate exploit mitigation is required.

Security signals we found

01

Race condition in message-reply handling

02

Potential silent loss of expected onion message replies

03

No input validation, authentication, or cryptographic changes

04

Fix is described by the vendor as test flakiness, not a security bug

Risk score

Why this scored 33/100

Our methodology →
Potential impact 8/30
Exploitability 3/25
Stealth signal 6/15
Affected reach 5/15
Confidence 7/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.