rgb-cln/lightningd
Rusty Russell e46b0ff886 lightningd: fix crash on rapid reconnect.
Happens occasionally when running
`tests/test_connection.py::test_mutual_reconnect_race` (which is too
flaky to add, without more fixes):


```
lightningd: lightningd/peer_control.c:1252: peer_active: Assertion `!channel->owner' failed.
lightningd: FATAL SIGNAL 6 (version v0.11.0.1-38-g4f167da)
0x5594a41f8f45 send_backtrace
	common/daemon.c:33
0x5594a41f8fef crashdump
	common/daemon.c:46
0x7f7cb585c08f ???
	/build/glibc-SzIz7B/glibc-2.31/signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0
0x7f7cb585c00b __GI_raise
	../sysdeps/unix/sysv/linux/raise.c:51
0x7f7cb583b858 __GI_abort
	/build/glibc-SzIz7B/glibc-2.31/stdlib/abort.c:79
0x7f7cb583b728 __assert_fail_base
	/build/glibc-SzIz7B/glibc-2.31/assert/assert.c:92
0x7f7cb584cfd5 __GI___assert_fail
	/build/glibc-SzIz7B/glibc-2.31/assert/assert.c:101
0x5594a41b45ca peer_active
	lightningd/peer_control.c:1252
0x5594a418794c connectd_msg
	lightningd/connect_control.c:457
0x5594a41cd457 sd_msg_read
	lightningd/subd.c:556
0x5594a41ccbe5 read_fds
	lightningd/subd.c:357
0x5594a4269fc2 next_plan
	ccan/ccan/io/io.c:59
0x5594a426abca do_plan
	ccan/ccan/io/io.c:407
0x5594a426ac0c io_ready
	ccan/ccan/io/io.c:417
0x5594a426ceff io_loop
	ccan/ccan/io/poll.c:453
0x5594a41930d9 io_loop_with_timers
	lightningd/io_loop_with_timers.c:22
0x5594a4199293 main
	lightningd/lightningd.c:1181
0x7f7cb583d082 __libc_start_main
	../csu/libc-start.c:308
0x5594a416e15d ???
	???:0
0xffffffffffffffff ???
	???:0
```
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2022-06-20 11:37:24 +09:30
..
test
.gitignore
Makefile
bitcoind.c
bitcoind.h
chaintopology.c
chaintopology.h
channel.c
channel.h
channel_control.c
channel_control.h
channel_state.h
closing_control.c
closing_control.h
coin_mvts.c
coin_mvts.h
connect_control.c connectd: disable advertizement of WEBSOCKET addresses. 2022-04-21 06:13:55 +09:30
connect_control.h
datastore.c
dual_open_control.c lightningd: don't crash listpeers if we're opening DF channel. 2022-04-21 20:45:32 +09:30
dual_open_control.h
gossip_control.c
gossip_control.h
hsm_control.c
hsm_control.h
htlc_end.c lightningd: fix overzealous check in htlc_out_check: 2022-04-20 16:30:05 +09:30
htlc_end.h
htlc_set.c
htlc_set.h
invoice.c
invoice.h
io_loop_with_timers.c
io_loop_with_timers.h
json.c
json.h
jsonrpc.c
jsonrpc.h
lightningd.c
lightningd.h
log.c
log.h
log_status.c
log_status.h
memdump.c
memdump.h
notification.c
notification.h
offer.c
onchain_control.c
onchain_control.h
onion_message.c
onion_message.h
opening_common.c
opening_common.h
opening_control.c
opening_control.h
options.c
options.h
pay.c
pay.h
peer_control.c lightningd: fix crash on rapid reconnect. 2022-06-20 11:37:24 +09:30
peer_control.h
peer_fd.c
peer_fd.h
peer_htlcs.c
peer_htlcs.h
ping.c
plugin.c
plugin.h
plugin_control.c
plugin_control.h
plugin_hook.c
plugin_hook.h
routehint.c
routehint.h
signmessage.c
subd.c
subd.h
watch.c
watch.h