Skip to content

Fix task-slot collision when pathfinding scores sync is enabled#986

Open
jkczyz wants to merge 1 commit into
lightningdevkit:mainfrom
jkczyz:2026-07-scores-sync-task-collision
Open

Fix task-slot collision when pathfinding scores sync is enabled#986
jkczyz wants to merge 1 commit into
lightningdevkit:mainfrom
jkczyz:2026-07-scores-sync-task-collision

Conversation

@jkczyz

@jkczyz jkczyz commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

The pathfinding scores sync task claimed the runtime's single background-processor slot, which LDK's background processor also claims later during startup. With a scores sync URL configured, node startup tripped a debug_assert in debug builds; in release builds the second spawn silently dropped the scores-sync task's join handle, so the task was detached and never joined at shutdown.

Spawn it as a regular background task instead: it already exits on the general stop signal, so it is now joined gracefully alongside the other background tasks in Node::stop.

Developed with assistance from Claude Code.

The pathfinding scores sync task claimed the runtime's single
background-processor slot, which LDK's background processor also claims
later during startup. With a scores sync URL configured, node startup
tripped a debug_assert in debug builds; in release builds the second
spawn silently dropped the scores-sync task's join handle, so the task
was detached and never joined at shutdown.

Spawn it as a regular background task instead: it already exits on the
general stop signal, so it is now joined gracefully alongside the other
background tasks in Node::stop.

Developed with assistance from Claude Code.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@ldk-reviews-bot

ldk-reviews-bot commented Jul 15, 2026

Copy link
Copy Markdown

👋 Thanks for assigning @joostjager as a reviewer!
I'll wait for their review and will help manage the review process.
Once they submit their review, I'll check if a second reviewer would be helpful.

@jkczyz jkczyz requested a review from joostjager July 15, 2026 02:20
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

Successfully merging this pull request may close these issues.

2 participants