Skip to content

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

Description

@KhafraDev

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

Activity

  1. KhafraDev commented on Nov 11, 2022

    @KhafraDev
    MemberAuthor
    • 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.
  2. changed the title [-]segfault when running undici's wpt runner in node v19[/-] [+]crash when running undici's wpt runner in node v19[/+] on Nov 11, 2022
  3. targos commented on Nov 11, 2022

    @targos
    Member

    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
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions