Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FATAL archived threads in combination with wasm not supported #29767

Closed
jacott opened this issue Sep 29, 2019 · 12 comments
Closed

FATAL archived threads in combination with wasm not supported #29767

jacott opened this issue Sep 29, 2019 · 12 comments
Labels
v8 engine Issues and PRs related to the V8 dependency. wasm Issues and PRs related to WebAssembly.

Comments

@jacott
Copy link

jacott commented Sep 29, 2019

I get the following error when running the server tests for my package "koru"

server err: 

#
# Fatal error in , line 0
# archived threads in combination with wasm not supported
#
#
#
#FailureMessage Object: 0x7f1f90c8b760

This error has never occurred on any previous version of node.

To run the tests you need to have postgres and libpq-dev installed and have superuser access to postgres (sudo -u postgres createuser -drs $USER).

git clone https://github.com/jacott/koru.git
cd koru
npm i
createdb korutest
npm t -- --nodoc -s

The fatal error does not occur on any particular test as far as I can tell.

@addaleax addaleax added v8 engine Issues and PRs related to the V8 dependency. wasm Issues and PRs related to WebAssembly. labels Sep 29, 2019
@addaleax
Copy link
Member

Do you use Workers or any native addons (in node_modules or otherwise)? Is there any chance of getting a reproduction with fewer dependencies?

This may be a breaking change in V8 7.7 that we have overlooked.

/cc @nodejs/v8

@jacott
Copy link
Author

jacott commented Sep 29, 2019

If I comment out the test that uses the package "source-map" (app/koru/stack-error-convert-test.js) then all the tests pass. If I run the convert-test by itself it runs okay.

@jacott
Copy link
Author

jacott commented Sep 29, 2019

I don't use workers but I do use native addons: package fibers, pg-libpq and koru itself has a small napi file.

Other larger code bases that use koru but don't invoke the source-map code in their tests also run fine.

@devsnek
Copy link
Member

devsnek commented Sep 29, 2019

source-map uses wasm. I can try to debug this a bit when I'm back on my laptop later tonight.

@jacott
Copy link
Author

jacott commented Sep 30, 2019

Thanks! The problem is not consistent. It mostly fails but sometimes does not. I have also seen it fail when I just run app/koru/stack-error-convert-test.js but not very often. It always succeeds when that test is excluded.

@devsnek
Copy link
Member

devsnek commented Sep 30, 2019

tried looking into this a bit, not sure what is going on... going to need the v8 team i think

@hashseed
Copy link
Member

@jakobkummerow

@bnoordhuis
Copy link
Member

node-fibers hacks the thread-local storage to trick V8 into thinking it's running separate threads/isolates, that probably has something to do with it.

@backes
Copy link
Contributor

backes commented Sep 30, 2019

Can you please explain in which ways archived threads are used here? We did not expect users of that outside of chrome, and for the chrome use case we do not need to support WebAssembly.

Note that a workaround for node might be to disable wasm code gc by passing --no-wasm-code-gc.

@jacott
Copy link
Author

jacott commented Oct 1, 2019

using --no-wasm-code-gc does indeed appear to stop the problem occurring.

@jasnell
Copy link
Member

jasnell commented Jun 19, 2020

It does not appear that there's anything actionable here? Closing. Can reopen if necessary

@opyh
Copy link

opyh commented Oct 26, 2020

@bnoordhuis

node-fibers hacks the thread-local storage to trick V8 into thinking it's running separate threads/isolates, that probably has something to do with it.

Could you elaborate a bit so we can find out if this is fixable in node-fibers?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v8 engine Issues and PRs related to the V8 dependency. wasm Issues and PRs related to WebAssembly.
Projects
None yet
Development

No branches or pull requests

8 participants