v8 crashes in garbage collection.

337 views
Skip to first unread message

Jane Chen

unread,
Sep 1, 2016, 7:17:05 PM9/1/16
to v8-users
Embedding v8 4.6.88.

Running a memory-consuming script.  Sometimes I get a fatal error callback due to "process out of memory" which I now handle.  Other times v8 just crashes in CollectGarbage:

2016-08-25 17:25:49.649 Critical: #5 <signal handler called>
2016-08-25 17:25:49.649 Critical: #6 0x00007f71f69d67fd in void v8::internal::FlexibleBodyVisitor<v8::internal::IncrementalMarkingMarkingVisitor, v8::internal::JSObject::BodyDescriptor, void>::VisitSpecialized<32>(v8::internal::Map*, v8::internal::HeapObject*) () from lib/libv8.so
2016-08-25 17:25:49.649 Critical: #7 0x00007f71f69d0857 in v8::internal::IncrementalMarking::Step(long, v8::internal::IncrementalMarking::CompletionAction, v8::internal::IncrementalMarking::ForceMarkingAction, v8::internal::IncrementalMarking::ForceCompletionAction) () from lib/libv8.so
2016-08-25 17:25:49.649 Critical: #8 0x00007f71f69a575e in v8::internal::Heap::CollectGarbage(v8::internal::GarbageCollector, char const*, char const*, v8::GCCallbackFlags) () from lib/libv8.so
2016-08-25 17:25:49.649 Critical: #9 0x00007f71f695bb37 in v8::internal::Factory::NewUninitializedFixedArray(int) () from lib/libv8.so
2016-08-25 17:25:49.649 Critical: #10 0x00007f71f69673a7 in v8::internal::Factory::NewJSArrayStorage(v8::internal::Handle<v8::internal::JSArray>, int, int, v8::internal::ArrayStorageAllocationMode) () from lib/libv8.so
2016-08-25 17:25:49.649 Critical: #11 0x00007f71f6967172 in v8::internal::Factory::NewJSArray(v8::internal::ElementsKind, int, int, v8::internal::Strength, v8::internal::ArrayStorageAllocationMode, v8::internal::PretenureFlag) () from lib/libv8.so
2016-08-25 17:25:49.649 Critical: #12 0x00007f71f6830a53 in v8::internal::Builtin_ArraySplice(int, v8::internal::Object**, v8::internal::Isolate*) () from lib/libv8.so

Is this a known bug?  Is it fixed in a more recent release?

Jakob Kummerow

unread,
Sep 2, 2016, 6:50:04 AM9/2/16
to v8-users
When the garbage collector crashes like that, that indicates that there's a broken object on the heap. This could have any number of reasons (notably including V8 bugs, embedder bugs, flaky hardware), so without further data it's impossible to tell if this particular instance is known and/or fixed.

--
--
v8-users mailing list
v8-u...@googlegroups.com
http://groups.google.com/group/v8-users
---
You received this message because you are subscribed to the Google Groups "v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to v8-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ben Noordhuis

unread,
Sep 2, 2016, 6:57:20 PM9/2/16
to v8-users
On Fri, Sep 2, 2016 at 1:17 AM, Jane Chen <jxch...@gmail.com> wrote:
Try compiling a debug build and running with --verify_heap. Setting
--gc_interval to a low value can help catch memory corruption closer
to the source.

Jane Chen

unread,
Sep 14, 2016, 8:40:49 PM9/14/16
to v8-users
Hi Ben,

What's a good low value to set for gc_interval for debugging purpose? 1? 10?

Thanks!

Ben Noordhuis

unread,
Sep 15, 2016, 4:15:23 AM9/15/16
to v8-users
On Thu, Sep 15, 2016 at 2:40 AM, Jane Chen <jxch...@gmail.com> wrote:
> What's a good low value to set for gc_interval for debugging purpose? 1? 10?

Depends on how patient you are. :-)

1 is the most rigorous but it runs 100-1000x slower. 10, 25 or 50 are
reasonable trade-offs.
Reply all
Reply to author
Forward
0 new messages