Skip to content

extension_host: Fix IS_WASM_THREAD being set for wrong threads#43005

Merged
Veykril merged 1 commit intomainfrom
veykril/push-ynwtrmxykoxo
Nov 18, 2025
Merged

extension_host: Fix IS_WASM_THREAD being set for wrong threads#43005
Veykril merged 1 commit intomainfrom
veykril/push-ynwtrmxykoxo

Conversation

@Veykril
Copy link
Member

@Veykril Veykril commented Nov 18, 2025

#40883 implemented this incorrectly. It was marking a random background thread as a wasm thread (whatever thread picked up the wasm epoch timer background task), instead of marking the threads that actually run the wasm extension.

This has two implications:

  1. it didn't prevent extension panics from tearing down as planned
  2. Worse, it actually made us hide legit panics in sentry for one of our background workers.

Now 2 still technically applies for all tokio threads after this, but we basically only use these for wasm extensions in the main zed binary.

Release Notes:

  • Fixed extension panics crashing Zed on Linux

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Nov 18, 2025
@Veykril Veykril force-pushed the veykril/push-ynwtrmxykoxo branch from 81f493e to a5577f3 Compare November 18, 2025 20:29
@Veykril
Copy link
Member Author

Veykril commented Nov 18, 2025

/cherry-pick stable

@Veykril Veykril enabled auto-merge (squash) November 18, 2025 20:39
@Veykril Veykril force-pushed the veykril/push-ynwtrmxykoxo branch from a5577f3 to d5dd5aa Compare November 18, 2025 21:41
@Veykril Veykril merged commit 94a43dc into main Nov 18, 2025
49 of 53 checks passed
@Veykril Veykril deleted the veykril/push-ynwtrmxykoxo branch November 18, 2025 23:49
github-actions bot pushed a commit that referenced this pull request Nov 18, 2025
)

#40883 implemented this
incorrectly. It was marking a random background thread as a wasm thread
(whatever thread picked up the wasm epoch timer background task),
instead of marking the threads that actually run the wasm extension.

This has two implications:
1. it didn't prevent extension panics from tearing down as planned
2. Worse, it actually made us hide legit panics in sentry for one of our
background workers.

Now 2 still technically applies for all tokio threads after this, but we
basically only use these for wasm extensions in the main zed binary.

Release Notes:

- Fixed extension panics crashing Zed on Linux
github-actions bot pushed a commit that referenced this pull request Nov 18, 2025
)

#40883 implemented this
incorrectly. It was marking a random background thread as a wasm thread
(whatever thread picked up the wasm epoch timer background task),
instead of marking the threads that actually run the wasm extension.

This has two implications:
1. it didn't prevent extension panics from tearing down as planned
2. Worse, it actually made us hide legit panics in sentry for one of our
background workers.

Now 2 still technically applies for all tokio threads after this, but we
basically only use these for wasm extensions in the main zed binary.

Release Notes:

- Fixed extension panics crashing Zed on Linux
Veykril added a commit that referenced this pull request Nov 19, 2025
) (cherry-pick to stable) (#43017)

Cherry-pick of #43005 to stable

----
#40883 implemented this
incorrectly. It was marking a random background thread as a wasm thread
(whatever thread picked up the wasm epoch timer background task),
instead of marking the threads that actually run the wasm extension.

This has two implications:
1. it didn't prevent extension panics from tearing down as planned
2. Worse, it actually made us hide legit panics in sentry for one of our
background workers.

Now 2 still technically applies for all tokio threads after this, but we
basically only use these for wasm extensions in the main zed binary.

Release Notes:

- Fixed extension panics crashing Zed on Linux

---------

Co-authored-by: Lukas Wirth <lukas@zed.dev>
Veykril added a commit that referenced this pull request Nov 19, 2025
) (cherry-pick to stable) (#43016)

Cherry-pick of #43005 to stable

----
#40883 implemented this
incorrectly. It was marking a random background thread as a wasm thread
(whatever thread picked up the wasm epoch timer background task),
instead of marking the threads that actually run the wasm extension.

This has two implications:
1. it didn't prevent extension panics from tearing down as planned
2. Worse, it actually made us hide legit panics in sentry for one of our
background workers.

Now 2 still technically applies for all tokio threads after this, but we
basically only use these for wasm extensions in the main zed binary.

Release Notes:

- Fixed extension panics crashing Zed on Linux

---------

Co-authored-by: Lukas Wirth <lukas@zed.dev>
11happy pushed a commit to 11happy/zed that referenced this pull request Dec 1, 2025
…-industries#43005)

zed-industries#40883 implemented this
incorrectly. It was marking a random background thread as a wasm thread
(whatever thread picked up the wasm epoch timer background task),
instead of marking the threads that actually run the wasm extension.

This has two implications:
1. it didn't prevent extension panics from tearing down as planned
2. Worse, it actually made us hide legit panics in sentry for one of our
background workers.

Now 2 still technically applies for all tokio threads after this, but we
basically only use these for wasm extensions in the main zed binary.

Release Notes:

- Fixed extension panics crashing Zed on Linux
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant