ElementsProject/lightning

renepay crash on `linearize_channel`

daywalker90 opened this issue · 2 comments

@Lagrang3 running master@855d736

trying a payment on testnet to boltz.exchange again:

Aug 06 13:40:01  lightningd: cln-renepay: plugins/renepay/mcf.c:472: linearize_channel: Assertion `amount_msat_less_eq(extra_half->htlc_total, extra_half->known_max)' failed.
Aug 06 13:40:01  lightningd: cln-renepay: FATAL SIGNAL 6 (version v24.05-217-g855d736)
Aug 06 13:40:01  lightningd: 0x55a95ea240f5 send_backtrace
Aug 06 13:40:01  lightningd:         common/daemon.c:33
Aug 06 13:40:01  lightningd: 0x55a95ea2417d crashdump
Aug 06 13:40:01  lightningd:         common/daemon.c:75
Aug 06 13:40:01  lightningd: 0x7fc87dc2504f ???
Aug 06 13:40:01  lightningd:         ./signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0
Aug 06 13:40:01  lightningd: 0x7fc87dc73e2c __pthread_kill_implementation
Aug 06 13:40:01  lightningd:         ./nptl/pthread_kill.c:44
Aug 06 13:40:01  lightningd: 0x7fc87dc24fb1 __GI_raise
Aug 06 13:40:01  lightningd:         ../sysdeps/posix/raise.c:26
Aug 06 13:40:01  lightningd: 0x7fc87dc0f471 __GI_abort
Aug 06 13:40:01  lightningd:         ./stdlib/abort.c:79
Aug 06 13:40:01  lightningd: 0x7fc87dc0f394 __assert_fail_base
Aug 06 13:40:01  lightningd:         ./assert/assert.c:92
Aug 06 13:40:01  lightningd: 0x7fc87dc1deb1 __GI___assert_fail
Aug 06 13:40:01  lightningd:         ./assert/assert.c:101
Aug 06 13:40:01  lightningd: 0x55a95ea04e69 linearize_channel
Aug 06 13:40:01  lightningd:         plugins/renepay/mcf.c:472
Aug 06 13:40:01  lightningd: 0x55a95ea054c9 init_linear_network
Aug 06 13:40:01  lightningd:         plugins/renepay/mcf.c:744
Aug 06 13:40:01  lightningd: 0x55a95ea066bf minflow
Aug 06 13:40:01  lightningd:         plugins/renepay/mcf.c:1648
Aug 06 13:40:01  lightningd: 0x55a95ea0b2c3 get_routes
Aug 06 13:40:01  lightningd:         plugins/renepay/routebuilder.c:213
Aug 06 13:40:01  lightningd: 0x55a95ea101a5 compute_routes_done
Aug 06 13:40:01  lightningd:         plugins/renepay/mods.c:765
Aug 06 13:40:01  lightningd: 0x55a95ea15925 handle_rpc_reply
Aug 06 13:40:01  lightningd:         plugins/libplugin.c:1013
Aug 06 13:40:01  lightningd: 0x55a95ea15ac9 rpc_read_response_one
Aug 06 13:40:01  lightningd:         plugins/libplugin.c:1199
Aug 06 13:40:01  lightningd: 0x55a95ea15b76 rpc_conn_read_response
Aug 06 13:40:01  lightningd:         plugins/libplugin.c:1223
Aug 06 13:40:01  lightningd: 0x55a95ea4196e next_plan
Aug 06 13:40:01  lightningd:         ccan/ccan/io/io.c:60
Aug 06 13:40:01  lightningd: 0x55a95ea41df9 do_plan
Aug 06 13:40:01  lightningd:         ccan/ccan/io/io.c:422
Aug 06 13:40:01  lightningd: 0x55a95ea41eb2 io_ready
Aug 06 13:40:01  lightningd:         ccan/ccan/io/io.c:439
Aug 06 13:40:01  lightningd: 0x55a95ea4376d io_loop
Aug 06 13:40:01  lightningd:         ccan/ccan/io/poll.c:455
Aug 06 13:40:01  lightningd: 0x55a95ea15ef5 plugin_main
Aug 06 13:40:01  lightningd:         plugins/libplugin.c:2225
Aug 06 13:40:01  lightningd: 0x55a95ea02c3b main
Aug 06 13:40:01  lightningd:         plugins/renepay/main.c:412
Aug 06 13:40:01  lightningd: 0x7fc87dc10249 __libc_start_call_main
Aug 06 13:40:01  lightningd:         ../sysdeps/nptl/libc_start_call_main.h:58
Aug 06 13:40:01  lightningd: 0x7fc87dc10304 __libc_start_main_impl
Aug 06 13:40:01  lightningd:         ../csu/libc-start.c:360
Aug 06 13:40:01  lightningd: 0x55a95ea01a50 ???
Aug 06 13:40:01  lightningd:         ???:0
Aug 06 13:40:01  lightningd: 0xffffffffffffffff ???
Aug 06 13:40:01  lightningd:         ???:0
Aug 06 13:40:01  lightningd: cln-renepay: FATAL SIGNAL 11 (version v24.05-217-g855d736)
Aug 06 13:40:01  lightningd: 0x55a95ea240f5 send_backtrace
Aug 06 13:40:01  lightningd:         common/daemon.c:33
Aug 06 13:40:01  lightningd: 0x55a95ea2417d crashdump
Aug 06 13:40:01  lightningd:         common/daemon.c:75
Aug 06 13:40:01  lightningd: 0x7fc87dc2504f ???
Aug 06 13:40:01  lightningd:         ./signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0
Aug 06 13:40:01  lightningd: 0x0 ???
Aug 06 13:40:01  lightningd:         ???:0
Aug 06 13:40:01  lightningd: INFO    plugin-cln-renepay: Killing plugin: exited during normal operation

This has also happened to me a couple of times in the past. I fixed a bug that could be related to this in #7357 or #7337, can't remember exactly now. I'll investigate, maybe produce a test case that breaks the old version in this way.

I tried the current master @ 9afc10b on testnet and i still hit this on every attempt.