Skip to content

smite-scenarios: skip ping_pong for parked connections - #187

Merged
morehouse merged 1 commit into
masterfrom
handle_parked_connections
Aug 4, 2026
Merged

smite-scenarios: skip ping_pong for parked connections#187
morehouse merged 1 commit into
masterfrom
handle_parked_connections

Conversation

@morehouse

Copy link
Copy Markdown
Collaborator

A bug in CLN causes it to park the connection after receiving a channel_ready message with an incorrect channel_id. When this happens, CLN keeps the connection open until the 80s timeout elapses but is completely unresponsive until then.

Check error messages from the target to detect when CLN hits this case, and then skip the ping_pong sync to avoid flagging this known issue as a hang.

Ref: ElementsProject/lightning#9369

@morehouse
morehouse force-pushed the handle_parked_connections branch from 83f64b6 to 2ba0ba4 Compare August 3, 2026 16:49

@NishantBansal2003 NishantBansal2003 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Though I do think patches are a good fit for target specific fixes, since they avoid changing smites behavior for other targets and potentially masking their issues, the downside is that if LN implementation doesn't fix the issue in the next release and updates the patched file, we'll have to redo the patch

Comment thread smite-scenarios/src/scenarios.rs Outdated
match Message::decode(&msg_bytes)? {
Message::Pong(_) => return Ok(PingOutcome::Pong),
Message::Error(e) if stop_on_known_error && is_known_parked_error(&e) => {
let msg = e.message().unwrap_or_default().to_string();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit (optional)

Suggested change
let msg = e.message().unwrap_or_default().to_string();
let msg = e.message().unwrap_or("<non-utf8>").to_string();

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, thanks.

A bug in CLN causes it to park the connection after receiving a
channel_ready message with an incorrect channel_id.  When this happens,
CLN keeps the connection open until the 80s timeout elapses but is
completely unresponsive until then.

Check error messages from the target to detect when CLN hits this case,
and then skip the ping_pong sync to avoid flagging this known issue as a
hang.
@morehouse
morehouse force-pushed the handle_parked_connections branch from 2ba0ba4 to 0c54c28 Compare August 4, 2026 17:11
@morehouse

Copy link
Copy Markdown
Collaborator Author

Though I do think patches are a good fit for target specific fixes, since they avoid changing smites behavior for other targets and potentially masking their issues, the downside is that if LN implementation doesn't fix the issue in the next release and updates the patched file, we'll have to redo the patch

Yeah, unfortunately the patch for this one is a bit complex and touches many files. Maintaining that patch in our tree would likely be a burden. I'm also not confident that it will be merged upstream anytime soon.

I did verify that the error string we're matching against ("Wrong channel id") isn't emitted by any of the other implementations, so this change shouldn't affect them at all.

@morehouse
morehouse merged commit 2d63586 into master Aug 4, 2026
5 checks passed
@morehouse
morehouse deleted the handle_parked_connections branch August 4, 2026 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants