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

Segfault on Mac OS X on Node 11.3.0 #24835

Closed
odinho opened this issue Dec 4, 2018 · 4 comments
Closed

Segfault on Mac OS X on Node 11.3.0 #24835

odinho opened this issue Dec 4, 2018 · 4 comments

Comments

@odinho
Copy link

odinho commented Dec 4, 2018

  • Version: 11.3.0
  • Platform: Mac OS X
  • Subsystem:

Node crashes when running the tests for webpack-dev-server. It seems hard to minimize the tests since it looks racy (I removed some tests, and it crashed, later it did not crash with the same tests running).

From what I'm able to tell, the crashers started when node/stable started choosing the 11 release instead of 10.

Test steps (probably, I'm on Linux)

  • git clone --depth=50 https://github.com/webpack/webpack-dev-server.git webpack-dev-server
  • cd webpack-dev-server
  • make sure node is version v11.3.0
  • npm test

You can also switch to a test-branch to get the exact version the linked Travis run was done with:

  • git fetch origin +refs/pull/1586/merge:
  • git checkout -qf FETCH_HEAD

Possible stack trace:

Core file '/cores/core.3236' (x86_64) was loaded.
(lldb) thread backtrace all
* thread #1, stop reason = signal SIGSTOP
  * frame #0: 0x00007fff5d6ec77a libsystem_kernel.dylib`__kill + 10
    frame #1: 0x0000000100a06bb4 node`uv_kill + 9
    frame #2: 0x00000001000b4516 node`node::Kill(v8::FunctionCallbackInfo<v8::Value> const&) + 239
    frame #3: 0x00000001002292a7 node`v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo*) + 567
    frame #4: 0x0000000100228876 node`v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<false>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, v8::internal::BuiltinArguments) + 566
    frame #5: 0x0000000100227f70 node`v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) + 288
    frame #6: 0x00000b3457ecfb7d
    frame #7: 0x00000b3457e8e458
    frame #8: 0x00000b3457e8e458
    frame #9: 0x00000b3457e8e458
    frame #10: 0x00000b3457e876a6
    frame #11: 0x00000b3457e8e458
    frame #12: 0x00000b3457e8e458
    frame #13: 0x00000b3457e876a6
    frame #14: 0x00000b3457e8e458
    frame #15: 0x00000b3457e8e458
    frame #16: 0x00000b3457e8ba89
    frame #17: 0x00000b3457e84b3e
    frame #18: 0x0000000100554db5 node`v8::internal::(anonymous namespace)::Invoke(v8::internal::Isolate*, bool, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, int, v8::internal::Handle<v8::internal::Object>*, v8::internal::Handle<v8::internal::Object>, v8::internal::Execution::MessageHandling, v8::internal::Execution::Target) + 629
    frame #19: 0x0000000100554aa6 node`v8::internal::Execution::Call(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, int, v8::internal::Handle<v8::internal::Object>*) + 166
    frame #20: 0x00000001001be0ac node`v8::Function::Call(v8::Local<v8::Context>, v8::Local<v8::Value>, int, v8::Local<v8::Value>*) + 460
    frame #21: 0x000000010003b078 node`node::InternalMakeCallback(node::Environment*, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*, node::async_context) + 148
    frame #22: 0x000000010000e2b0 node`node::AsyncWrap::MakeCallback(v8::Local<v8::Function>, int, v8::Local<v8::Value>*) + 132
    frame #23: 0x00000001000cfe4f node`node::(anonymous namespace)::ProcessWrap::OnExit(uv_process_s*, long long, int) + 323
    frame #24: 0x0000000100a06b2c node`uv__chld + 316
    frame #25: 0x0000000100a079f9 node`uv__signal_event + 137
    frame #26: 0x0000000100a0fabe node`uv__io_poll + 1809
    frame #27: 0x0000000100a0052a node`uv_run + 336
    frame #28: 0x0000000100041aeb node`node::Start(v8::Isolate*, node::IsolateData*, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&) + 831
    frame #29: 0x0000000100040c97 node`node::Start(uv_loop_s*, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&) + 330
    frame #30: 0x00000001000408fd node`node::Start(int, char**) + 243
    frame #31: 0x0000000100001034 node`start + 52
  thread #2, stop reason = signal SIGSTOP
    frame #0: 0x00007fff5d6edec2 libsystem_kernel.dylib`kevent + 10
    frame #1: 0x0000000100a0f6fc node`uv__io_poll + 847
    frame #2: 0x0000000100a0052a node`uv_run + 336
    frame #3: 0x00000001000ad8be node`node::WorkerThreadsTaskRunner::DelayedTaskScheduler::Run() + 292
    frame #4: 0x00007fff5d8286c1 libsystem_pthread.dylib`_pthread_body + 340
    frame #5: 0x00007fff5d82856d libsystem_pthread.dylib`_pthread_start + 377
    frame #6: 0x00007fff5d827c5d libsystem_pthread.dylib`thread_start + 13
  thread #3, stop reason = signal SIGSTOP
    frame #0: 0x00007fff5d6eccee libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x00007fff5d829662 libsystem_pthread.dylib`_pthread_cond_wait + 732
    frame #2: 0x0000000100a0b194 node`uv_cond_wait + 9
    frame #3: 0x00000001000ada0c node`node::TaskQueue<v8::Task>::BlockingPop() + 58
    frame #4: 0x00000001000ac1cd node`node::(anonymous namespace)::PlatformWorkerThread(void*) + 318
    frame #5: 0x00007fff5d8286c1 libsystem_pthread.dylib`_pthread_body + 340
    frame #6: 0x00007fff5d82856d libsystem_pthread.dylib`_pthread_start + 377
    frame #7: 0x00007fff5d827c5d libsystem_pthread.dylib`thread_start + 13
  thread #4, stop reason = signal SIGSTOP
    frame #0: 0x00007fff5d6eccee libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x00007fff5d829662 libsystem_pthread.dylib`_pthread_cond_wait + 732
    frame #2: 0x0000000100a0b194 node`uv_cond_wait + 9
    frame #3: 0x00000001000ada0c node`node::TaskQueue<v8::Task>::BlockingPop() + 58
    frame #4: 0x00000001000ac1cd node`node::(anonymous namespace)::PlatformWorkerThread(void*) + 318
    frame #5: 0x00007fff5d8286c1 libsystem_pthread.dylib`_pthread_body + 340
    frame #6: 0x00007fff5d82856d libsystem_pthread.dylib`_pthread_start + 377
    frame #7: 0x00007fff5d827c5d libsystem_pthread.dylib`thread_start + 13
  thread #5, stop reason = signal SIGSTOP
    frame #0: 0x00007fff5d6eccee libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x00007fff5d829662 libsystem_pthread.dylib`_pthread_cond_wait + 732
    frame #2: 0x0000000100a0b194 node`uv_cond_wait + 9
    frame #3: 0x00000001000ada0c node`node::TaskQueue<v8::Task>::BlockingPop() + 58
    frame #4: 0x00000001000ac1cd node`node::(anonymous namespace)::PlatformWorkerThread(void*) + 318
    frame #5: 0x00007fff5d8286c1 libsystem_pthread.dylib`_pthread_body + 340
    frame #6: 0x00007fff5d82856d libsystem_pthread.dylib`_pthread_start + 377
    frame #7: 0x00007fff5d827c5d libsystem_pthread.dylib`thread_start + 13
  thread #6, stop reason = signal SIGSTOP
    frame #0: 0x00007fff5d6eccee libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x00007fff5d829662 libsystem_pthread.dylib`_pthread_cond_wait + 732
    frame #2: 0x0000000100a0b194 node`uv_cond_wait + 9
    frame #3: 0x00000001000ada0c node`node::TaskQueue<v8::Task>::BlockingPop() + 58
    frame #4: 0x00000001000ac1cd node`node::(anonymous namespace)::PlatformWorkerThread(void*) + 318
    frame #5: 0x00007fff5d8286c1 libsystem_pthread.dylib`_pthread_body + 340
    frame #6: 0x00007fff5d82856d libsystem_pthread.dylib`_pthread_start + 377
    frame #7: 0x00007fff5d827c5d libsystem_pthread.dylib`thread_start + 13
  thread #7, stop reason = signal SIGSTOP
    frame #0: 0x00007fff5d6e37fe libsystem_kernel.dylib`semaphore_wait_trap + 10
    frame #1: 0x0000000100a0b613 node`uv_sem_wait + 16
    frame #2: 0x00000001000f1cc4 node`node::inspector::(anonymous namespace)::StartIoThreadMain(void*) + 28
    frame #3: 0x00007fff5d8286c1 libsystem_pthread.dylib`_pthread_body + 340
    frame #4: 0x00007fff5d82856d libsystem_pthread.dylib`_pthread_start + 377
    frame #5: 0x00007fff5d827c5d libsystem_pthread.dylib`thread_start + 13
  thread #8, stop reason = signal SIGSTOP
    frame #0: 0x00007fff5d6ed562 libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #1: 0x00007fff5d82806a libsystem_pthread.dylib`_pthread_wqthread + 1035
    frame #2: 0x00007fff5d827c4d libsystem_pthread.dylib`start_wqthread + 13
  thread #9, stop reason = signal SIGSTOP
    frame #0: 0x00007fff5d6eccee libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x00007fff5d829662 libsystem_pthread.dylib`_pthread_cond_wait + 732
    frame #2: 0x0000000100a0b194 node`uv_cond_wait + 9
    frame #3: 0x00000001009fcd5d node`worker + 71
    frame #4: 0x00007fff5d8286c1 libsystem_pthread.dylib`_pthread_body + 340
    frame #5: 0x00007fff5d82856d libsystem_pthread.dylib`_pthread_start + 377
    frame #6: 0x00007fff5d827c5d libsystem_pthread.dylib`thread_start + 13
  thread #10, stop reason = signal SIGSTOP
    frame #0: 0x00007fff5d6eccee libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x00007fff5d829662 libsystem_pthread.dylib`_pthread_cond_wait + 732
    frame #2: 0x0000000100a0b194 node`uv_cond_wait + 9
    frame #3: 0x00000001009fcd5d node`worker + 71
    frame #4: 0x00007fff5d8286c1 libsystem_pthread.dylib`_pthread_body + 340
    frame #5: 0x00007fff5d82856d libsystem_pthread.dylib`_pthread_start + 377
    frame #6: 0x00007fff5d827c5d libsystem_pthread.dylib`thread_start + 13
  thread #11, stop reason = signal SIGSTOP
    frame #0: 0x00007fff5d6eccee libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x00007fff5d829662 libsystem_pthread.dylib`_pthread_cond_wait + 732
    frame #2: 0x0000000100a0b194 node`uv_cond_wait + 9
    frame #3: 0x00000001009fcd5d node`worker + 71
    frame #4: 0x00007fff5d8286c1 libsystem_pthread.dylib`_pthread_body + 340
    frame #5: 0x00007fff5d82856d libsystem_pthread.dylib`_pthread_start + 377
    frame #6: 0x00007fff5d827c5d libsystem_pthread.dylib`thread_start + 13
  thread #12, stop reason = signal SIGSTOP
    frame #0: 0x00007fff5d6eccee libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x00007fff5d829662 libsystem_pthread.dylib`_pthread_cond_wait + 732
    frame #2: 0x0000000100a0b194 node`uv_cond_wait + 9
    frame #3: 0x00000001009fcd5d node`worker + 71
    frame #4: 0x00007fff5d8286c1 libsystem_pthread.dylib`_pthread_body + 340
    frame #5: 0x00007fff5d82856d libsystem_pthread.dylib`_pthread_start + 377
    frame #6: 0x00007fff5d827c5d libsystem_pthread.dylib`thread_start + 13
(lldb) quit
@odinho
Copy link
Author

odinho commented Dec 4, 2018

I did not find any crashers for the earlier Node 10 release. But now we did one run v10.14.1 where it HUNG a bit earlier on the Proxy test it segfaults on in 11. https://travis-ci.org/webpack/webpack-dev-server/jobs/463522175

However, on second try it went through. Don't know how flaky it will be yet, and no idea what it stops on.

So it seems like this is a full-on crash in 11, but on 10 it will sometimes hang. https://github.com/webpack/webpack-dev-server/blob/69239ce854dd0a4bdb752fbd78c47c348aa9f900/test/Proxy.test.js#L151

@odinho
Copy link
Author

odinho commented Dec 4, 2018

OK, not to make this a microblog, but it might not relate to the Proxy test itself. Another PR which adds a new test crashes at another point: https://travis-ci.org/webpack/webpack-dev-server/jobs/460271481

So it could be anything. Sorry about a non-specific bug report, I'm hoping it's reproducible locally.

@bnoordhuis
Copy link
Member

bnoordhuis commented Dec 4, 2018

I can't test right now but the stack trace suggests the process self-kills, i.e., sends itself a termination signal with process.kill().

edit: if you install llnode, you should get a stack trace including JS function frames.

@bnoordhuis
Copy link
Member

I'm going to close this out for now but let me know if it turns out to be a bug in Node.js and I'll reopen.

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

No branches or pull requests

2 participants