Skip to content

sql: fix BROKEN for large channelmoves tables.#9029

Draft
Lagrang3 wants to merge 1 commit intoElementsProject:masterfrom
Lagrang3:fix-sql
Draft

sql: fix BROKEN for large channelmoves tables.#9029
Lagrang3 wants to merge 1 commit intoElementsProject:masterfrom
Lagrang3:fix-sql

Conversation

@Lagrang3
Copy link
Copy Markdown
Collaborator

@Lagrang3 Lagrang3 commented Apr 3, 2026

Fixes issue #9024.
I am not sure this is the correct way to handle this.
I looked a bit at the code and run it step by step with gdb until I discovered this patch.
It fixes the node crash for me.

TODO:

  • add a regression test.

sql: plugins/sql.c:1749: refresh_by_created_index: Assertion `td->refresh_needs != REFRESH_UNNECESSARY' failed.
sql: FATAL SIGNAL 6 (version v26.04rc2)
0x5618e147892e send_backtrace
	common/daemon.c:38
0x5618e14789bb crashdump
	common/daemon.c:83
0x7f54d10ea04f ???
	./signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0
0x7f54d1138eec __pthread_kill_implementation
	./nptl/pthread_kill.c:44
0x7f54d10e9fb1 __GI_raise
	../sysdeps/posix/raise.c:26
0x7f54d10d4471 __GI_abort
	./stdlib/abort.c:79
0x7f54d10d4394 __assert_fail_base
	./assert/assert.c:94
0x7f54d10e2ec1 __GI___assert_fail
	./assert/assert.c:103
0x5618e1472725 refresh_by_created_index
	plugins/sql.c:1749
0x5618e14736af one_refresh_done
	plugins/sql.c:579
0x5618e1473932 limited_list_done
	plugins/sql.c:1738
0x5618e1477418 handle_rpc_reply
	plugins/libplugin.c:1093
0x5618e1477548 rpc_conn_read_response
	plugins/libplugin.c:1398
0x5618e147ec71 next_plan
	ccan/ccan/io/io.c:60
0x5618e147ef90 do_plan
	ccan/ccan/io/io.c:422
0x5618e147f049 io_ready
	ccan/ccan/io/io.c:439
0x5618e147ffae io_loop
	ccan/ccan/io/poll.c:470
0x5618e14786af plugin_main
	plugins/libplugin.c:2461
0x5618e1474b12 main
	plugins/sql.c:2219
0x7f54d10d5249 __libc_start_call_main
	../sysdeps/nptl/libc_start_call_main.h:58
0x7f54d10d5304 __libc_start_main_impl
	../csu/libc-start.c:360
0x5618e1470710 ???
	_start+0x20:0
0xffffffffffffffff ???
	???:0

Changelog-Fixed: sql: fix BROKEN for large channelmoves tables.

Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
@Lagrang3 Lagrang3 added this to the v26.04 milestone Apr 3, 2026
@Lagrang3 Lagrang3 added the 26.04 RC This PR needs to go into the next release candidate for 26.04 label Apr 3, 2026
@Lagrang3 Lagrang3 requested a review from rustyrussell April 3, 2026 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

26.04 RC This PR needs to go into the next release candidate for 26.04

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant