Skip to content

master_sync_reply is racy #266

@cdecker

Description

@cdecker

master_sync_reply in channeld assumes that there is only one such call pending at any point in time. This may not always be true, since we have 3 places in which this is called in response to timers and/or incoming messages from the peer. io_wait is used on the peer messages, so concurrent peer triggered calls should be safe, but if we have a commit timer running, followed by a call triggered by a peer message we'll run into the following error:

lightning_channeld: channeld/channel.c:518: master_sync_reply: Assertion `!peer->handle_master_reply' failed.

This'll kill channeld, requiring a reconnect.

Metadata

Metadata

Assignees

Labels

Type::BugAn error, flaw, or fault that produces an incorrect or unexpected result

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions