-
Notifications
You must be signed in to change notification settings - Fork 912
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'dev-forget-channel' on channel in state ONCHAIND_THEIR_UNILATERAL crashes lightningd #946
Comments
'dev-forget-channel' did work correctly for a channel in state CHANNELD_AWAITING_LOCKIN pi@raspberrypi ~ $ lightning-cli dev-forget-channel 031c527494f295220d26a1814c18e7db3f4f03203ce1a53a0b74b52ed570a3972a |
Could you please provide the log output? |
|
You could redirect the daemon output to a file using the following:
and then reattempt the |
this was in my ./lightning folder after I reproduced the issue. let me know if you want me to redirect manually and I will. |
Sadly that crash log does not include a backtrace. Could you try with the log? |
Here you go. It reports "success" just before crashing. |
I tried to replicate the issue, and I'm unable to do so. Could you maybe run the crashing instance in
That should intercept the crash and put you in a debug shell. I'd need a backtrace from you, the command |
here's the backtrace, but I was playing on mainnet, so I didn't include the core-dump. If you want that privately, I can work on that when I have time.
|
Oh, I see, you had an HTLC in flight while the channel was closing, that's ugly. I can add a safeguard to fail the command if we have HTLCs in flight, so that at least we don't crash anymore. |
I made sure the blockchain was up to date and then I tried again. Here is what I got: lightning-cli dev-forget-channel 02c119d2fd2e98a88f50d0d2ee4213255b7b8ec2be3a95f9aabd6afb09dd25b083 It crashed again. The |
Ok, it seems that the channel was closed successfully despite having an HTLC attached to it (payment went through apparently). We definitely need to clean up those channels as well. I'll add a check for HTLCs, so I'll add a check and clear HTLCs when forced. |
Thanks. I'll be happy to test it when you are ready. |
Just as a quick update, we opted not to merge #987 since using |
pi@raspberrypi ~ $lightning-cli listpeers
{ "peers" :
[
{ "id" : "02f6725f9c1c40333b67faea92fd211c183050f28df32cac3f9d69685fe9665432", "connected" : true, "netaddr" :
[ "104.198.32.198:9735" ], "channels" :
[
{ "state" : "CHANNELD_NORMAL", "owner" : "lightning_channeld", "short_channel_id" : "507492:1465:1", "funding_txid" : "bcaadfbadc0e072de11588c3164a75a5cdccd5a20a46ed77bbaddc7c4d25fff1", "msatoshi_to_us" : 44991075, "msatoshi_total" : 100002000, "dust_limit_satoshis" : 546, "max_htlc_value_in_flight_msat" : 18446744073709551615, "channel_reserve_satoshis" : 0, "htlc_minimum_msat" : 0, "to_self_delay" : 144, "max_accepted_htlcs" : 483 } ] },
{ "id" : "035f1498c929d4cefba4701ae36a554691f526ff60b1766badd5a49b3c8b68e1d8", "connected" : true, "netaddr" :
[ "78.63.23.25:9735" ], "channels" :
[
{ "state" : "CHANNELD_NORMAL", "owner" : "lightning_channeld", "short_channel_id" : "507147:1263:1", "funding_txid" : "943203a3f4678456bdc34a54ab80e4896368362b6a74b3a1a478b8f0fda34e51", "msatoshi_to_us" : 100001000, "msatoshi_total" : 100001000, "dust_limit_satoshis" : 546, "max_htlc_value_in_flight_msat" : 18446744073709551615, "channel_reserve_satoshis" : 0, "htlc_minimum_msat" : 0, "to_self_delay" : 144, "max_accepted_htlcs" : 483 } ] },
{ "id" : "02c119d2fd2e98a88f50d0d2ee4213255b7b8ec2be3a95f9aabd6afb09dd25b083", "connected" : false, "channels" :
[
{ "state" : "ONCHAIND_THEIR_UNILATERAL", "short_channel_id" : "507123:1172:1", "funding_txid" : "144698a9c2e0a3106f3d9b9de53143647f0fd282377cea438756a368a7f2a858", "msatoshi_to_us" : 150000000, "msatoshi_total" : 150000000, "dust_limit_satoshis" : 546, "max_htlc_value_in_flight_msat" : 18446744073709551615, "channel_reserve_satoshis" : 0, "htlc_minimum_msat" : 0, "to_self_delay" : 144, "max_accepted_htlcs" : 483 } ] },
{ "id" : "029efce538a7f6ba7873b1bd00e0028ca39a658b96af326d349fa45bfa34226073", "connected" : false, "channels" :
[
{ "state" : "CHANNELD_NORMAL", "short_channel_id" : "506897:1628:1", "funding_txid" : "958ca3ab5680972286ce2d7dce72583fb590fd373a2c34b997f291da234ac4c6", "msatoshi_to_us" : 100000000, "msatoshi_total" : 100000000, "dust_limit_satoshis" : 546, "max_htlc_value_in_flight_msat" : 18446744073709551615, "channel_reserve_satoshis" : 0, "htlc_minimum_msat" : 0, "to_self_delay" : 144, "max_accepted_htlcs" : 483 } ] } ] }
pi@raspberrypi ~ $ lightning-cli dev-forget-channel 02c119d2fd2e98a88f50d0d2ee4213255b7b8ec2be3a95f9aabd6afb09dd25b083
lightning-cli: reading response: Success
pi@raspberrypi ~ $ lightning-cli listpeers
lightning-cli: Connecting to 'lightning-rpc': Connection refused
The text was updated successfully, but these errors were encountered: