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

GC segfault #11606

Closed
simonecogno opened this issue Feb 28, 2017 · 4 comments
Closed

GC segfault #11606

simonecogno opened this issue Feb 28, 2017 · 4 comments
Labels
memory Issues and PRs related to the memory management or memory footprint. v8 engine Issues and PRs related to the V8 dependency.

Comments

@simonecogno
Copy link

simonecogno commented Feb 28, 2017

Node crashed during the Garbace collection but without any other high level pattern (maybe related to #3715).

Unfurtunately I don't have any code to reproduce as I was not able to isolate the problem.

This is the crash stack trace captured with segfault-handler module:

PID 24495 received SIGSEGV for address: 0x3809f3d021f8
<path_node_modules>/segfault-handler/build/Release/segfault-handler.node(+0x1a5b)[0x7f7dd565ca5b]
/lib/x86_64-linux-gnu/libpthread.so.0(+0xf890)[0x7f7dd9c20890]
/usr/bin/nodejs(_ZN2v88internal20MarkCompactCollector22ProcessWeakCollectionsEv+0xfd)[0xaec4dd]
/usr/bin/nodejs(_ZN2v88internal20MarkCompactCollector15MarkLiveObjectsEv+0x214)[0xaf3a14]
/usr/bin/nodejs(_ZN2v88internal20MarkCompactCollector14CollectGarbageEv+0x11)[0xaf47e1]
/usr/bin/nodejs(_ZN2v88internal4Heap11MarkCompactEv+0x60)[0xaaafe0]
/usr/bin/nodejs(_ZN2v88internal4Heap24PerformGarbageCollectionENS0_16GarbageCollectorENS_15GCCallbackFlagsE+0x4c0)[0xac2be0]
/usr/bin/nodejs(_ZN2v88internal4Heap14CollectGarbageENS0_16GarbageCollectorEPKcS4_NS_15GCCallbackFlagsE+0x238)[0xac30f8]
/usr/bin/nodejs(_ZN2v88internal4Heap15HandleGCRequestEv+0x8f)[0xac3aef]
/usr/bin/nodejs(_ZN2v88internal10StackGuard16HandleInterruptsEv+0x31c)[0xa6041c]
/usr/bin/nodejs(_ZN2v88internal18Runtime_StackGuardEiPPNS0_6ObjectEPNS0_7IsolateE+0x2b)[0xca51ab]
[0x2f2137d0963b]

And also this other stack sometimes:

PID 7545 received SIGSEGV for address: 0x68233500009
<path_node_modules>/segfault-handler/build/Release/segfault-handler.node(+0x1a5b)[0x7f89249bfa5b]
/lib/x86_64-linux-gnu/libpthread.so.0(+0xf890)[0x7f8928f83890]
/usr/bin/nodejs(_ZN2v88internal32IncrementalMarkingMarkingVisitor26VisitFixedArrayIncrementalEPNS0_3MapEPNS0_10HeapObjectE+0x3fe)[0xad51ee]
/usr/bin/nodejs(_ZN2v88internal18IncrementalMarking4StepElNS1_16CompletionActionENS1_18ForceMarkingActionENS1_21ForceCompletionActionE+0x30c)[0xad2a7c]
/usr/bin/nodejs(_ZN2v88internal8NewSpace15SlowAllocateRawEiNS0_19AllocationAlignmentE+0x78)[0xb00f18]
/usr/bin/nodejs(_ZN2v88internal4Heap11AllocateRawEiNS0_15AllocationSpaceES2_NS0_19AllocationAlignmentE+0x109)[0xa64719]
/usr/bin/nodejs(_ZN2v88internal4Heap20AllocateFillerObjectEibNS0_15AllocationSpaceE+0x19)[0xaabd19]
/usr/bin/nodejs(_ZN2v88internal7Factory15NewFillerObjectEibNS0_15AllocationSpaceE+0x2d)[0xa64c5d]
/usr/bin/nodejs(_ZN2v88internal29Runtime_AllocateInTargetSpaceEiPPNS0_6ObjectEPNS0_7IsolateE+0x5e)[0xca52ee]
[0x1e31ede06355]
<path_node_modules>/node_modules/segfault-handler/build/Release/segfault-handler.node(+0x1a5b)[0x7f14fc39fa5b]
/lib/x86_64-linux-gnu/libpthread.so.0(+0xf890)[0x7f14ff160890]
/usr/bin/nodejs(_ZN2v88internal20MarkCompactCollector22ProcessWeakCollectionsEv+0xfd)[0xaec5dd]
/usr/bin/nodejs(_ZN2v88internal20MarkCompactCollector15MarkLiveObjectsEv+0x214)[0xaf3b14]
/usr/bin/nodejs(_ZN2v88internal20MarkCompactCollector14CollectGarbageEv+0x11)[0xaf48e1]
/usr/bin/nodejs(_ZN2v88internal4Heap11MarkCompactEv+0x60)[0xaab0e0]
/usr/bin/nodejs(_ZN2v88internal4Heap24PerformGarbageCollectionENS0_16GarbageCollectorENS_15GCCallbackFlagsE+0x4c0)[0xac2ce0]
/usr/bin/nodejs(_ZN2v88internal4Heap14CollectGarbageENS0_16GarbageCollectorEPKcS4_NS_15GCCallbackFlagsE+0x238)[0xac31f8]
/usr/bin/nodejs(_ZN2v88internal7Factory13NewFixedArrayEiNS0_13PretenureFlagE+0x69)[0xa64f39]
/usr/bin/nodejs(_ZN2v88internal9HashTableINS0_14NameDictionaryENS0_19NameDictionaryShapeENS0_6HandleINS0_4NameEEEE3NewEPNS0_7IsolateEiNS0_15MinimumCapacityENS0_13PretenureFlagE+0x5f)[0xc0111f]
/usr/bin/nodejs(_ZN2v88internal10DictionaryINS0_14NameDictionaryENS0_19NameDictionaryShapeENS0_6HandleINS0_4NameEEEE3AddENS4_IS2_EES6_NS4_INS0_6ObjectEEENS0_15PropertyDetailsE+0x8e)[0xc1b0de]
/usr/bin/nodejs(_ZN2v88internal8JSObject15AddSlowPropertyENS0_6HandleIS1_EENS2_INS0_4NameEEENS2_INS0_6ObjectEEE18PropertyAttributes+0x84)[0xc24e14]
/usr/bin/nodejs(_ZN2v88internal6Object15AddDataPropertyEPNS0_14LookupIteratorENS0_6HandleIS1_EE18PropertyAttributesNS0_12LanguageModeENS1_14StoreFromKeyedE+0x1e0)[0xc25270]
/usr/bin/nodejs(_ZN2v88internal6Object11SetPropertyEPNS0_14LookupIteratorENS0_6HandleIS1_EENS0_12LanguageModeENS1_14StoreFromKeyedE+0x41)[0xc25431]
/usr/bin/nodejs(_ZN2v88internal7Runtime17SetObjectPropertyEPNS0_7IsolateENS0_6HandleINS0_6ObjectEEES6_S6_NS0_12LanguageModeE+0x1f0)[0xcb4fa0]
/usr/bin/nodejs(_ZN2v88internal19Runtime_SetPropertyEiPPNS0_6ObjectEPNS0_7IsolateE+0x92)[0xcb7582]
[0x39d2a050963b]

Additional information:
Node framework: express, Sails.js

My native modules founded with find node_modules -name '*.node' are:


node_modules/bcrypt/build/Release/bcrypt_lib.node
node_modules/bcrypt/build/Release/obj.target/bcrypt_lib.node
node_modules/segfault-handler/build/Release/segfault-handler.node
node_modules/segfault-handler/build/Release/obj.target/segfault-handler.node
@addaleax addaleax added memory Issues and PRs related to the memory management or memory footprint. v8 engine Issues and PRs related to the V8 dependency. labels Feb 28, 2017
@mscdex mscdex added the v4.x label Feb 28, 2017
@bnoordhuis
Copy link
Member

Can you try excluding bcrypt and segfault-handler? You can still get stack traces if you turn on core dumps (ulimit -c unlimited) and inspect the core file afterwards (gdb node core, then thread apply all backtrace full.)

@simonecogno
Copy link
Author

@bnoordhuis I removed bcrypt but I cannot read segfaults with your method because I don't have root permission on the machine.

@bnoordhuis
Copy link
Member

You could try running node in gdb: gdb --args node app.js, then run and wait for it to crash. Besides 'thread apply ..., the output of info registers and disassemble would be useful too.

If that isn't an option either, I suppose you should talk to your system administrator.

@bnoordhuis
Copy link
Member

No follow-up, I'll close this out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
memory Issues and PRs related to the memory management or memory footprint. v8 engine Issues and PRs related to the V8 dependency.
Projects
None yet
Development

No branches or pull requests

4 participants