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

Segmentation fault in node v4.8.3 #13966

Closed
kessiler opened this issue Jun 28, 2017 · 11 comments
Closed

Segmentation fault in node v4.8.3 #13966

kessiler opened this issue Jun 28, 2017 · 11 comments
Labels
invalid Issues and PRs that are invalid. v8 engine Issues and PRs related to the V8 dependency.

Comments

@kessiler
Copy link

Version: v4.8.3 (official build)
Platform: Linux railsonfire_73606f4b-2d1a-446e-bc26-6743fadb8e0e_e79b84805f8c 4.2.0-42-generic #49~14.04.1-Ubuntu SMP Wed Jun 29 20:22:11 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux (Codeship)
Subsystem: v8

It's happening randomly when running integration tests and I have no idea why.

Here's the stack trace:

0x0000000000ad6ee6 in v8::internal::IncrementalMarkingMarkingVisitor::VisitFixedArrayIncremental(v8::internal::Map*, v8::internal::HeapObject*) ()
A debugging session is active.

	Inferior 1 [process 9928] will be killed.

Quit anyway? (y or n) n
Not confirmed.
(gdb) bt
#0  0x0000000000ad6ee6 in v8::internal::IncrementalMarkingMarkingVisitor::VisitFixedArrayIncremental(v8::internal::Map*, v8::internal::HeapObject*) ()
#1  0x0000000000ad465d in v8::internal::IncrementalMarking::Step(long, v8::internal::IncrementalMarking::CompletionAction, v8::internal::IncrementalMarking::ForceMarkingAction, v8::internal::IncrementalMarking::ForceCompletionAction) ()
#2  0x0000000000b03634 in v8::internal::NewSpace::SlowAllocateRaw(int, v8::internal::AllocationAlignment) ()
#3  0x0000000000a65d09 in v8::internal::Heap::AllocateRaw(int, v8::internal::AllocationSpace, v8::internal::AllocationSpace, v8::internal::AllocationAlignment) ()
#4  0x0000000000aae4a9 in v8::internal::Heap::AllocateFillerObject(int, bool, v8::internal::AllocationSpace) ()
#5  0x0000000000a6604d in v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationSpace) ()
#6  0x0000000000c9796c in v8::internal::Runtime_AllocateInNewSpace(int, v8::internal::Object**, v8::internal::Isolate*) ()
#7  0x00003c0c3a70963b in ?? ()
#8  0x00003c0c3a709581 in ?? ()
#9  0x00007fffffffc1f0 in ?? ()
#10 0x00007fffffffc260 in ?? ()
#11 0x00003c0c4104739c in ?? ()
#12 0x0000004800000000 in ?? ()
#13 0x0000066460018519 in ?? ()
#14 0x0000104f66f23fa1 in ?? ()
#15 0x000028fce3bf8bc1 in ?? ()
#16 0x0000000000000002 in ?? ()
#17 0x0000000000000002 in ?? ()
#18 0x0000104f66f24039 in ?? ()
#19 0x000021c4eac5e351 in ?? ()
#20 0x000021c4eacdbf91 in ?? ()
#21 0x000021c4eac5e351 in ?? ()
#22 0x00007fffffffc2f0 in ?? ()
#23 0x00003c0c4006406f in ?? ()
#24 0x0000104f66f23e01 in ?? ()
#25 0x000008a432c7f571 in ?? ()
#26 0x0000061f5f0d7639 in ?? ()
#27 0x0000104f66f23e01 in ?? ()
#28 0x000021c4eacdbfd9 in ?? ()
#29 0x00000000019e69a8 in ?? ()
#30 0x0000000000000003 in ?? ()
#31 0x0000000000000004 in ?? ()
#32 0x0000104f66f23e01 in ?? ()
#33 0x0000061f5f035211 in ?? ()
#34 0x0000061f5f0041b9 in ?? ()
#35 0x0000104f66f23e01 in ?? ()
#36 0x0000061f5f0a7011 in ?? ()
#37 0x0000104f66f23e41 in ?? ()
#38 0x00000dfa27f89f81 in ?? ()
#39 0x0000104f66f23e41 in ?? ()
#40 0x00007fffffffc330 in ?? ()
#41 0x00003c0c3a709ff7 in ?? ()
#42 0x0000061f5f0041b9 in ?? ()
#43 0x0000104f66f23e01 in ?? ()
#44 0x000008a432c7f571 in ?? ()
#45 0x0000000100000000 in ?? ()
#46 0x00000dfa27f89f81 in ?? ()
#47 0x0000000a00000000 in ?? ()
#48 0x00007fffffffc380 in ?? ()
#49 0x00003c0c4006d894 in ?? ()
#50 0x0000104f66f23e01 in ?? ()
#51 0x000008a432c7f571 in ?? ()
#52 0x00000dfa27f89f81 in ?? ()
#53 0x0000104f66f23e01 in ?? ()
#54 0x0000061f5f0041b9 in ?? ()
#55 0x0000000400000000 in ?? ()
#56 0x0000104f66f22db1 in ?? ()
#57 0x0000104f66f22d79 in ?? ()

I was also able to reproduce in my OSX laptop, however, it doesn't happen so often.

Here's the stack trace:

Process:               node [73698]
Path:                  /Users/USER/*/node
Identifier:            node
Version:               ???
Code Type:             X86-64 (Native)
Parent Process:        ??? [73697]
Responsible:           node [73698]
User ID:               501

Date/Time:             2017-06-28 03:27:41.759 -0500
OS Version:            Mac OS X 10.12.5 (16F73)
Report Version:        12
Anonymous UUID:        58A63626-1586-4A57-CD87-D098B1722E79

Sleep/Wake UUID:       A0C56FD8-6FF7-44D6-A30D-EF8B2B77825B

Time Awake Since Boot: 340000 seconds
Time Since Wake:       18000 seconds

System Integrity Protection: enabled

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

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x00002547b3100009
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Segmentation fault: 11
Termination Reason:    Namespace SIGNAL, Code 0xb
Terminating Process:   exc handler [0]

VM Regions Near 0x2547b3100009:
    Memory Tag 255         000024d75f700000-000024d75f800000 [ 1024K] rw-/rwx SM=PRV  
--> 
    Memory Tag 255         0000258ed8f00000-0000258ed9000000 [ 1024K] rw-/rwx SM=PRV  

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   node                          	0x000000010034b7de v8::internal::IncrementalMarkingMarkingVisitor::VisitFixedArrayIncremental(v8::internal::Map*, v8::internal::HeapObject*) + 958
1   node                          	0x000000010034aee7 v8::internal::IncrementalMarking::Step(long, v8::internal::IncrementalMarking::CompletionAction, v8::internal::IncrementalMarking::ForceMarkingAction, v8::internal::IncrementalMarking::ForceCompletionAction) + 823
2   node                          	0x000000010037fef4 v8::internal::NewSpace::SlowAllocateRaw(int, v8::internal::AllocationAlignment) + 132
3   node                          	0x00000001002e8a57 v8::internal::Heap::AllocateRaw(int, v8::internal::AllocationSpace, v8::internal::AllocationSpace, v8::internal::AllocationAlignment) + 71
4   node                          	0x0000000100329b69 v8::internal::Heap::AllocateJSObjectFromMap(v8::internal::Map*, v8::internal::PretenureFlag, bool, v8::internal::AllocationSite*) + 329
5   node                          	0x00000001002e2284 v8::internal::Factory::NewJSObject(v8::internal::Handle<v8::internal::JSFunction>, v8::internal::PretenureFlag) + 52
6   node                          	0x000000010053b6cb v8::internal::Runtime_NewObjectHelper(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::AllocationSite>) + 331
7   node                          	0x000000010053a4e0 v8::internal::Runtime_NewObject(int, v8::internal::Object**, v8::internal::Isolate*) + 48
8   ???                           	0x00003cb14360963b 0 + 66732037281339
9   ???                           	0x00003cb143631102 0 + 66732037443842
10  ???                           	0x00003cb14436cb07 0 + 66732051319559
11  ???                           	0x00003cb144719a64 0 + 66732055173732
12  ???                           	0x00003cb1443928af 0 + 66732051474607
13  ???                           	0x00003cb144381abd 0 + 66732051405501
14  ???                           	0x00003cb143609ff7 0 + 66732037283831
15  ???                           	0x00003cb1447f927f 0 + 66732056089215
16  ???                           	0x00003cb1496a8b7a 0 + 66732138597242
17  ???                           	0x00003cb143609ff7 0 + 66732037283831
18  ???                           	0x00003cb1448cca0a 0 + 66732056955402
19  ???                           	0x00003cb148d91a36 0 + 66732129065526
20  ???                           	0x00003cb1495378ed 0 + 66732137085165
21  ???                           	0x00003cb147f5d37e 0 + 66732114170750
22  ???                           	0x00003cb14c913bf9 0 + 66732191464441
23  ???                           	0x00003cb143609ff7 0 + 66732037283831
24  ???                           	0x00003cb14cf51d94 0 + 66732198010260
25  ???                           	0x00003cb1448f544a 0 + 66732057121866
26  ???                           	0x00003cb1445f8e66 0 + 66732053991014
27  ???                           	0x00003cb1436345e7 0 + 66732037457383
28  ???                           	0x00003cb14458817d 0 + 66732053528957
29  ???                           	0x00003cb1443e4e0a 0 + 66732051811850
30  ???                           	0x00003cb1436318fd 0 + 66732037445885
31  ???                           	0x00003cb143615b62 0 + 66732037331810
32  node                          	0x00000001002d2fe8 v8::internal::Invoke(bool, v8::internal::Handle<v8::internal::JSFunction>, v8::internal::Handle<v8::internal::Object>, int, v8::internal::Handle<v8::internal::Object>*) + 728
33  node                          	0x000000010015efc4 v8::Function::Call(v8::Local<v8::Context>, v8::Local<v8::Value>, int, v8::Local<v8::Value>*) + 276
34  node                          	0x0000000100659707 node::MakeCallback(node::Environment*, v8::Local<v8::Value>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*) + 718
35  node                          	0x00000001006618a8 node::CheckImmediate(uv_check_s*) + 98
36  node                          	0x000000010078cd7b uv__run_check + 167
37  node                          	0x0000000100788097 uv_run + 329
38  node                          	0x0000000100661661 node::Start(int, char**) + 735
39  node                          	0x0000000100001334 start + 52

Thread 1:
0   libsystem_kernel.dylib        	0x00007fff90f82386 semaphore_wait_trap + 10
1   node                          	0x0000000100792525 uv_sem_wait + 16
2   node                          	0x00000001006620c4 node::DebugSignalThreadMain(void*) + 49
3   libsystem_pthread.dylib       	0x00007fff9107493b _pthread_body + 180
4   libsystem_pthread.dylib       	0x00007fff91074887 _pthread_start + 286
5   libsystem_pthread.dylib       	0x00007fff9107408d thread_start + 13

Thread 2:: V8 WorkerThread
0   libsystem_kernel.dylib        	0x00007fff90f82386 semaphore_wait_trap + 10
1   node                          	0x000000010079a727 v8::base::Semaphore::Wait() + 23
2   node                          	0x00000001006bfec9 v8::platform::TaskQueue::GetNext() + 57
3   node                          	0x00000001006c00cb v8::platform::WorkerThread::Run() + 43
4   node                          	0x000000010079c217 v8::base::ThreadEntry(void*) + 87
5   libsystem_pthread.dylib       	0x00007fff9107493b _pthread_body + 180
6   libsystem_pthread.dylib       	0x00007fff91074887 _pthread_start + 286
7   libsystem_pthread.dylib       	0x00007fff9107408d thread_start + 13

Thread 3:: V8 WorkerThread
0   libsystem_kernel.dylib        	0x00007fff90f82386 semaphore_wait_trap + 10
1   node                          	0x000000010079a727 v8::base::Semaphore::Wait() + 23
2   node                          	0x00000001006bfec9 v8::platform::TaskQueue::GetNext() + 57
3   node                          	0x00000001006c00cb v8::platform::WorkerThread::Run() + 43
4   node                          	0x000000010079c217 v8::base::ThreadEntry(void*) + 87
5   libsystem_pthread.dylib       	0x00007fff9107493b _pthread_body + 180
6   libsystem_pthread.dylib       	0x00007fff91074887 _pthread_start + 286
7   libsystem_pthread.dylib       	0x00007fff9107408d thread_start + 13

Thread 4:: V8 WorkerThread
0   libsystem_kernel.dylib        	0x00007fff90f82386 semaphore_wait_trap + 10
1   node                          	0x000000010079a727 v8::base::Semaphore::Wait() + 23
2   node                          	0x00000001006bfec9 v8::platform::TaskQueue::GetNext() + 57
3   node                          	0x00000001006c00cb v8::platform::WorkerThread::Run() + 43
4   node                          	0x000000010079c217 v8::base::ThreadEntry(void*) + 87
5   libsystem_pthread.dylib       	0x00007fff9107493b _pthread_body + 180
6   libsystem_pthread.dylib       	0x00007fff91074887 _pthread_start + 286
7   libsystem_pthread.dylib       	0x00007fff9107408d thread_start + 13

Thread 5:: V8 WorkerThread
0   libsystem_kernel.dylib        	0x00007fff90f82386 semaphore_wait_trap + 10
1   node                          	0x000000010079a727 v8::base::Semaphore::Wait() + 23
2   node                          	0x00000001006bfec9 v8::platform::TaskQueue::GetNext() + 57
3   node                          	0x00000001006c00cb v8::platform::WorkerThread::Run() + 43
4   node                          	0x000000010079c217 v8::base::ThreadEntry(void*) + 87
5   libsystem_pthread.dylib       	0x00007fff9107493b _pthread_body + 180
6   libsystem_pthread.dylib       	0x00007fff91074887 _pthread_start + 286
7   libsystem_pthread.dylib       	0x00007fff9107408d thread_start + 13

Thread 6:
0   libsystem_kernel.dylib        	0x00007fff90f89bf2 __psynch_cvwait + 10
1   libsystem_pthread.dylib       	0x00007fff910757fa _pthread_cond_wait + 712
2   node                          	0x0000000100792647 uv_cond_wait + 9
3   node                          	0x000000010078612b worker + 227
4   node                          	0x00000001007922b0 uv__thread_start + 25
5   libsystem_pthread.dylib       	0x00007fff9107493b _pthread_body + 180
6   libsystem_pthread.dylib       	0x00007fff91074887 _pthread_start + 286
7   libsystem_pthread.dylib       	0x00007fff9107408d thread_start + 13

Thread 7:
0   libsystem_kernel.dylib        	0x00007fff90f89bf2 __psynch_cvwait + 10
1   libsystem_pthread.dylib       	0x00007fff910757fa _pthread_cond_wait + 712
2   node                          	0x0000000100792647 uv_cond_wait + 9
3   node                          	0x000000010078612b worker + 227
4   node                          	0x00000001007922b0 uv__thread_start + 25
5   libsystem_pthread.dylib       	0x00007fff9107493b _pthread_body + 180
6   libsystem_pthread.dylib       	0x00007fff91074887 _pthread_start + 286
7   libsystem_pthread.dylib       	0x00007fff9107408d thread_start + 13

Thread 8:
0   libsystem_kernel.dylib        	0x00007fff90f89bf2 __psynch_cvwait + 10
1   libsystem_pthread.dylib       	0x00007fff910757fa _pthread_cond_wait + 712
2   node                          	0x0000000100792647 uv_cond_wait + 9
3   node                          	0x000000010078612b worker + 227
4   node                          	0x00000001007922b0 uv__thread_start + 25
5   libsystem_pthread.dylib       	0x00007fff9107493b _pthread_body + 180
6   libsystem_pthread.dylib       	0x00007fff91074887 _pthread_start + 286
7   libsystem_pthread.dylib       	0x00007fff9107408d thread_start + 13

Thread 9:
0   libsystem_kernel.dylib        	0x00007fff90f89bf2 __psynch_cvwait + 10
1   libsystem_pthread.dylib       	0x00007fff910757fa _pthread_cond_wait + 712
2   node                          	0x0000000100792647 uv_cond_wait + 9
3   node                          	0x000000010078612b worker + 227
4   node                          	0x00000001007922b0 uv__thread_start + 25
5   libsystem_pthread.dylib       	0x00007fff9107493b _pthread_body + 180
6   libsystem_pthread.dylib       	0x00007fff91074887 _pthread_start + 286
7   libsystem_pthread.dylib       	0x00007fff9107408d thread_start + 13

Thread 0 crashed with X86 Thread State (64-bit):
  rax: 0x0000000000000001  rbx: 0x00002547b3100000  rcx: 0x0000000000000017  rdx: 0x0000000000800000
  rdi: 0x0000000008889151  rsi: 0x00001623faa4b128  rbp: 0x00007fff5fbfe510  rsp: 0x00007fff5fbfe4a0
   r8: 0x00001623faa00000   r9: 0x0000000000000001  r10: 0x0000000100ecf108  r11: 0x0000000000000001
  r12: 0x00002547b31f6979  r13: 0x0000000101801c20  r14: 0x00001623faa47581  r15: 0x00001623faa4b5a8
  rip: 0x000000010034b7de  rfl: 0x0000000000010206  cr2: 0x00002547b3100009
  
Logical CPU:     2
Error Code:      0x00000004
Trap Number:     14


Binary Images:
       0x100000000 -        0x100e49d47 +node (???) <4974B286-48A6-30A7-BEC1-6E40CF2D658F> /Users/USER/*/node
       0x1016e6000 -        0x1016ebfff +bcrypt_lib.node (???) <D1000217-F2B9-3DA3-B7FA-A7CAAA14465B> /Users/USER/Public/*/bcrypt_lib.node
       0x1016f2000 -        0x1016f7fff +ursaNative.node (???) <B74EAC39-8585-3344-9B35-238950B0FC48> /Users/USER/Public/*/ursaNative.node
       0x10d7c2000 -        0x10d7ffdc7  dyld (433.5) <322C06B7-8878-311D-888C-C8FD2CA96FF3> /usr/lib/dyld
    0x7fff7b65a000 -     0x7fff7baf3ff7  com.apple.CoreFoundation (6.9 - 1349.8) <09ED473E-5DE8-307F-B55C-16F6419236D5> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
    0x7fff8f674000 -     0x7fff8f675ff3  libDiagnosticMessagesClient.dylib (102) <84A04D24-0E60-3810-A8C0-90A65E2DF61A> /usr/lib/libDiagnosticMessagesClient.dylib
    0x7fff8f8b3000 -     0x7fff8f8b4ffb  libSystem.B.dylib (1238.60.2) <FC9E9F13-3B18-305C-BE0A-97C7843652B0> /usr/lib/libSystem.B.dylib
    0x7fff8f9ed000 -     0x7fff8fa43ff7  libc++.1.dylib (307.5) <0B43BB5D-E6EB-3464-8DE9-B41AC8ED9D1C> /usr/lib/libc++.1.dylib
    0x7fff8fa44000 -     0x7fff8fa6efff  libc++abi.dylib (307.3) <30199352-88BF-30BD-8CFF-2A4FBE247523> /usr/lib/libc++abi.dylib
    0x7fff8ffad000 -     0x7fff901d2ffb  libicucore.A.dylib (57165.0.1) <2931B842-2946-3576-AD1D-1CDA22FA1388> /usr/lib/libicucore.A.dylib
    0x7fff90561000 -     0x7fff90933047  libobjc.A.dylib (709) <DC77AA6E-A4E4-326D-8D7F-82D63AA88F99> /usr/lib/libobjc.A.dylib
    0x7fff90b9e000 -     0x7fff90beefff  libstdc++.6.dylib (104.1) <A980E08C-A511-3D19-9881-1D79B7CFF2BA> /usr/lib/libstdc++.6.dylib
    0x7fff90d5f000 -     0x7fff90d70ff3  libz.1.dylib (67) <46E3FFA2-4328-327A-8D34-A03E20BFFB8E> /usr/lib/libz.1.dylib
    0x7fff90d7f000 -     0x7fff90d83ff7  libcache.dylib (79) <093A4DAB-8385-3D47-A350-E20CB7CCF7BF> /usr/lib/system/libcache.dylib
    0x7fff90d84000 -     0x7fff90d8efff  libcommonCrypto.dylib (60092.50.5) <8A64D1B0-C70E-385C-92F0-E669079FDA90> /usr/lib/system/libcommonCrypto.dylib
    0x7fff90d8f000 -     0x7fff90d96fff  libcompiler_rt.dylib (62) <55D47421-772A-32AB-B529-1A46C2F43B4D> /usr/lib/system/libcompiler_rt.dylib
    0x7fff90d97000 -     0x7fff90d9ffff  libcopyfile.dylib (138) <819BEA3C-DF11-3E3D-A1A1-5A51C5BF1961> /usr/lib/system/libcopyfile.dylib
    0x7fff90da0000 -     0x7fff90e23fdf  libcorecrypto.dylib (442.50.19) <65D7165E-2E71-335D-A2D6-33F78E2DF0C1> /usr/lib/system/libcorecrypto.dylib
    0x7fff90e24000 -     0x7fff90e55fff  libdispatch.dylib (703.50.37) <6582BAD6-ED27-3B30-B620-90B1C5A4AE3C> /usr/lib/system/libdispatch.dylib
    0x7fff90e56000 -     0x7fff90e5bffb  libdyld.dylib (433.5) <EC3D88D2-3D40-3274-8E26-362C2D7352C8> /usr/lib/system/libdyld.dylib
    0x7fff90e5c000 -     0x7fff90e5cffb  libkeymgr.dylib (28) <7AA011A9-DC21-3488-BF73-3B5B14D1FDD6> /usr/lib/system/libkeymgr.dylib
    0x7fff90e6a000 -     0x7fff90e6afff  liblaunch.dylib (972.60.2) <D3306CFF-58AA-3C90-B06C-B70E80E60C5B> /usr/lib/system/liblaunch.dylib
    0x7fff90e6b000 -     0x7fff90e70ff3  libmacho.dylib (898) <17D5D855-F6C3-3B04-B680-E9BF02EF8AED> /usr/lib/system/libmacho.dylib
    0x7fff90e71000 -     0x7fff90e73ff3  libquarantine.dylib (85.50.1) <12448CC2-378E-35F3-BE33-9DC395A5B970> /usr/lib/system/libquarantine.dylib
    0x7fff90e74000 -     0x7fff90e75ffb  libremovefile.dylib (45) <38D4CB9C-10CD-30D3-8B7B-A515EC75FE85> /usr/lib/system/libremovefile.dylib
    0x7fff90e76000 -     0x7fff90e8eff7  libsystem_asl.dylib (349.50.5) <096E4228-3B7C-30A6-8B13-EC909A64499A> /usr/lib/system/libsystem_asl.dylib
    0x7fff90e8f000 -     0x7fff90e8fff7  libsystem_blocks.dylib (67) <10DC5404-73AB-35B3-A277-A8AFECB476EB> /usr/lib/system/libsystem_blocks.dylib
    0x7fff90e90000 -     0x7fff90f1dfef  libsystem_c.dylib (1158.50.2) <E5AE5244-7D0C-36AC-8BB6-C7AE7EA52A4B> /usr/lib/system/libsystem_c.dylib
    0x7fff90f1e000 -     0x7fff90f21ffb  libsystem_configuration.dylib (888.60.2) <BECC01A2-CA8D-31E6-BCDF-D452965FA976> /usr/lib/system/libsystem_configuration.dylib
    0x7fff90f22000 -     0x7fff90f25fff  libsystem_coreservices.dylib (41.4) <7D26DE79-B424-3450-85E1-F7FAB32714AB> /usr/lib/system/libsystem_coreservices.dylib
    0x7fff90f26000 -     0x7fff90f3efff  libsystem_coretls.dylib (121.50.4) <EC6FCF07-DCFB-3A03-9CC9-6DD3709974C6> /usr/lib/system/libsystem_coretls.dylib
    0x7fff90f3f000 -     0x7fff90f45fff  libsystem_dnssd.dylib (765.50.9) <CC960215-0B1B-3822-A13A-3DDE96FA796F> /usr/lib/system/libsystem_dnssd.dylib
    0x7fff90f46000 -     0x7fff90f6fff7  libsystem_info.dylib (503.50.4) <611DB84C-BF70-3F92-8702-B9F28A900920> /usr/lib/system/libsystem_info.dylib
    0x7fff90f70000 -     0x7fff90f92ff7  libsystem_kernel.dylib (3789.60.24) <6E9E485F-91F6-36B7-A125-AE91DC978BCC> /usr/lib/system/libsystem_kernel.dylib
    0x7fff90f93000 -     0x7fff90fdafe7  libsystem_m.dylib (3121.6) <86D499B5-BBDC-3D3B-8A4E-97AE8E6672A4> /usr/lib/system/libsystem_m.dylib
    0x7fff90fdb000 -     0x7fff90ff9ff7  libsystem_malloc.dylib (116.50.8) <A3D15F17-99A6-3367-8C7E-4280E8619C95> /usr/lib/system/libsystem_malloc.dylib
    0x7fff90ffa000 -     0x7fff91053ffb  libsystem_network.dylib (856.60.1) <369D0221-56CA-3C3E-9EDE-94B41CAE77B7> /usr/lib/system/libsystem_network.dylib
    0x7fff91054000 -     0x7fff9105dff3  libsystem_networkextension.dylib (563.60.2) <B021F2B3-8A75-3633-ABB0-FC012B8E9B0C> /usr/lib/system/libsystem_networkextension.dylib
    0x7fff9105e000 -     0x7fff91067ff3  libsystem_notify.dylib (165.20.1) <B8160190-A069-3B3A-BDF6-2AA408221FAE> /usr/lib/system/libsystem_notify.dylib
    0x7fff91068000 -     0x7fff91070fe7  libsystem_platform.dylib (126.50.8) <897462FD-B318-321B-A554-E61982630F7E> /usr/lib/system/libsystem_platform.dylib
    0x7fff91071000 -     0x7fff9107bff7  libsystem_pthread.dylib (218.60.3) <B8FB5E20-3295-39E2-B5EB-B464D1D4B104> /usr/lib/system/libsystem_pthread.dylib
    0x7fff9107c000 -     0x7fff9107fff7  libsystem_sandbox.dylib (592.60.1) <DC780631-BD23-36B1-9376-668619E18D25> /usr/lib/system/libsystem_sandbox.dylib
    0x7fff91080000 -     0x7fff91081ff3  libsystem_secinit.dylib (24.50.4) <F78B847B-3565-3E4B-98A6-F7AD40392E2D> /usr/lib/system/libsystem_secinit.dylib
    0x7fff91082000 -     0x7fff91089ffb  libsystem_symptoms.dylib (532.50.47) <3390E07C-C1CE-348F-ADBD-2C5440B45EAA> /usr/lib/system/libsystem_symptoms.dylib
    0x7fff9108a000 -     0x7fff9109dff7  libsystem_trace.dylib (518.60.2) <6B145B10-5874-3E89-90CD-D370DB475BA1> /usr/lib/system/libsystem_trace.dylib
    0x7fff9109e000 -     0x7fff910a3ffb  libunwind.dylib (35.3) <3D50D8A8-C460-334D-A519-2DA841102C6B> /usr/lib/system/libunwind.dylib
    0x7fff910a4000 -     0x7fff910cdff7  libxpc.dylib (972.60.2) <1C9AF716-69DF-359F-85E9-7DFDE362F9A2> /usr/lib/system/libxpc.dylib

External Modification Summary:
  Calls made by other processes targeting this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by all processes on this machine:
    task_for_pid: 251747
    thread_create: 0
    thread_set_state: 42

VM Region Summary:
ReadOnly portion of Libraries: Total=150.9M resident=0K(0%) swapped_out_or_unallocated=150.9M(100%)
Writable regions: Total=401.4M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=401.4M(100%)
 
                                VIRTUAL   REGION 
REGION TYPE                        SIZE    COUNT (non-coalesced) 
===========                     =======  ======= 
Activity Tracing                   256K        2 
Kernel Alloc Once                    8K        2 
MALLOC                            97.0M       24 
MALLOC guard page                   16K        4 
Memory Tag 255                   750.4M      324 
STACK GUARD                       56.0M       11 
Stack                             42.1M       11 
__DATA                            3540K       51 
__LINKEDIT                       121.6M        6 
__TEXT                            29.3M       48 
__UNICODE                          556K        2 
shared memory                       12K        4 
===========                     =======  ======= 
TOTAL                              1.1G      477 
@addaleax addaleax added v4.x v8 engine Issues and PRs related to the V8 dependency. labels Jun 28, 2017
@addaleax
Copy link
Member

/cc @nodejs/v8

@bnoordhuis
Copy link
Member

Looks like memory corruption. What happens when you don't load bcrypt and ursa?

@kessiler
Copy link
Author

@bnoordhuis same issue.

@bnoordhuis
Copy link
Member

Can you post the stack trace + pmap dump? (What OS X calls 'images'.)

@kessiler
Copy link
Author

I've generated the dump but it shows some confidential data. Could you guide me on how to debug this further? Or say what would you like to see?

@Rush
Copy link

Rush commented Jun 29, 2017

@bnoordhuis would building a node.js binary with debugging symbols enabled help in this case?

@bnoordhuis
Copy link
Member

@Rush It would. If nothing else, it has many more sanity checks so it will probably catch the bug closer to the source.

@kessiler Maybe the first 10 or so stack frames? I'd also would like to know what libraries and .node files, if any, are loaded at the time of the crash.

Or is that the confidential data you were referring to? That would make it hard to help.

@Rush
Copy link

Rush commented Jun 30, 2017

@bnoordhuis I don't know if this is even related because it happens on each run.

# Check failed: IsNumber().
#

==== C stack trace ===============================

 1: V8_Fatal
 2: v8::internal::Object::Number()
 3: v8::Value::IntegerValue(v8::Local<v8::Context>) const
 4: v8::Value::IntegerValue() const
 5: node::Parser::on_headers_complete_()
 6: node::Parser::on_headers_complete(http_parser*)
 7: http_parser_execute
 8: node::Parser::Execute(char*, unsigned long)
 9: node::Parser::Execute(v8::FunctionCallbackInfo<v8::Value> const&)
