Fix askrene getroutes crash#9217
Open
Lagrang3 wants to merge 2 commits into
Open
Conversation
Changelog-None Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
``` cln-askrene: plugins/askrene/child/child.c:40: final_hop: Assertion `tal_count(hops) > 0' failed. cln-askrene: FATAL SIGNAL 6 (version v26.06-19-g46b039d) lightningd-1 2026-06-15T12:34:26.296Z DEBUG plugin-cln-askrene: notify msg debug: Final answer has 1 flows 0x55ab65429902 send_backtrace common/daemon.c:38 0x55ab6542998c crashdump common/daemon.c:83 0x7fbc84a8bdef ??? ./signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0 0x7fbc84ae095c __pthread_kill_implementation ./nptl/pthread_kill.c:44 0x7fbc84a8bcc1 __GI_raise ../sysdeps/posix/raise.c:26 0x7fbc84a744ab __GI_abort ./stdlib/abort.c:77 0x7fbc84a7441f __assert_fail_base ./assert/assert.c:118 0x55ab6541b60c final_hop plugins/askrene/child/child.c:40 0x55ab6541b70d fmt_route plugins/askrene/child/child.c:48 0x55ab6541ba5b convert_flows_to_routes plugins/askrene/child/child.c:135 0x55ab6541c037 run_child plugins/askrene/child/child.c:265 0x55ab65416caa do_getroutes plugins/askrene/askrene.c:711 0x55ab65416d28 begin_request plugins/askrene/askrene.c:887 0x55ab654170a2 json_getroutes plugins/askrene/askrene.c:968 0x55ab654285ec ld_command_handle plugins/libplugin.c:2206 0x55ab654287f6 ld_read_json plugins/libplugin.c:2282 0x55ab65439261 next_plan ccan/ccan/io/io.c:60 0x55ab65439580 do_plan ccan/ccan/io/io.c:422 0x55ab65439639 io_ready ccan/ccan/io/io.c:439 0x55ab6543a5fc io_loop ccan/ccan/io/poll.c:470 0x55ab65428bc4 plugin_main plugins/libplugin.c:2481 0x55ab65417491 main plugins/askrene/askrene.c:1551 0x7fbc84a75ca7 __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 0x7fbc84a75d64 __libc_start_main_impl ../csu/libc-start.c:360 0x55ab65413920 ??? _start+0x20:0 0xffffffffffffffff ??? ???:0 ``` Changelog-Fixed: askrene-getroutes: don't crash on invalid user input, source==destination Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #9216.
Don't crash on wrong user input.
Produce an RPC error instead.