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

Crash in v0.10.1-249-gc936540 #4891

Closed
rustyrussell opened this issue Oct 28, 2021 · 1 comment · Fixed by #4894
Closed

Crash in v0.10.1-249-gc936540 #4891

rustyrussell opened this issue Oct 28, 2021 · 1 comment · Fixed by #4894
Assignees
Labels
Milestone

Comments

@rustyrussell
Copy link
Contributor

Issue and Steps to Reproduce

Attempting to prepare a db_stmt outside of a transaction: wallet/wallet.c:2935
lightningd: FATAL SIGNAL 6 (version v0.10.1-249-gc936540-modded)
0x55e2bc7863af send_backtrace
	common/daemon.c:33
0x55e2bc786455 crashdump
	common/daemon.c:46
0x7fd8dd4d803f ???
	???:0
0x7fd8dd4d7fb7 ???
	???:0
0x7fd8dd4d9920 ???
	???:0
0x55e2bc72cdbf fatal
	lightningd/log.c:804
0x55e2bc760099 db_prepare_v2_
	wallet/db.c:794
0x55e2bc76e43a wallet_payment_store
	wallet/wallet.c:2918
0x55e2bc73bf75 payment_store
	lightningd/pay.c:514
0x55e2bc73c3d3 payment_failed
	lightningd/pay.c:627
0x55e2bc74883a fail_out_htlc
	lightningd/peer_htlcs.c:289
0x55e2bc749056 destroy_hout_subd_died
	lightningd/peer_htlcs.c:527
0x55e2bc7f33eb notify
	ccan/ccan/tal/tal.c:240
0x55e2bc7f38da del_tree
	ccan/ccan/tal/tal.c:402
0x55e2bc7f392c del_tree
	ccan/ccan/tal/tal.c:412
0x55e2bc7f392c del_tree
	ccan/ccan/tal/tal.c:412
0x55e2bc7f3c66 tal_free
	ccan/ccan/tal/tal.c:486
0x55e2bc7e3d26 io_close
	ccan/ccan/io/io.c:450
0x55e2bc7e3b5d do_plan
	ccan/ccan/io/io.c:401
0x55e2bc7e3bc6 io_ready
	ccan/ccan/io/io.c:417
0x55e2bc7e5d8c io_loop
	ccan/ccan/io/poll.c:445
0x55e2bc7244c7 io_loop_with_timers
	lightningd/io_loop_with_timers.c:21
0x55e2bc72a1fa main
	lightningd/lightningd.c:1112
0x7fd8dd4babf6 ???
	???:0
0x55e2bc700709 ???
	???:0
0xffffffffffffffff ???
	???:0
Log dumped in crash.log.20211027015325
@rustyrussell rustyrussell added this to the v0.10.2 milestone Oct 28, 2021
@cdecker
Copy link
Member

cdecker commented Oct 28, 2021

Seems like the the channeld subdaemons died while we were adding an HTLC, causing all dependent allocations to be freed, triggering the destructor to be called. We usually start a transaction when processing an event, however it seems in this case, going through the tal-chain we aren't.

Is there a good way to hook into the close event so we can wrap the cascade in a transaction as well? The alternative is to have a tiny wrapper around the destructor that just starts the DB transaction and commits it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants