Repository navigation
Commit 1499d7d
plugin: Add FORGET_CHANNEL to stuck HSM types
Type 34 (WIRE_HSMD_FORGET_CHANNEL) is sent synchronously by
lightningd's delete_channel() once onchaind completes for a closed
channel. In bgsync mode no signer is attached and the StagingHsmServer
only answers the canned startup messages, so the request sits in the
stager forever and blocks lightningd's main loop.
Because the type was not sticky the node did not report itself as
stuck, so update_state called getinfo on the blocked lightningd and
the state poll stalled: no BlockSync self-preempt, no 60s stuck-grace
kill and no stuck webhook to summon the signer. The session then
idled until the 1h session wall. On EU bgsync this accounted for
~95% of the ~2,029 cap-hit sessions/day, with 1,936 "forgetting
peer" events/day repeating on every visit to the same nodes (Loki,
2026-10-12).
Marking the type stuck makes update_state skip the hanging getinfo,
fires the stuck webhook so the signer gets summoned, and kills the
session after ~60s instead of ~3,540s. The forget then commits for
good once a user session attaches the signer.1 parent 2239883 commit 1499d7d
1 file changed
Lines changed: 37 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| 112 | + | |
112 | 113 | | |
113 | 114 | | |
114 | 115 | | |
| |||
260 | 261 | | |
261 | 262 | | |
262 | 263 | | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
263 | 300 | | |
0 commit comments