ElementsProject / lightning

Core Lightning — Lightning Network implementation focusing on spec compliance and performance
Other
2.84k stars 901 forks source link

bkpr-listaccountevents crashing and bringing down lightningd #7559

Closed grubles closed 2 months ago

grubles commented 2 months ago

Running CLN at a243f3c79c9224a0d631503da2e94c35335f6c86 on Alpine Linux ppc64le

When running bkpr-listaccountevents, the plugin seems to crash and since it's an important plugin it will shut down the entire node.

$ lightning-cli bkpr-listaccountevents

query failed: plugins/bkpr/recorder.c:148: SELECT  e.id, e.account_id, a.name, e.origin, e.tag, e.credit, e.debit, e.output_value,
e.currency, e.timestamp, e.blockheight, e.utxo_txid, e.outnum, e.spending_txid, e.payment_id, e.ignored, e.stealable, e.ev_desc, 
e.spliced FROM chain_events e LEFT OUTER JOIN accounts a ON e.account_id = a.id WHERE e.timestamp > ?  AND e.timestamp <= 
? ORDER BY e.timestamp, e.id;bookkeeper: Outstanding taken pointers: 0x7fff89b15238

{
   "code": -4,
   "message": "Plugin terminated before replying to RPC call."
}

2024-08-12T13:22:05.741Z **BROKEN** plugin-bookkeeper: Plugin marked as important, shutting down lightningd!  
grubles commented 2 months ago

I was able to reproduce this on ARM64 Fedora too.

$ lightning-cli --signet bkpr-listaccountevents
query failed: plugins/bkpr/recorder.c:168: SELECT  e.id, e.account_id, a.name, e.origin, e.tag, e.credit, e.debit, 
e.output_value, e.currency, e.timestamp, e.blockheight, e.utxo_txid, e.outnum, e.spending_txid, e.payment_id, e.ignored, 
e.stealable, e.ev_desc, e.spliced FROM chain_events e LEFT OUTER JOIN accounts a ON e.account_id = a.id WHERE 
e.timestamp > ?  AND e.timestamp <= ? ORDER BY e.timestamp, e.id;bookkeeper: Outstanding taken pointers: 0x3c1f9fe8
{
   "code": -4,
   "message": "Plugin terminated before replying to RPC call."
}
ShahanaFarooqui commented 2 months ago

I am also getting the same on Ubuntu 22.04.