coffee-tools / folgore

Universal Bitcoin backend for core lightning with BIP 157 support full based on the btcli4j Kotlin plugin! Ah, yes it is written in Rust
BSD 3-Clause "New" or "Revised" License
8 stars 5 forks source link

plugin crash #47

Open vincenzopalazzo opened 10 months ago

vincenzopalazzo commented 10 months ago

This is another crash that I found

2023-09-02T20:23:32.109Z UNUSUAL plugin-folgore_plugin: client `bitcoind` return an error: code: -1, msg: JSON-RPC error: JSON decode error: EOF while parsing a string at line 1 column 6553487
2023-09-02T20:23:32.689Z UNUSUAL plugin-folgore_plugin: client `esplora` return an error: code: -1, msg: HttpResponse(404)
2023-09-02T20:23:32.730Z **BROKEN** lightningd: /home/vincent/github/folgore/target/debug/folgore_plugin error: bad response to getrawblockbyheight (bad 'result' field: Parsing '{result:': object does not have member result), response was {"error":{"code":-1,"data":null,"message":"HttpResponse(404)"},"id":"cln:getrawblockbyheight#65","jsonrpc":"2.0"}
2023-09-02T20:23:32.731Z **BROKEN** lightningd: FATAL SIGNAL 6 (version v23.08-17-g990096f)
vincenzopalazzo commented 9 months ago
09-23T10:57:31.190Z DEBUG   plugin-folgore_plugin: call get block by height
2023-09-23T10:57:31.201Z INFO    plugin-folgore_plugin: cln request {\"height\":808976}
2023-09-23T10:57:31.212Z DEBUG   plugin-folgore_plugin: JSON-RPC request: getblockcount []
2023-09-23T10:57:46.534Z DEBUG   plugin-folgore_plugin: JSON-RPC failed parsing reply of getblockcount: JsonRpc(Transport(SocketError(Os { code: 11, kind: WouldBlock, message: \"Resource temporarily unavailable\" })))
2023-09-23T10:57:46.550Z UNUSUAL plugin-folgore_plugin: client `bitcoind` return an error: code: -1, msg: JSON-RPC error: transport error: Couldn't connect to host: Resource temporarily unavailable (os error 11)
2023-09-23T10:57:46.565Z DEBUG   plugin-folgore_plugin: pulling stream from pool: https|mempool.space|443 -> Stream(RustlsStream)
2023-09-23T10:57:46.575Z DEBUG   plugin-folgore_plugin: peek on reused connection returned 1, not WouldBlock; discarding
2023-09-23T10:57:46.585Z DEBUG   plugin-folgore_plugin: dropping stream from pool; closed by server: Stream(RustlsStream)
2023-09-23T10:57:46.595Z DEBUG   plugin-folgore_plugin: dropping stream: Stream(RustlsStream)
2023-09-23T10:57:46.605Z DEBUG   plugin-folgore_plugin: connecting to mempool.space:443 at [2001:df6:7280::92:206]:443
2023-09-23T10:58:08.979Z DEBUG   gossipd: seeker: no peers, waiting
2023-09-23T10:58:16.568Z UNUSUAL plugin-folgore_plugin: client `esplora` return an error: code: -1, msg: Ureq(Transport(Transport { kind: Io, message: None, url: Some(Url { scheme: \"https\", cannot_be_a_base: false, username: \"\", password: None, host: Some(Domain(\"mempool.space\")), port: None, path: \"/api/v1/blocks/tip/height\", query: None, fragment: None }), source: Some(Custom { kind: TimedOut, error: \"timed out reading response\" }) }))
2023-09-23T10:58:16.602Z **BROKEN** lightningd: /home/vincent/github/folgore/target/debug/folgore_plugin error: bad response to getrawblockbyheight (bad 'result' field: Parsing '{result:': object does not have member result), response was {"error":{"code":-1,"data":null,"message":"Ureq(Transport(Transport { kind: Io, message: None, url: Some(Url { scheme: \"https\", cannot_be_a_base: false, username: \"\", password: None, host: Some(Domain(\"mempool.space\")), port: None, path: \"/api/v1/blocks/tip/height\", query: None, fragment: None }), source: Some(Custom { kind: TimedOut, error: \"timed out reading response\" }) }))"},"id":"cln:getrawblockbyheight#10080","jsonrpc":"2.0"}
2023-09-23T10:58:16.632Z **BROKEN** lightningd: FATAL SIGNAL 6 (version v23.08-17-g990096f)

Related to this.

Looks like that the retry strategy do not work at all

vincenzopalazzo commented 5 months ago

This looks unrelated, but it is good to take a look at it

ORMAL: connecting subd
2024-02-06T20:55:25.243Z DEBUG   02312627fdf07fbdd7e5ddb136611bdde9b00d26821d14d94891395452f67af248-channeld-chan#77: pid 148407, msgfd 83
2024-02-06T20:55:25.245Z DEBUG   02312627fdf07fbdd7e5ddb136611bdde9b00d26821d14d94891395452f67af248-chan#77: Already have funding locked in
2024-02-06T20:55:25.246Z UNUSUAL 02312627fdf07fbdd7e5ddb136611bdde9b00d26821d14d94891395452f67af248-chan#77: Ignoring fee limits!
2024-02-06T20:55:27.153Z **BROKEN** lightningd: FATAL SIGNAL 11 (version v23.11-312-g4fc9e71)
2024-02-06T20:55:27.155Z **BROKEN** lightningd: backtrace: common/daemon.c:38 (send_backtrace) 0x19f379
2024-02-06T20:55:27.171Z **BROKEN** lightningd: backtrace: common/daemon.c:75 (crashdump) 0x19f3b9
2024-02-06T20:55:27.172Z **BROKEN** lightningd: backtrace: (null):0 ((null)) 0x4b4776f
2024-02-06T20:55:27.173Z **BROKEN** lightningd: backtrace: bitcoin/short_channel_id.c:96 (towire_short_channel_id) 0x1bac19
2024-02-06T20:55:27.174Z **BROKEN** lightningd: backtrace: channeld/channeld_wiregen.c:287 (towire_channeld_init) 0x1d9b22
2024-02-06T20:55:27.176Z **BROKEN** lightningd: backtrace: lightningd/channel_control.c:1588 (peer_start_channeld) 0x12de3c
2024-02-06T20:55:27.177Z **BROKEN** lightningd: backtrace: lightningd/peer_control.c:1309 (connect_activate_subd) 0x161d76
2024-02-06T20:55:27.178Z **BROKEN** lightningd: backtrace: lightningd/peer_control.c:1408 (peer_connected_hook_final) 0x164a2d
2024-02-06T20:55:27.179Z **BROKEN** lightningd: backtrace: lightningd/plugin_hook.c:194 (plugin_hook_call_next) 0x1746ea
2024-02-06T20:55:27.180Z **BROKEN** lightningd: backtrace: lightningd/plugin_hook.c:169 (plugin_hook_callback) 0x1748aa
2024-02-06T20:55:27.181Z **BROKEN** lightningd: backtrace: lightningd/plugin.c:662 (plugin_response_handle) 0x16ef6f
2024-02-06T20:55:27.182Z **BROKEN** lightningd: backtrace: lightningd/plugin.c:774 (plugin_read_json_one) 0x17274d
2024-02-06T20:55:27.183Z **BROKEN** lightningd: backtrace: lightningd/plugin.c:825 (plugin_read_json) 0x1729e6
2024-02-06T20:55:27.184Z **BROKEN** lightningd: backtrace: ccan/ccan/io/io.c:59 (next_plan) 0x30929a
2024-02-06T20:55:27.185Z **BROKEN** lightningd: backtrace: ccan/ccan/io/io.c:407 (do_plan) 0x309721
2024-02-06T20:55:27.186Z **BROKEN** lightningd: backtrace: ccan/ccan/io/io.c:417 (io_ready) 0x3097ba
2024-02-06T20:55:27.187Z **BROKEN** lightningd: backtrace: ccan/ccan/io/poll.c:453 (io_loop) 0x30b01a
2024-02-06T20:55:27.188Z **BROKEN** lightningd: backtrace: lightningd/io_loop_with_timers.c:22 (io_loop_with_timers) 0x146d27
2024-02-06T20:55:27.189Z **BROKEN** lightningd: backtrace: lightningd/lightningd.c:1420 (main) 0x14c270
2024-02-06T20:55:27.190Z **BROKEN** lightningd: backtrace: (null):0 ((null)) 0x4b30ccf
2024-02-06T20:55:27.191Z **BROKEN** lightningd: backtrace: (null):0 ((null)) 0x4b30d89
2024-02-06T20:55:27.192Z **BROKEN** lightningd: backtrace: (null):0 ((null)) 0x121ce4
2024-02-06T20:55:27.193Z **BROKEN** lightningd: backtrace: (null):0 ((null)) 0xffffffffffffffff

Ok this looks related to cln https://github.com/ElementsProject/lightning/issues/7039