Skip to content
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

pay crashes because "cannot find <unannounced peer>" #3607

Closed
fiatjaf opened this issue Mar 28, 2020 · 1 comment
Closed

pay crashes because "cannot find <unannounced peer>" #3607

fiatjaf opened this issue Mar 28, 2020 · 1 comment

Comments

@fiatjaf
Copy link
Contributor

fiatjaf commented Mar 28, 2020

Issue and Steps to Reproduce

You can use the invoice below to reproduce (but be sure to apply the parameters):

~> lightning-cli pay -k bolt11=lnbc3252500p1p087he3pp57t693zw9adv0a8lvv99zwvs7cl8ed0pkgul27jp09cra355vme9qhp5cv9ldqyn558mp063ays4n2af99cx2w787mlaqy0re75mn4mkpfeqxqyz5vqrzjq2ldrqfd8qj00nzve5ud5htx520ulmq5dl54ufkd9cxnlycdv5ag6zx804nsx6grqqqqqyy6qqqqqqqqqgsp5qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq9qy9qqqmxrzcgwy7qadlmgv3dmrrsl2e87dcxg7wdhpfs5vevkl4sy34ljpajmq7u7cjvj2r3cxxvxcktputmhmed7908jxqwfsxhgzluqnrcqp74xjh9 riskfactor=3 maxfeepercent=0.4 exemptfee=3000

That causes the following error:

2020-03-28T14:30:25.570Z INFO gossipd: find_route: cannot find 032cbe7d2b0147b494424505e17e6878dfe18bc6e6e68d7b33ed89e525094c6cdc
pay: FATAL SIGNAL 11 (version v0.8.0-371-g8c984fb)
0x55e5f542511b send_backtrace
        common/daemon.c:39
0x55e5f54251c1 crashdump
        common/daemon.c:52
0x7f83e1561f1f ???
        ???:0
0x55e5f5426b92 json_get_member
        common/json.c:299
0x55e5f5412e2e maybe_exclude
        plugins/pay.c:701
0x55e5f541350c getroute_done
        plugins/pay.c:793
0x55e5f5417c7c handle_rpc_reply
        plugins/libplugin.c:542
0x55e5f5418244 rpc_read_response_one
        plugins/libplugin.c:645
0x55e5f5418335 rpc_conn_read_response
        plugins/libplugin.c:664
0x55e5f5438de7 next_plan
        ccan/ccan/io/io.c:59
0x55e5f5439964 do_plan
        ccan/ccan/io/io.c:407
0x55e5f54399a2 io_ready
        ccan/ccan/io/io.c:417
0x55e5f543bb68 io_loop
        ccan/ccan/io/poll.c:445
0x55e5f541a119 plugin_main
        plugins/libplugin.c:1194
0x55e5f5416842 main
        plugins/pay.c:1708
0x7f83e1544b96 ???
        ???:0
0x55e5f5410f49 ???
        ???:0
0xffffffffffffffff ???
        ???:0

However, calling just pay <bolt11> will succeed. Even removing just the exemptfee param will make the command above succeed.

getinfo output

{
   "id": "02c16cca44562b590dd279c942200bdccfd4f990c3a69fad620c10ef2f8228eaff",
   "alias": "@lntxbot",
   "color": "296683",
   "num_peers": 40,
   "num_pending_channels": 1,
   "num_active_channels": 39,
   "num_inactive_channels": 2,
   "address": [
      {
         "type": "ipv6",
         "address": "2a01:4f8:c0c:7b31::1",
         "port": 9735
      }
   ],
   "binding": [
      {
         "type": "ipv6",
         "address": "::",
         "port": 9735
      }
   ],
   "version": "v0.8.0-371-g8c984fb",
   "blockheight": 623329,
   "network": "bitcoin",
   "msatoshi_fees_collected": 870838,
   "fees_collected_msat": "870838msat",
   "lightning-dir": "/home/fiatjaf/.lightning/bitcoin"
}
niftynei added a commit to niftynei/lightning that referenced this issue Apr 7, 2020
Fixes (?) ElementsProject#3607

Changelog-Fixed: Fix crash in pay when attempting to find cheaper route with exemptfee
@niftynei
Copy link
Contributor

niftynei commented Apr 7, 2020

Looks like it's caused by no route being found to try excluding when the fees are above the exemptfee amount you've set. I patched it to check for nulls before attempting an exclude, if you've got a testcase to try it out against that'd be great.

This was referenced Apr 8, 2020
cdecker pushed a commit that referenced this issue Apr 8, 2020
Fixes (?) #3607

Changelog-Fixed: Fix crash in pay when attempting to find cheaper route with exemptfee
@cdecker cdecker closed this as completed Apr 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants