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

crash when running undici's wpt runner in node v19 #45419

Closed
KhafraDev opened this issue Nov 11, 2022 · 2 comments · Fixed by #45444
Closed

crash when running undici's wpt runner in node v19 #45419

KhafraDev opened this issue Nov 11, 2022 · 2 comments · Fixed by #45444

Comments

@KhafraDev
Copy link
Member

KhafraDev commented Nov 11, 2022

Version

v19.0.1

Platform

Linux DESKTOP-L4O1H93 4.4.0-19041-Microsoft #1237-Microsoft Sat Sep 11 14:32:00 PST 2021 x86_64 x86_64 x86_64 GNU/Linux

Subsystem

No response

What steps will reproduce the bug?

git clone https://github.com/nodejs/undici.git
cd undici
npm i
npm run test:wpt

How often does it reproduce? Is there a required condition?

happens in v19.0.0, v19.0.1 and commit 916af4e

What is the expected behavior?

No response

What do you see instead?

$ npm run test:wpt

> undici@5.12.0 test:wpt
> node scripts/verifyVersion 18 || (node test/wpt/start-fetch.mjs && node test/wpt/start-FileAPI.mjs && node test/wpt/start-mimesniff.mjs && node test/wpt/start-xhr.mjs)

FATAL ERROR: v8::FromJust Maybe value is Nothing
FATAL ERROR: v8::FromJust Maybe value is Nothing
FATAL ERROR: v8::FromJust Maybe value is Nothing
 1: 0xbbf330 node::Abort() [node]
 1: 0xbbf330 node::Abort() [node]
 1: 0xbbf330 node::Abort() [node]
 2: 0xad455a node::FatalError(char const*, char const*) [node]
 2: 0xad455a node::FatalError(char const*, char const*) [node]
 2: 0xad455a node::FatalError(char const*, char const*) [node]
 3: 0xda413a v8::Utils::ReportApiFailure(char const*, char const*) [node]
 3: 0xda413a v8::Utils::ReportApiFailure(char const*, char const*) [node]
 3: 0xda413a v8::Utils::ReportApiFailure(char const*, char const*) [node]
 4: 0xf12388  [node]
 4: 0xf12388  [node]
 4: 0xf12388  [node]
 5: 0xc2c3e8 node::PerIsolatePlatformData::FlushForegroundTasksInternal() [node]
 5: 0xc2c3e8 node::PerIsolatePlatformData::FlushForegroundTasksInternal() [node]
 5: 0xc2c3e8 node::PerIsolatePlatformData::FlushForegroundTasksInternal() [node]
 6: 0xc2c896 node::NodePlatform::DrainTasks(v8::Isolate*) [node]
 6: 0xc2c896 node::NodePlatform::DrainTasks(v8::Isolate*) [node]
 6: 0xc2c896 node::NodePlatform::DrainTasks(v8::Isolate*) [node]
 7: 0xb03a49 node::SpinEventLoopInternal(node::Environment*) [node]
 7: 0xb03a49 node::SpinEventLoopInternal(node::Environment*) [node]
 7: 0xb03a49 node::SpinEventLoopInternal(node::Environment*) [node]
 8: 0xc911db node::worker::Worker::Run() [node]
 8: 0xc911db node::worker::Worker::Run() [node]
 8: 0xc911db node::worker::Worker::Run() [node]
 9: 0xc917a8  [node]
 9: 0xc917a8  [node]
 9: 0xc917a8  [node]
10: 0x7f6e4e3b5609  [/lib/x86_64-linux-gnu/libpthread.so.0]
10: 0x7f6e4e3b5609  [/lib/x86_64-linux-gnu/libpthread.so.0]
11: 0x7f6e4e2cf133 clone [/lib/x86_64-linux-gnu/libc.so.6]
Aborted (core dumped)

Additional information

No response

@KhafraDev
Copy link
Member Author

KhafraDev commented Nov 11, 2022

  • undici's wpt runner opens up a child_process and communicates with it via ipc, along with a Worker thread for each test. I haven't done any deeper investigation into what's causing the issue.
  • in the worker threads the file is eval'd using vm.runInThisContext
  • workers are run in parallel, but running sequentially doesn't fix the issue.

@KhafraDev KhafraDev changed the title segfault when running undici's wpt runner in node v19 crash when running undici's wpt runner in node v19 Nov 11, 2022
@targos
Copy link
Member

targos commented Nov 11, 2022

Stack with debug build:

FATAL ERROR: v8::FromJust Maybe value is Nothing
 1: 0x1026c2a54 node::DumpBacktrace(__sFILE*) [/Users/mzasso/git/nodejs/node/out/Debug/node]
 2: 0x102831f28 node::Abort() [/Users/mzasso/git/nodejs/node/out/Debug/node]
 3: 0x1028320c4 std::__1::shared_ptr<node::PerProcessOptions>::operator->() const [/Users/mzasso/git/nodejs/node/out/Debug/node]
 4: 0x102ca4ed8 v8::Utils::ReportApiFailure(char const*, char const*) [/Users/mzasso/git/nodejs/node/out/Debug/node]
 5: 0x102f9df24 v8::internal::(anonymous namespace)::DefaultWasmAsyncResolvePromiseTask::Run() [/Users/mzasso/git/nodejs/node/out/Debug/node]
 6: 0x10295ab28 node::PerIsolatePlatformData::RunForegroundTask(std::__1::unique_ptr<v8::Task, std::__1::default_delete<v8::Task> >) [/Users/mzasso/git/nodejs/node/out/Debug/node]
 7: 0x102958efc node::PerIsolatePlatformData::FlushForegroundTasksInternal() [/Users/mzasso/git/nodejs/node/out/Debug/node]
 8: 0x10295b070 node::NodePlatform::DrainTasks(v8::Isolate*) [/Users/mzasso/git/nodejs/node/out/Debug/node]
 9: 0x10263e7a8 node::SpinEventLoopInternal(node::Environment*) [/Users/mzasso/git/nodejs/node/out/Debug/node]
10: 0x102a2bff4 node::worker::Worker::Run() [/Users/mzasso/git/nodejs/node/out/Debug/node]
11: 0x102a33d34 node::worker::Worker::StartThread(v8::FunctionCallbackInfo<v8::Value> const&)::$_3::operator()(void*) const [/Users/mzasso/git/nodejs/node/out/Debug/node]
12: 0x102a33ce0 node::worker::Worker::StartThread(v8::FunctionCallbackInfo<v8::Value> const&)::$_3::__invoke(void*) [/Users/mzasso/git/nodejs/node/out/Debug/node]
13: 0x1a107206c _pthread_start [/usr/lib/system/libsystem_pthread.dylib]
14: 0x1a106ce2c thread_start [/usr/lib/system/libsystem_pthread.dylib]
[1]    44230 abort      /Users/mzasso/git/nodejs/node/out/Debug/node test/wpt/start-fetch.mjs

santigimeno added a commit to santigimeno/node that referenced this issue Nov 13, 2022
nodejs-github-bot pushed a commit that referenced this issue Nov 17, 2022
Fixes: #45419
PR-URL: #45444
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
ruyadorno pushed a commit that referenced this issue Nov 21, 2022
Fixes: #45419
PR-URL: #45444
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
marco-ippolito pushed a commit to marco-ippolito/node that referenced this issue Nov 23, 2022
Fixes: nodejs#45419
PR-URL: nodejs#45444
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
danielleadams pushed a commit that referenced this issue Dec 30, 2022
Fixes: #45419
PR-URL: #45444
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
danielleadams pushed a commit that referenced this issue Dec 30, 2022
Fixes: #45419
PR-URL: #45444
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
danielleadams pushed a commit that referenced this issue Jan 3, 2023
Fixes: #45419
PR-URL: #45444
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
danielleadams pushed a commit that referenced this issue Jan 4, 2023
Fixes: #45419
PR-URL: #45444
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
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 a pull request may close this issue.

2 participants