-
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
Fix askrene 0 amount crash (and hopefully stop xpay calling that!) and over capacity crash #8024
Open
rustyrussell
wants to merge
7
commits into
ElementsProject:master
Choose a base branch
from
rustyrussell:guilt/askrene-zero
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Fix askrene 0 amount crash (and hopefully stop xpay calling that!) and over capacity crash #8024
rustyrussell
wants to merge
7
commits into
ElementsProject:master
from
rustyrussell:guilt/askrene-zero
Conversation
This file contains 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
rustyrussell
changed the title
Fix askrene 0 amount crash (and hopefully stop xpay calling that!)
Fix askrene 0 amount crash (and hopefully stop xpay calling that!) and over capacity crash
Jan 22, 2025
But don't allow it either. ``` Jan 19 13:18:52 boltz lightningd[2259911]: cln-askrene: plugins/askrene/algorithm.c:274: simple_feasibleflow: Assertion `amount > 0' failed. Jan 19 13:18:52 boltz lightningd[2259911]: cln-askrene: FATAL SIGNAL 6 (version v24.11.1-1-ge9dbdeb) Jan 19 13:18:52 boltz lightningd[2259911]: 0x5576e212b407 send_backtrace Jan 19 13:18:52 boltz lightningd[2259911]: common/daemon.c:33 Jan 19 13:18:52 boltz lightningd[2259911]: 0x5576e212b49e crashdump Jan 19 13:18:52 boltz lightningd[2259911]: common/daemon.c:75 Jan 19 13:18:52 boltz lightningd[2259911]: 0x7f964ba9251f ??? Jan 19 13:18:52 boltz lightningd[2259911]: ???:0 Jan 19 13:18:52 boltz lightningd[2259911]: 0x7f964bae69fc ??? Jan 19 13:18:52 boltz lightningd[2259911]: ???:0 Jan 19 13:18:52 boltz lightningd[2259911]: 0x7f964ba92475 ??? Jan 19 13:18:52 boltz lightningd[2259911]: ???:0 Jan 19 13:18:52 boltz lightningd[2259911]: 0x7f964ba787f2 ??? Jan 19 13:18:52 boltz lightningd[2259911]: ???:0 Jan 19 13:18:52 boltz lightningd[2259911]: 0x7f964ba7871a ??? Jan 19 13:18:52 boltz lightningd[2259911]: ???:0 Jan 19 13:18:52 boltz lightningd[2259911]: 0x7f964ba89e95 ??? Jan 19 13:18:52 boltz lightningd[2259911]: ???:0 Jan 19 13:18:52 boltz lightningd[2259911]: 0x5576e211695e simple_feasibleflow Jan 19 13:18:52 boltz lightningd[2259911]: plugins/askrene/algorithm.c:274 Jan 19 13:18:52 boltz lightningd[2259911]: 0x5576e2111495 minflow Jan 19 13:18:52 boltz lightningd[2259911]: plugins/askrene/mcf.c:1014 Jan 19 13:18:52 boltz lightningd[2259911]: 0x5576e210bc74 get_routes Jan 19 13:18:52 boltz lightningd[2259911]: plugins/askrene/askrene.c:414 Jan 19 13:18:52 boltz lightningd[2259911]: 0x5576e210c610 do_getroutes Jan 19 13:18:52 boltz lightningd[2259911]: plugins/askrene/askrene.c:615 Jan 19 13:18:52 boltz lightningd[2259911]: 0x5576e210cad8 listpeerchannels_done Jan 19 13:18:52 boltz lightningd[2259911]: plugins/askrene/askrene.c:741 Jan 19 13:18:52 boltz lightningd[2259911]: 0x5576e211b35a handle_rpc_reply Jan 19 13:18:52 boltz lightningd[2259911]: plugins/libplugin.c:1084 Jan 19 13:18:52 boltz lightningd[2259911]: 0x5576e211b54c rpc_read_response_one Jan 19 13:18:52 boltz lightningd[2259911]: plugins/libplugin.c:1388 Jan 19 13:18:52 boltz lightningd[2259911]: 0x5576e211b5fd rpc_conn_read_response Jan 19 13:18:52 boltz lightningd[2259911]: plugins/libplugin.c:1412 Jan 19 13:18:52 boltz lightningd[2259911]: 0x5576e214fe8f next_plan Jan 19 13:18:52 boltz lightningd[2259911]: ccan/ccan/io/io.c:60 Jan 19 13:18:52 boltz lightningd[2259911]: 0x5576e215036e do_plan Jan 19 13:18:52 boltz lightningd[2259911]: ccan/ccan/io/io.c:422 Jan 19 13:18:52 boltz lightningd[2259911]: 0x5576e215042b io_ready Jan 19 13:18:52 boltz lightningd[2259911]: ccan/ccan/io/io.c:439 Jan 19 13:18:52 boltz lightningd[2259911]: 0x5576e2151e2e io_loop Jan 19 13:18:52 boltz lightningd[2259911]: ccan/ccan/io/poll.c:455 Jan 19 13:18:52 boltz lightningd[2259911]: 0x5576e211cc29 plugin_main Jan 19 13:18:52 boltz lightningd[2259911]: plugins/libplugin.c:2488 Jan 19 13:18:52 boltz lightningd[2259911]: 0x5576e210cb38 main Jan 19 13:18:52 boltz lightningd[2259911]: plugins/askrene/askrene.c:1262 Jan 19 13:18:52 boltz lightningd[2259911]: 0x7f964ba79d8f ??? ``` Signed-off-by: Rusty Russell <[email protected]> Changelog-Fixed: JSON-RPC: `getroutes` will refuse, not crash, if asked to find a route fr 0msat.
Signed-off-by: Rusty Russell <[email protected]> Changelog-Fixed: JSON-RPC: `xpay` will refuse to make a 0msat payment (0msat invoice, partial payment, or manually-set on amountless invoice). Fixes: ElementsProject#8016
This (and bt_exit) are NULL for libplugin. We don't always want to crash! Signed-off-by: Rusty Russell <[email protected]>
Signed-off-by: Rusty Russell <[email protected]>
Shouldn't happen, but I can't *prove* it's impossible. Signed-off-by: Rusty Russell <[email protected]>
Signed-off-by: Rusty Russell <[email protected]>
…s negative. I'm not sure why this happens, and suspect it is caused by an issue elsewhere, so add some verbose debugging, don't crash. Signed-off-by: Rusty Russell <[email protected]> Fixes: ElementsProject#8017
rustyrussell
force-pushed
the
guilt/askrene-zero
branch
from
January 22, 2025 23:08
a2c99bb
to
e8e3a58
Compare
michael1011
approved these changes
Jan 24, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After some testing in production, this PR seems to fix both issues for us
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: #8017
Fixes: #8016