Repository navigation
openingd: handle dev-memleak while waiting for master replies - #9790
Merged
daywalker90 merged 2 commits intoDec 1, 2026
Merged
daywalker90 merged 2 commits into
daywalker90 merged 2 commits into
Conversation
nGoline
previously approved these changes
Dec 1, 2026
Hold the `openchannel` / `openchannel2` hook on the fundee so `openingd` / `dualopend` blocks in `wire_sync_read(REQ_FD)`, then invoke `dev-memleak` before releasing the hook.
`openingd` and `dualopend` can block in `wire_sync_read(REQ_FD)` while a plugin hook (such as `openchannel` / `openchannel2`) delays master's reply. If `lightningd` sends `WIRE_OPENINGD_DEV_MEMLEAK` (or `WIRE_DUALOPEND_DEV_MEMLEAK`) during that window, the daemon failed with `STATUS_FAIL_MASTER_IO` (`Error parsing 6105: 1791`). Loop on dev-memleak messages at those `wire_sync_read(REQ_FD)` call sites, matching the existing pattern in `dualopend.c`.
daywalker90
force-pushed
the
fix/openingd-dev-memleak-wait
branch
from
December 1, 2026 15:53
8cc53cb to
d93e6d5
Compare
Collaborator
Author
|
Had to disable the test under VALGRIND since dev-memleak is disabled then. |
nGoline
approved these changes
Dec 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
openingdanddualopendcan block inwire_sync_read(REQ_FD)whilea plugin hook (such as
openchannel/openchannel2) delays master'sreply. If
lightningdsendsWIRE_OPENINGD_DEV_MEMLEAK(orWIRE_DUALOPEND_DEV_MEMLEAK) during that window, the daemon failedwith
STATUS_FAIL_MASTER_IO(Error parsing 6105: 1791).Loop on dev-memleak messages at those
wire_sync_read(REQ_FD)callsites, matching the existing pattern in
dualopend.c.Changelog-None