Skip to content

runtime_service: don't panic if to_background_tx fails to upgrade after chain removal#2248

Open
SAY-5 wants to merge 1 commit intoparitytech:mainfrom
SAY-5:say5/runtime-service-upgrade-3238
Open

runtime_service: don't panic if to_background_tx fails to upgrade after chain removal#2248
SAY-5 wants to merge 1 commit intoparitytech:mainfrom
SAY-5:say5/runtime-service-upgrade-3238

Conversation

@SAY-5
Copy link
Copy Markdown

@SAY-5 SAY-5 commented May 2, 2026

Fixes paritytech/smoldot#3238 (the same code path lives here at light-base/src/runtime_service.rs:1689).

When a chain object is removed concurrently with an in-flight SubscribeAll response, background.to_background_tx.upgrade() returns None and the unwrap() panics the runtime task — this is the panic users started hitting after upgrading to 3.1.1 in browser dapps. The receiver is going away anyway in that case; skip the response with continue.

…er chain removal

Signed-off-by: SAY-5 <say.apm35@gmail.com>
@cla-bot-2021
Copy link
Copy Markdown

cla-bot-2021 Bot commented May 2, 2026

User @SAY-5, please sign the CLA here.

Copy link
Copy Markdown
Contributor

@voliva voliva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not familiarised enough with the codebase, but I'm wondering... the .unwrap() has been there for quite a long time, and it hasn’t caused issues until 3.1.1.

To me, it looks like it was written based on an assumption that may no longer hold true, and that could matter. Simply turning it into a noop when background_tx.upgrade() returns None might have other implications as well.

My question is, what’s actually causing this channel to close instead of cleanly shutting down whatever process it was handling?

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.

Smoldot panic after initial parachain sync if the chain object was removed

2 participants