Skip to content

Require Chrome 115 and Node.js 21 as minimum for multithreading - #28366

Open
juj wants to merge 1 commit into
emscripten-core:mainfrom
juj:require_chrome_115_node_21_for_threads
Open

juj wants to merge 1 commit into
emscripten-core:mainfrom
juj:require_chrome_115_node_21_for_threads

Conversation

@juj

@juj juj commented Nov 22, 2026

Copy link
Copy Markdown
Collaborator

Require Chrome 115 and Node.js 21 as minimum for multithreading, to work around https://crbug.com/1432453.

@juj

juj commented Nov 22, 2026

Copy link
Copy Markdown
Collaborator Author

Maybe we could land this in the short term to make -pthread imply -sMIN_CHROME_VERSION=115, i.e. Emscripten would automatically bump up the min browser version to work around the issue.

This also would have the help that it skips the multithreading tests on my CI for the time being, so I can separate other remaining Chrome test failures better.

@sbc100 sbc100 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I do like this idea.

My only concern would be for any folks out there that are actually deploying multi-threaded apps today and hoping to target these engines. How broke would they be today already? i.e. would these programs already be completely unusable on chrome < 115?

@juj

juj commented Nov 22, 2026

Copy link
Copy Markdown
Collaborator Author

My only concern would be for any folks out there that are actually deploying multi-threaded apps today and hoping to target these engines. How broke would they be today already? i.e. would these programs already be completely unusable on chrome < 115?

On my CI I have Chrome 113 as the oldest tested one, and it is failing several dozen multithreaded tests due to this issue.

The general impression I get is that it'd be pretty bad. But I think it could also depend on the expected return value from certain waits, since some of the registers get reset to zero. So some multithreaded content gets lucky.

This PR doesn't actually prevent people from running the output on old Chrome, if they so wish. Just that the min version auto-bump will trigger, and my CI will autoskip those failing MT tests.

@juj

juj commented Nov 22, 2026

Copy link
Copy Markdown
Collaborator Author

Even if we land this now, someone could still later work on patching up older Chromes (e.g. via a Binaryen outlining pass), and then relax the requirement that this is imposing.

@sbc100

sbc100 commented Nov 22, 2026

Copy link
Copy Markdown
Collaborator

My only concern would be for any folks out there that are actually deploying multi-threaded apps today and hoping to target these engines. How broke would they be today already? i.e. would these programs already be completely unusable on chrome < 115?

On my CI I have Chrome 113 as the oldest tested one, and it is failing several dozen multithreaded tests due to this issue.

The general impression I get is that it'd be pretty bad. But I think it could also depend on the expected return value from certain waits, since some of the registers get reset to zero. So some multithreaded content gets lucky.

This PR doesn't actually prevent people from running the output on old Chrome, if they so wish.

This almost true but not quite, since:

(a) Debug builds would assert on startup in minimum_runtime_check.js
(b) Other feature that depend on 115 could be enabled breaking the build on chrome < 115 in other ways.

Just that the min version auto-bump will trigger, and my CI will autoskip those failing MT tests.

True. And I do think we should land this. I just want to check in with a few emscripten users to make sure nobody is currently depending on this working.

I'd like to hear from @dschuff and @walkingeyerobot before landing..

@juj

juj commented Nov 22, 2026

Copy link
Copy Markdown
Collaborator Author

(a) Debug builds would assert on startup in minimum_runtime_check.js

Yeah, that's true. Indeed during development time that gate would trigger.. but for runtime release builds, those would be absent.

@kripken

kripken commented Nov 23, 2026

Copy link
Copy Markdown
Member

This generally makes sense to me, but like @sbc100 I am a little concerned about existing users that have not been hurt by this, and that just want to keep shipping the same thing as before. If we can make this overrideable (explicit flags to ask for threads + older version makes it all work, no debug assertions etc.), that would be good?

juj added a commit that referenced this pull request Nov 25, 2026
…115 (#28391)

This is a barebones simpler version of
#28366 that allows me
to get my CI to green on these tests.

CC @kripken , would this be good to land immediately? (we can then think
of what's the right way to address #28366 wider?)

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
juj added a commit to juj/emscripten that referenced this pull request Nov 29, 2026
juj added a commit to juj/emscripten that referenced this pull request Nov 30, 2026

This branch has not been deployed

No deployments
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.

3 participants