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

Node finished with non-zero exit value 139 #5769

Closed
nmalaguti opened this issue Mar 17, 2016 · 7 comments
Closed

Node finished with non-zero exit value 139 #5769

nmalaguti opened this issue Mar 17, 2016 · 7 comments
Labels
duplicate Issues and PRs that are duplicates of other issues or PRs.

Comments

@nmalaguti
Copy link

  • Version: 5.9.0
  • Platform: Darwin Kernel Version 15.3.0 (64-bit)

This issue only started happening after I upgraded Node from 5.8.0 to 5.9.0. I have a local repro that happens pretty much 100% of the time. I have tried to create an example that causes this to happen. It doesn't occur 100% of the time, but when run in a loop it will eventually occur. See https://github.com/nmalaguti/repro-grunt-node-5.9.0 for details about how to run it.

Gradle is running Node to run Grunt. I don't know what error 139 means.

:nodeSetup UP-TO-DATE
:npmSetup SKIPPED
:npmInstall UP-TO-DATE
:grunt_clean FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':grunt_clean'.
> Process 'command '/Users/nmalaguti/git/repro-grunt-node-5.9.0/.gradle/nodejs/node-v5.9.0-darwin-x64/bin/node'' finished with non-zero exit value 139

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 1.775 secs
@mscdex
Copy link
Contributor

mscdex commented Mar 18, 2016

Exit code 139 typically means a segfault (128 + 11 (for segfault)). Is it possible you can try running it under gdb or similar and getting a backtrace? I'm curious if this is the same issue as #5768.

@benjamingr
Copy link
Member

Thanks for the full repro repository that really helps :)

@nmalaguti
Copy link
Author

While trying to capture the segfault, I learned something new about looking at Apple crash reports!

