Repository navigation
Closed
Description
Issue and Steps to Reproduce
2018-04-01T05:28:42.394Z lightningd(1159): lightning_channeld-027eae72368a57dc9d0c26de4fce5637117e7968f422bdca3d169704fadf8b436b chan #957: peer_out WIRE_SHUTDOWN
2018-04-01T05:28:42.394Z lightning_gossipd(1167): Received channel_update for channel 515454:1348:0(1) now ACTIVE
2018-04-01T05:28:42.394Z lightningd(1159): lightning_channeld-027eae72368a57dc9d0c26de4fce5637117e7968f422bdca3d169704fadf8b436b chan #957: UPDATE WIRE_CHANNEL_SHUTDOWN_COMPLETE 2018-04-01T05:28:42.394Z lightning_gossipd(1167): Received channel_update for channel 515419:1416:0(0) now ACTIVE
2018-04-01T05:28:42.394Z lightningd(1159): lightning_channeld-027eae72368a57dc9d0c26de4fce5637117e7968f422bdca3d169704fadf8b436b chan #957: UPDATE WIRE_CHANNEL_SHUTDOWN_COMPLETE 2018-04-01T05:28:42.410Z lightningd(1159): lightning_closingd-027eae72368a57dc9d0c26de4fce5637117e7968f422bdca3d169704fadf8b436b chan #957: pid 17724, msgfd 19
2018-04-01T05:28:42.426Z lightningd(1159): 027eae72368a57dc9d0c26de4fce5637117e7968f422bdca3d169704fadf8b436b chan #957: State changed from CHANNELD_AWAITING_LOCKIN to CLOSINGD_SIGEXCHANGE
2018-04-01T05:28:42.426Z lightningd(1159): channel state CHANNELD_AWAITING_LOCKIN should be CHANNELD_SHUTTING_DOWN
2018-04-01T05:28:42.426Z lightningd(1159): FATAL SIGNAL 6 RECEIVED
2018-04-01T05:28:42.470Z lightningd(1159): backtrace: lightningd/log.c:494 (log_crash) 0x415f89
2018-04-01T05:28:42.470Z lightningd(1159): backtrace: (null):0 ((null)) 0x7fdb982e24af
2018-04-01T05:28:42.470Z lightningd(1159): backtrace: (null):0 ((null)) 0x7fdb982e2428
2018-04-01T05:28:42.470Z lightningd(1159): backtrace: (null):0 ((null)) 0x7fdb982e4029
2018-04-01T05:28:42.470Z lightningd(1159): backtrace: lightningd/log.c:592 (fatal) 0x4163da
2018-04-01T05:28:42.471Z lightningd(1159): backtrace: lightningd/channel.c:276 (channel_set_state) 0x409115
2018-04-01T05:28:42.471Z lightningd(1159): backtrace: lightningd/channel_control.c:106 (peer_start_closingd_after_shutdown) 0x409b4c
2018-04-01T05:28:42.471Z lightningd(1159): backtrace: lightningd/channel_control.c:137 (channel_msg) 0x409d28
2018-04-01T05:28:42.471Z lightningd(1159): backtrace: lightningd/subd.c:504 (sd_msg_read) 0x42b9c7
2018-04-01T05:28:42.472Z lightningd(1159): backtrace: lightningd/subd.c:330 (read_fds) 0x42b2dc
2018-04-01T05:28:42.472Z lightningd(1159): backtrace: ccan/ccan/io/io.c:59 (next_plan) 0x4644b0
2018-04-01T05:28:42.472Z lightningd(1159): backtrace: ccan/ccan/io/io.c:387 (do_plan) 0x464f87
2018-04-01T05:28:42.472Z lightningd(1159): backtrace: ccan/ccan/io/io.c:397 (io_ready) 0x464fc5
2018-04-01T05:28:42.472Z lightningd(1159): backtrace: ccan/ccan/io/poll.c:310 (io_loop) 0x46690f
2018-04-01T05:28:42.473Z lightningd(1159): backtrace: lightningd/lightningd.c:407 (main) 0x414739
2018-04-01T05:28:42.473Z lightningd(1159): backtrace: (null):0 ((null)) 0x7fdb982cd82f
2018-04-01T05:28:42.473Z lightningd(1159): backtrace: (null):0 ((null)) 0x403448
2018-04-01T05:28:42.473Z lightningd(1159): backtrace: (null):0 ((null)) 0xffffffffffffffff
getinfo output
{ "id" : "024bd94f0425590434538fd21d4e58982f7e9cfd8f339205a73deb9c0e0341f5bd", "port" : 9735, "address" :
[
{ "type" : "ipv4", "address" : "165.227.69.151", "port" : 9735 },
{ "type" : "ipv6", "address" : "2604:a880:800:a1::cbb:f001", "port" : 9735 } ], "version" : "v0.5.2-2016-11-21-2448-ge41d565", "blockheight" : 456652, "network" : "bitcoin" }
Metadata
Metadata
Assignees
Labels
No labels
Activity
cdecker commentedon Apr 1, 2018
Assigned this to our resident state machine expert @rustyrussell, I think it should be safe to just allow the state transition. Then again, I can't come up with a valid transition from
CHANNELD_SHUTTING_DOWN->CHANNELD_AWAITING_LOCKIN, did you restart the client while it was shutting down?Could you provide more logs?
robtex commentedon Apr 1, 2018
thanks.
no i'm afraid i just leave the lightningd to terminate at it's own will. i don't operate on that node until it has synced all blocks. i just leave it alone.
i have a while-loop that restarts lightningd when it stops, after archiving the last log.
now and then i git pull so next time it restarts i have a fresher lightningd, but i never manually stop or start it.
more logs? you can get a few others from previous crashes but they all look pretty much the same.
if i can enable more detailed logging or whatever could help, let me know how.
it does throw out a bunch of the
lightning_channeld: Writing out status 65520: Broken pipeon STDERR, but not sure when that happens.robtex commentedon Apr 1, 2018
three latest crashes (including the one previously posted)
cdecker commentedon Apr 1, 2018
I was mainly interested in seeing state transitions prior to getting into the locked up state that keeps failing.
My guess is that we managed to continue the shutdown process, but loaded the channel awaiting lockin from the DB somehow. You can probably recover by manually changing the DB entry's state, however that doesn't solve the underlying problem.
robtex commentedon Apr 1, 2018
sorry about the missing linebreaks in the log btw. saw that now.
it seems there are different channels getting shutdown now, so manual fixing a specific one probably won't help.
for the record my node is still trying to catch up and is at block 458128 right now. could that cause issues like this?
ZmnSCPxj commentedon Apr 1, 2018
I believe spec changed to allow
shutdownmessage before lock-in: lightning/bolts#355I have not managed to find a transition from
CHANNELD_AWAITING_LOCKINtoCHANNELD_SHUTTING_DOWNin our code: it should be possible given the spec allowsshutdownto be sent during lockin. Or, alternatively allow this direct transition fromCHANNELD_AWAITING_LOCKINtoCLOSINGD_SIGEXCHANGEYes, but, it is this reason, that the spec was changed to allow
shutdownto be sent even during lockin.channeld: accept SHUTDOWN before channel is locked.
channeld: accept SHUTDOWN before channel is locked.