Segmentation fault in v8 GC.

43 views
Skip to first unread message

Jane Chen

unread,
Nov 20, 2016, 12:23:17 AM11/20/16
to v8-users
Embedding v8 4.6.88.

Got a segfault during stress test of my app:

2016-11-19 20:54:26.933 Critical: Segmentation fault in thread 0x00007efbf9400700 2016-11-19 20:54:26.933 Critical: Thread 68 (Thread 0x7efbf9400700 (LWP 6602)): 2016-11-19 20:54:26.933 Critical: #0 0x000000311ca0f279 in waitpid () from /lib64/libpthread.so.0 2016-11-19 20:54:26.933 Critical: #1 0x0000000003c4afa8 in xdmp::pstack() () 2016-11-19 20:54:26.933 Critical: #2 0x0000000003c4b276 in pstackSignalAction () 2016-11-19 20:54:26.933 Critical: #3 <signal handler called> 2016-11-19 20:54:26.933 Critical: #4 0x0000003122e75ba4 in std::_Rb_tree_rebalance_for_erase(std::_Rb_tree_node_base*, std::_Rb_tree_node_base&) () from /lib64/libstdc++.so.6 2016-11-19 20:54:26.933 Critical: #5 0x00007f02029d75c6 in std::_Rb_tree<void*, std::pair<void* const, unsigned long>, std::_Select1st<std::pair<void* const, unsigned long> >, std::less<void*>, std::allocator<std::pair<void* const, unsigned long> > >::erase(void* const&) () from lib/libv8.so 2016-11-19 20:54:26.933 Critical: #6 0x00007f02029b3558 in v8::internal::Heap::FreeDeadArrayBuffersHelper(v8::internal::Isolate*, std::map<void*, unsigned long, std::less<void*>, std::allocator<std::pair<void* const, unsigned long> > >&, std::map<void*, unsigned long, std::less<void*>, std::allocator<std::pair<void* const, unsigned long> > >&) () from lib/libv8.so 2016-11-19 20:54:26.933 Critical: #7 0x00007f02029b3230 in v8::internal::Heap::FreeDeadArrayBuffers(bool) () from lib/libv8.so 2016-11-19 20:54:26.933 Critical: #8 0x00007f02029e48ba in v8::internal::MarkCompactCollector::SweepSpaces() () from lib/libv8.so 2016-11-19 20:54:26.933 Critical: #9 0x00007f02029e35f7 in v8::internal::MarkCompactCollector::CollectGarbage() () from lib/libv8.so 2016-11-19 20:54:26.933 Critical: #10 0x00007f02029b0ef4 in v8::internal::Heap::MarkCompact() () from lib/libv8.so 2016-11-19 20:54:26.933 Critical: #11 0x00007f02029afe76 in v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) () from lib/libv8.so 2016-11-19 20:54:26.933 Critical: #12 0x00007f02029af89e in v8::internal::Heap::CollectGarbage(v8::internal::GarbageCollector, char const*, char const*, v8::GCCallbackFlags) () from lib/libv8.so 2016-11-19 20:54:26.933 Critical: #13 0x00007f02029bd99c in v8::internal::Heap::TryFinalizeIdleIncrementalMarking(double, unsigned long, unsigned long) () from lib/libv8.so 2016-11-19 20:54:26.933 Critical: #14 0x00007f02029bdd16 in v8::internal::Heap::PerformIdleTimeAction(v8::internal::GCIdleTimeAction, v8::internal::GCIdleTimeHandler::HeapState, double) () from lib/libv8.so 2016-11-19 20:54:26.933 Critical: #15 0x00007f02029be4cf in v8::internal::Heap::IdleNotification(double) () from lib/libv8.so 2016-11-19 20:54:26.933 Critical: #16 0x00007f0202804e38 in v8::Isolate::IdleNotificationDeadline(double) () from lib/libv8.so 2016-11-19 20:54:26.933 Critical: #17 0x000000000308e34b in xdmp::JSEngine::notifyGC(xdmp::JavaScriptThread&) ()

Not seeing the same stack with v8 5.3, but got some different crash related to GC.

Jane

Ben Noordhuis

unread,
Nov 20, 2016, 4:27:10 AM11/20/16
to v8-users
Can you try upgrading to 4.6.85.32? Contrary to what you might
expect, 4.6.85.32 is more recent than 4.6.88.

If that doesn't help, try going through [0] for applicable fixes; [1]
looks promising but there are a few other patches that address GC
issues. Node.js v4.x bundles V8 4.5 but most patches apply cleanly to
4.6.

If all else fails, stop calling Isolate::IdleNotificationDeadline().
:-) Hope that helps!

[0] https://github.com/nodejs/node/tree/v4.x
[1] https://github.com/nodejs/node/commit/31450fce7c8fe6804c84a7875d2f85a78b309125
Reply all
Reply to author
Forward
0 new messages