Process:               node [13675]
Path:                  /Users/USER/*/node
Identifier:            node
Version:               ???
Code Type:             X86-64 (Native)
Parent Process:        java [1409]
Responsible:           iTerm2 [1072]
User ID:               501

Date/Time:             2016-03-18 12:00:49.527 -0400
OS Version:            Mac OS X 10.11.3 (15D21)


Time Awake Since Boot: 2400 seconds

System Integrity Protection: enabled

Crashed Thread:        0  grunt  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       EXC_I386_GPFLT

Thread 0 Crashed:: grunt  Dispatch queue: com.apple.main-thread
0   node                            0x000000010066c421 node::ContextifyScript::RunInContext(v8::FunctionCallbackInfo<v8::Value> const&) + 311
1   node                            0x0000000100162c6f v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) + 159
2   node                            0x000000010018c2d5 v8::internal::MaybeHandle<v8::internal::Object> v8::internal::HandleApiCallHelper<false>(v8::internal::Isolate*, v8::internal::(anonymous namespace)::BuiltinArguments<(v8::internal::BuiltinExtraArguments)1>&) + 1253
3   node                            0x000000010018eb41 v8::internal::Builtin_HandleApiCall(int, v8::internal::Object**, v8::internal::Isolate*) + 65
4   ???                             0x000034d82070839b 0 + 58102861824923
5   ???                             0x000034d820a70695 0 + 58102865397397
6   ???                             0x000034d820a7051f 0 + 58102865397023
7   ???                             0x000034d820708297 0 + 58102861824663
8   ???                             0x000034d82083493a 0 + 58102863055162
9   ???                             0x000034d82083441a 0 + 58102863053850
10  ???                             0x000034d820708297 0 + 58102861824663
11  ???                             0x000034d820a95572 0 + 58102865548658
12  ???                             0x000034d820734a9c 0 + 58102862006940
13  ???                             0x000034d82084c8bc 0 + 58102863153340
14  ???                             0x000034d8209d9dab 0 + 58102864780715
15  ???                             0x000034d820842c5b 0 + 58102863113307
16  ???                             0x000034d8208384ae 0 + 58102863070382
17  ???                             0x000034d8208fc080 0 + 58102863872128
18  ???                             0x000034d82084dc8e 0 + 58102863158414
19  ???                             0x000034d820a94eeb 0 + 58102865546987
20  ???                             0x000034d820734a9c 0 + 58102862006940
21  ???                             0x000034d82084c8bc 0 + 58102863153340
22  ???                             0x000034d8209d9dab 0 + 58102864780715
23  ???                             0x000034d820842c5b 0 + 58102863113307
24  ???                             0x000034d8208384ae 0 + 58102863070382
25  ???                             0x000034d8208fc080 0 + 58102863872128
26  ???                             0x000034d82084dc8e 0 + 58102863158414
27  ???                             0x000034d820a947c6 0 + 58102865545158
28  ???                             0x000034d820984385 0 + 58102864429957
29  ???                             0x000034d82099b5e7 0 + 58102864524775
30  ???                             0x000034d820708297 0 + 58102861824663
31  ???                             0x000034d82083493a 0 + 58102863055162
32  ???                             0x000034d82083441a 0 + 58102863053850
33  ???                             0x000034d820708297 0 + 58102861824663
34  ???                             0x000034d82098bcce 0 + 58102864461006
35  ???                             0x000034d82095f8a6 0 + 58102864279718
36  ???                             0x000034d820731bdd 0 + 58102861994973
37  ???                             0x000034d820715282 0 + 58102861877890
38  node                            0x00000001002c5590 v8::internal::Invoke(bool, v8::internal::Handle<v8::internal::JSFunction>, v8::internal::Handle<v8::internal::Object>, int, v8::internal::Handle<v8::internal::Object>*) + 768
39  node                            0x00000001002c502c 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>*, bool) + 364
40  node                            0x0000000100510636 v8::internal::Runtime_Apply(int, v8::internal::Object**, v8::internal::Isolate*) + 918
41  ???                             0x000034d82070839b 0 + 58102861824923
42  ???                             0x000034d820977fd6 0 + 58102864379862
43  ???                             0x000034d820708297 0 + 58102861824663
44  ???                             0x000034d820984c6b 0 + 58102864432235
45  ???                             0x000034d820984385 0 + 58102864429957
46  ???                             0x000034d820967d78 0 + 58102864313720
47  ???                             0x000034d820708297 0 + 58102861824663
48  ???                             0x000034d8209611b0 0 + 58102864286128
49  ???                             0x000034d82096067e 0 + 58102864283262
50  ???                             0x000034d820708297 0 + 58102861824663
51  ???                             0x000034d82084d6e2 0 + 58102863156962
52  ???                             0x000034d820734a9c 0 + 58102862006940
53  ???                             0x000034d82084c8bc 0 + 58102863153340
54  ???                             0x000034d82084568b 0 + 58102863124107
55  ???                             0x000034d820842c5b 0 + 58102863113307
56  ???                             0x000034d8208384ae 0 + 58102863070382
57  ???                             0x000034d820837ec6 0 + 58102863068870
58  ???                             0x000034d82073b5e7 0 + 58102862034407
59  ???                             0x000034d820738eb5 0 + 58102862024373
60  ???                             0x000034d820731bdd 0 + 58102861994973
61  ???                             0x000034d820715282 0 + 58102861877890
62  node                            0x00000001002c5590 v8::internal::Invoke(bool, v8::internal::Handle<v8::internal::JSFunction>, v8::internal::Handle<v8::internal::Object>, int, v8::internal::Handle<v8::internal::Object>*) + 768
63  node                            0x00000001002c502c 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>*, bool) + 364
64  node                            0x00000001001496ea v8::Function::Call(v8::Local<v8::Context>, v8::Local<v8::Value>, int, v8::Local<v8::Value>*) + 282
65  node                            0x00000001006595d5 node::LoadEnvironment(node::Environment*) + 486
66  node                            0x000000010065aa6a node::Start(int, char**) + 510
67  node                            0x0000000100001834 start + 52

Thread 1:: V8 WorkerThread
0   libsystem_kernel.dylib          0x00007fff928f33c2 semaphore_wait_trap + 10
1   node                            0x0000000100793ba7 v8::base::Semaphore::Wait() + 23
2   node                            0x00000001006ba2f9 v8::platform::TaskQueue::GetNext() + 57
3   node                            0x00000001006ba4fb v8::platform::WorkerThread::Run() + 43
4   node                            0x0000000100795697 v8::base::ThreadEntry(void*) + 87
5   libsystem_pthread.dylib         0x00007fff8a5b7c13 _pthread_body + 131
6   libsystem_pthread.dylib         0x00007fff8a5b7b90 _pthread_start + 168
7   libsystem_pthread.dylib         0x00007fff8a5b5375 thread_start + 13

Thread 2:: V8 WorkerThread
0   libsystem_kernel.dylib          0x00007fff928f33c2 semaphore_wait_trap + 10
1   node                            0x0000000100793ba7 v8::base::Semaphore::Wait() + 23
2   node                            0x00000001006ba2f9 v8::platform::TaskQueue::GetNext() + 57
3   node                            0x00000001006ba4fb v8::platform::WorkerThread::Run() + 43
4   node                            0x0000000100795697 v8::base::ThreadEntry(void*) + 87
5   libsystem_pthread.dylib         0x00007fff8a5b7c13 _pthread_body + 131
6   libsystem_pthread.dylib         0x00007fff8a5b7b90 _pthread_start + 168
7   libsystem_pthread.dylib         0x00007fff8a5b5375 thread_start + 13

Thread 3:: V8 WorkerThread
0   libsystem_kernel.dylib          0x00007fff928f33c2 semaphore_wait_trap + 10
1   node                            0x0000000100793ba7 v8::base::Semaphore::Wait() + 23
2   node                            0x00000001006ba2f9 v8::platform::TaskQueue::GetNext() + 57
3   node                            0x00000001006ba4fb v8::platform::WorkerThread::Run() + 43
4   node                            0x0000000100795697 v8::base::ThreadEntry(void*) + 87
5   libsystem_pthread.dylib         0x00007fff8a5b7c13 _pthread_body + 131
6   libsystem_pthread.dylib         0x00007fff8a5b7b90 _pthread_start + 168
7   libsystem_pthread.dylib         0x00007fff8a5b5375 thread_start + 13

Thread 4:: V8 WorkerThread
0   libsystem_kernel.dylib          0x00007fff928f33c2 semaphore_wait_trap + 10
1   node                            0x0000000100793ba7 v8::base::Semaphore::Wait() + 23
2   node                            0x00000001006ba2f9 v8::platform::TaskQueue::GetNext() + 57
3   node                            0x00000001006ba4fb v8::platform::WorkerThread::Run() + 43
4   node                            0x0000000100795697 v8::base::ThreadEntry(void*) + 87
5   libsystem_pthread.dylib         0x00007fff8a5b7c13 _pthread_body + 131
6   libsystem_pthread.dylib         0x00007fff8a5b7b90 _pthread_start + 168
7   libsystem_pthread.dylib         0x00007fff8a5b5375 thread_start + 13

Thread 5:
0   libsystem_kernel.dylib          0x00007fff928f96de __workq_kernreturn + 10
1   libsystem_pthread.dylib         0x00007fff8a5b7729 _pthread_wqthread + 1283
2   libsystem_pthread.dylib         0x00007fff8a5b5365 start_wqthread + 13

Thread 6:: Dispatch queue: com.apple.libdispatch-manager
0   libsystem_kernel.dylib          0x00007fff928f9ff6 kevent_qos + 10
1   libdispatch.dylib               0x00007fff98d0c099 _dispatch_mgr_invoke + 216
2   libdispatch.dylib               0x00007fff98d0bd01 _dispatch_mgr_thread + 52

Thread 7:
0   libsystem_kernel.dylib          0x00007fff928f96de __workq_kernreturn + 10
1   libsystem_pthread.dylib         0x00007fff8a5b7729 _pthread_wqthread + 1283
2   libsystem_pthread.dylib         0x00007fff8a5b5365 start_wqthread + 13

Thread 8:

Thread 0 crashed with X86 Thread State (64-bit):
  rax: 0x0003000010241d93  rbx: 0x00007fff5fbfdff8  rcx: 0x000036e2651be461  rdx: 0x0000000000000018
  rdi: 0x00000001018484a0  rsi: 0x0000000000000003  rbp: 0x00007fff5fbfdfe0  rsp: 0x00007fff5fbfdf80
   r8: 0x0000000000000000   r9: 0x0000010000000000  r10: 0x000036e2651d6ca1  r11: 0x0000000000000000
  r12: 0x000000010241d500  r13: 0x000000010184c400  r14: 0xffffffffffffffff  r15: 0x0000000101804a01
  rip: 0x000000010066c421  rfl: 0x0000000000010206  cr2: 0x000024b44d587000

Logical CPU:     0
Error Code:      0x00000000
Trap Number:     13

@ofrobots
Copy link
Contributor

Yep - this looks like a dup of #5768.

@nmalaguti
Copy link
Author

For future reference if anyone is trying to get a backtrace on Mac OS X when node has a segfault, take a look at http://stackoverflow.com/questions/9412156/how-to-generate-core-dumps-in-mac-os-x for where to find Apple's crash reports.

@Fishrock123 Fishrock123 added the duplicate Issues and PRs that are duplicates of other issues or PRs. label Mar 18, 2016
@nmalaguti
Copy link
Author

Appears to be fixed in Node 5.9.1.

@robertleeplummerjr
Copy link

robertleeplummerjr commented Jun 13, 2016

Was as well experiencing this in Node 4.3.0 on OSX, appears to be fixed in Node 4.4.5. Thanks guys for your hard work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate Issues and PRs that are duplicates of other issues or PRs.
Projects
None yet
Development

No branches or pull requests

6 participants