10: v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&))
11: 0xe7fd34
12: 0xe7a61e
13: 0xe7a592
14: 0x1e42adb068fb

Thread 1 "node" received signal SIGILL, Illegal instruction.
v8::base::OS::Abort () at ../deps/v8/src/base/platform/platform-posix.cc:229
229         V8_IMMEDIATE_CRASH();
A debugging session is active.

        Inferior 1 [process 28839] will be killed.

Quit anyway? (y or n) n
Not confirmed.
(gdb) bt
#0  v8::base::OS::Abort () at ../deps/v8/src/base/platform/platform-posix.cc:229
#1  0x0000000001673f9c in V8_Fatal (file=0x16f8681 "../deps/v8/src/objects-inl.h", line=1117, format=0x16f82fe "Check failed: %s.") at ../deps/v8/src/base/logging.cc:116
#2  0x0000000000dc71a0 in v8::internal::Object::Number (this=0x1baddead0baddeaf) at ../deps/v8/src/objects-inl.h:1117
#3  0x0000000000dfb80b in v8::Value::IntegerValue (this=0x1fed528, context=...) at ../deps/v8/src/api.cc:3273
#4  0x0000000000dfb8f2 in v8::Value::IntegerValue (this=0x1fed528) at ../deps/v8/src/api.cc:3286
#5  0x00000000015e141c in node::Parser::on_headers_complete_ (this=0x202bda0) at ../src/node_http_parser.cc:298
#6  0x00000000015e0f46 in node::Parser::on_headers_complete (p_=0x202bdc8) at ../src/node_http_parser.cc:225
#7  0x0000000001653adc in http_parser_execute (parser=0x202bdc8, settings=0x18aab80 <node::Parser::settings>, 
    data=0x22e19a0 "HTTP/1.1 101 Switching Protocols\r\nServer: nginx\r\nDate: Fri, 30 Jun 2017 02:38:48 GMT\r\nConnection: upgrade\r\nUpgrade: websocket\r\nSec-WebSocket-Accept: ZmrhItvMC/KmNvl29/RZqO/1S4s=\r\nStrict-Transport-Secu"..., len=254) at ../deps/http_parser/http_parser.c:1811
#8  0x00000000015e25d7 in node::Parser::Execute (this=0x202bda0, 
    data=0x22e19a0 "HTTP/1.1 101 Switching Protocols\r\nServer: nginx\r\nDate: Fri, 30 Jun 2017 02:38:48 GMT\r\nConnection: upgrade\r\nUpgrade: websocket\r\nSec-WebSocket-Accept: ZmrhItvMC/KmNvl29/RZqO/1S4s=\r\nStrict-Transport-Secu"..., len=254) at ../src/node_http_parser.cc:612
#9  0x00000000015e1b79 in node::Parser::Execute (args=...) at ../src/node_http_parser.cc:412
#10 0x0000000000e30a93 in v8::internal::FunctionCallbackArguments::Call (this=0x7fffffff5810, f=0x15e1a26 <node::Parser::Execute(v8::FunctionCallbackInfo<v8::Value> const&)>)
    at ../deps/v8/src/arguments.cc:33
#11 0x0000000000e7fd34 in v8::internal::HandleApiCallHelper<false> (isolate=0x1fa7f90, args=...) at ../deps/v8/src/builtins.cc:1092
#12 0x0000000000e7a61e in v8::internal::Builtin_Impl_HandleApiCall (args=..., isolate=0x1fa7f90) at ../deps/v8/src/builtins.cc:1115
#13 0x0000000000e7a592 in v8::internal::Builtin_HandleApiCall (args_length=5, args_object=0x7fffffff5a70, isolate=0x1fa7f90) at ../deps/v8/src/builtins.cc:1111
#14 0x00001e42adb068fb in ?? ()
#15 0x00001e42adb06841 in ?? ()
#16 0x00007fffffff5a30 in ?? ()
#17 0x00007fffffff5aa0 in ?? ()
#18 0x00001e42ae1b74a8 in ?? ()
#19 0x000004d6d9b93af9 in ?? ()
#20 0x000000fe00000000 in ?? ()
#21 0x0000000000000000 in ?? ()

compiled node 4.8.3 with --debug

@bnoordhuis
Copy link
Member

@Rush Are you using faye? That error and stack trace is eerily similar to #13351, which was the result of faye monkey-patching internals. See also faye/websocket-driver-node#21.

@Rush
Copy link

Rush commented Jun 30, 2017

@bnoordhuis a node module "nforce" that we rely on is using "faye".

@bnoordhuis
Copy link
Member

Okay, that would explain it. Get rid of the module (or fix the upstream bug) and the crash should go away. Let me know if you still have issues afterwards and I'll reopen.

@bnoordhuis bnoordhuis added the invalid Issues and PRs that are invalid. label Jul 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid Issues and PRs that are invalid. v8 engine Issues and PRs related to the V8 dependency.
Projects
None yet
Development

No branches or pull requests

4 participants