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 #140

Closed
mkhahani opened this issue Jan 31, 2020 · 10 comments
Closed

Segmentation fault #140

mkhahani opened this issue Jan 31, 2020 · 10 comments

Comments

@mkhahani
Copy link

I'm using writeSnapshot() and the callback function to create heap snapshots. But the process crashes every time it tries to take the snapshot. It only happens in my production server (Ubuntu 16.0.4 and Node.js 8.17.0) but not in development environment. Here's the core dump:

#0  0x0000000000fd0a93 in v8::internal::V8HeapExplorer::AddEntry(v8::internal::HeapObject*) ()
No symbol table info available.
#1  0x0000000000fc8780 in v8::internal::V8HeapExplorer::SetContextReference(v8::internal::HeapObject*, int, v8::internal::String*, v8::internal::Object*, int) ()
No symbol table info available.
#2  0x0000000000fcabb0 in v8::internal::V8HeapExplorer::ExtractContextReferences(int, v8::internal::Context*) ()
No symbol table info available.
#3  0x0000000000fcacb5 in v8::internal::V8HeapExplorer::ExtractReferencesPass2(int, v8::internal::HeapObject*) ()
No symbol table info available.
#4  0x0000000000fd1e85 in bool v8::internal::V8HeapExplorer::IterateAndExtractSinglePass<&v8::internal::V8HeapExplorer::ExtractReferencesPass2>() ()
No symbol table info available.
#5  0x0000000000fd2448 in v8::internal::V8HeapExplorer::IterateAndExtractReferences(v8::internal::SnapshotFiller*) ()
No symbol table info available.
#6  0x0000000000fd2832 in v8::internal::HeapSnapshotGenerator::GenerateSnapshot() ()
No symbol table info available.
#7  0x0000000000fbd26c in v8::internal::HeapProfiler::TakeSnapshot(v8::ActivityControl*, v8::HeapProfiler::ObjectNameResolver*) ()
No symbol table info available.
#8  0x00007f55f0063fd0 in (anonymous namespace)::WriteSnapshot(Nan::FunctionCallbackInfo<v8::Value> const&) ()
   from /var/conference/server/node_modules/heapdump/build/Release/addon.node
No symbol table info available.
#9  0x00007f55f0063ea5 in Nan::imp::FunctionCallbackWrapper(v8::FunctionCallbackInfo<v8::Value> const&) ()
   from /var/conference/server/node_modules/heapdump/build/Release/addon.node
No symbol table info available.
#10 0x0000000000a99113 in v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) ()
No symbol table info available.
#11 0x0000000000b1033c in v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<false>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, v8::internal::BuiltinArguments) ()
No symbol table info available.
#12 0x0000000000b10f8f in v8::internal::Builtin_HandleApiCall(int, v8::internal::Object**, v8::internal::Isolate*) ()
No symbol table info available.
#13 0x00000063904042fd in ?? ()
No symbol table info available.
#14 0x0000006390404241 in ?? ()
No symbol table info available.
#15 0x00007ffd3ab75e70 in ?? ()
@bnoordhuis
Copy link
Owner

What does find node_modules -name \*.node print?

node-heapdump is probably just the messenger, not the culprit. There's likely something else going on, like another add-on corrupting the JS heap.

@mkhahani
Copy link
Author

What does find node_modules -name *.node print?

# find node_modules -name \*.node
node_modules/posix/build/Release/posix.node
node_modules/posix/build/Release/obj.target/posix.node
node_modules/mediasoup/worker/deps/libuv/test/fixtures/load_error.node
node_modules/heapdump/build/Release/addon.node
node_modules/heapdump/build/Release/obj.target/addon.node

How can I make sure it's which one?

@mkhahani
Copy link
Author

mkhahani commented Feb 5, 2020

The crash also happens on SIGUSR2. Here's the core dump:

core dump
#0  0x0000000000fd0a93 in v8::internal::V8HeapExplorer::AddEntry(v8::internal::HeapObject*) ()
[Current thread is 1 (Thread 0x7f40d5609740 (LWP 12412))]
(gdb) bt full
#0  0x0000000000fd0a93 in v8::internal::V8HeapExplorer::AddEntry(v8::internal::HeapObject*) ()
No symbol table info available.
#1  0x0000000000fc8780 in v8::internal::V8HeapExplorer::SetContextReference(v8::internal::HeapObject*, int, v8::internal::String*, v8::internal::Object*, int) ()
No symbol table info available.
#2  0x0000000000fcabb0 in v8::internal::V8HeapExplorer::ExtractContextReferences(int, v8::internal::Context*) ()
No symbol table info available.
#3  0x0000000000fcacb5 in v8::internal::V8HeapExplorer::ExtractReferencesPass2(int, v8::internal::HeapObject*) ()
No symbol table info available.
#4  0x0000000000fd1e85 in bool v8::internal::V8HeapExplorer::IterateAndExtractSinglePass<&v8::internal::V8HeapExplorer::ExtractReferencesPass2>() ()
No symbol table info available.
#5  0x0000000000fd2448 in v8::internal::V8HeapExplorer::IterateAndExtractReferences(v8::internal::SnapshotFiller*) ()
No symbol table info available.
#6  0x0000000000fd2832 in v8::internal::HeapSnapshotGenerator::GenerateSnapshot() ()
No symbol table info available.
#7  0x0000000000fbd26c in v8::internal::HeapProfiler::TakeSnapshot(v8::ActivityControl*, v8::HeapProfiler::ObjectNameResolver*) ()
No symbol table info available.
#8  0x00007f40c3dfd33d in (anonymous namespace)::OnSIGUSR2(uv_signal_s*, int) ()
   from /var/conference/server/node_modules/heapdump/build/Release/addon.node
No symbol table info available.
#9  0x00000000009c4436 in uv__signal_event (loop=0x218cda0 <default_loop_struct>, w=<optimized out>, events=<optimized out>)
    at ../deps/uv/src/unix/signal.c:468
        msg = 0x7ffc362ae780
        handle = 0x7f40c3ffe240 <(anonymous namespace)::signal_handle>
        buf = "\220\331X\002\000\000\000\000\f\000\000\000\000\000\000\000@\342\377\303@\177\000\000\f\000\000\000\000\000\000\000\"unit\":\"MiB\",\"ty\"historic\":true,\"},\"Heap Size\":{5\",\"value\":\"1.05libuv/latency/p9type\":\"internal/\":\"ms\",\"type\":\"i\326\301b\312\326QS\330֡c\002\326\065*\317", '\000' <repeats 280 times>...
        bytes = 32
        end = 32
        i = 16
        r = <optimized out>
        __PRETTY_FUNCTION__ = "uv__signal_event"
#10 0x00000000009cb742 in uv__io_poll (loop=loop@entry=0x218cda0 <default_loop_struct>, timeout=181)
    at ../deps/uv/src/unix/linux-core.c:382
        events = {{events = 1, data = {ptr = 0x25ef7e000000007, fd = 7, u32 = 7, u64 = 170846377331392519}}, {events = 0, data = {
              ptr = 0x0, fd = 0, u32 = 0, u64 = 0}} <repeats 152 times>, {events = 0, data = {ptr = 0x6e65, fd = 28261, u32 = 28261,
              u64 = 28261}}, {events = 0, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 0, data = {ptr = 0x0, fd = 0,
              u32 = 0, u64 = 0}}, {events = 908784768, data = {ptr = 0x1484e1300007ffc, fd = 32764, u32 = 32764,
              u64 = 92409635872473084}}, {events = 0, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 0, data = {ptr = 0x0,
              fd = 0, u32 = 0, u64 = 0}}, {events = 0, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 0, data = {
              ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 0, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {
            events = 4294967295, data = {ptr = 0x362af5b800000000, fd = 0, u32 = 0, u64 = 3903202197692743680}}, {events = 32764,
            data = {ptr = 0x7ffc362af7f8, fd = 908785656, u32 = 908785656, u64 = 140721217271800}}, {events = 0, data = {ptr = 0x0,
              fd = 0, u32 = 0, u64 = 0}}, {events = 0, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 0, data = {
              ptr = 0x362af38000000000, fd = 0, u32 = 0, u64 = 3903199758151319552}}, {events = 32764, data = {
--Type <RET> for more, q to quit, c to continue without paging--c
              ptr = 0x13e6cac <icu_60::(anonymous namespace)::DecFmtSymDataSink::put(char const*, icu_60::ResourceValue&, signed char, UErrorCode&)+140>, fd = 20868268, u32 = 20868268, u64 = 20868268}}, {events = 13, data = {ptr = 0x362b06c000000000, fd = 0, u32 = 0, u64 = 3903220923750154240}}, {events = 32764, data = {ptr = 0x7ffc362af950, fd = 908786000, u32 = 908786000, u64 = 140721217272144}}, {events = 27841325, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 0, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 27985348, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 0, data = {ptr = 0x1ab05dc <icusmdt60_dat+1469916>, fd = 27985372, u32 = 27985372, u64 = 27985372}}, {events = 0, data = {ptr = 0xc00000000, fd = 0, u32 = 0, u64 = 51539607552}}, {events = 0, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 91, data = {ptr = 0x6e, fd = 110, u32 = 110, u64 = 110}}, {events = 0, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 119, data = {ptr = 0x7c, fd = 124, u32 = 124, u64 = 124}}, {events = 0, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 0, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 0, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 3561765664, data = {ptr = 0xc800007f40, fd = 32576, u32 = 32576, u64 = 858993491776}}, {events = 0, data = {ptr = 0x2585d20, fd = 39345440, u32 = 39345440, u64 = 39345440}}, {events = 0, data = {ptr = 0x362af7f000000000, fd = 0, u32 = 0, u64 = 3903204637234167808}}, {events = 32764, data = {ptr = 0x200003db, fd = 536871899, u32 = 536871899, u64 = 536871899}}, {events = 3558355332, data = {ptr = 0x18000007f40, fd = 32576, u32 = 32576, u64 = 1649267474240}}, {events = 0, data = {ptr = 0x7ffc362af660, fd = 908785248, u32 = 908785248, u64 = 140721217271392}}, {events = 908786000, data = {ptr = 0x7ffc, fd = 32764, u32 = 32764, u64 = 32764}}, {events = 0, data = {ptr = 0x7ffc362b06c0, fd = 908789440, u32 = 908789440, u64 = 140721217275584}}, {events = 908785520, data = {ptr = 0x362af57000007ffc, fd = 32764, u32 = 32764, u64 = 3903201888455131132}}, {events = 32764, data = {ptr = 0x1487d10 <(anonymous namespace)::getAllItemsWithFallback(UResourceBundle const*, icu_60::ResourceDataValue&, icu_60::ResourceSink&, UErrorCode&)+128>, fd = 21527824, u32 = 21527824, u64 = 21527824}}, {events = 3, data = {ptr = 0x9490dc1f00000000, fd = 0, u32 = 0, u64 = 10705298339961765888}}, {events = 0, data = {ptr = 0x7ffc362af3c0, fd = 908784576, u32 = 908784576, u64 = 140721217270720}}, {events = 4294967295, data = {ptr = 0x26f8e1800000000, fd = 0, u32 = 0, u64 = 175515144221097984}}, {events = 0, data = {ptr = 0x1a8432e <icusmdt60_dat+1289006>, fd = 27804462, u32 = 27804462, u64 = 27804462}}, {events = 908784672, data = {ptr = 0x150dba400007ffc, fd = 32764, u32 = 32764, u64 = 94817089595932668}}, {events = 0, data = {ptr = 0x7ffc362af670, fd = 908785264, u32 = 908785264, u64 = 140721217271408}}, {events = 21515795, data = {ptr = 0x362af4d000000000, fd = 0, u32 = 0, u64 = 3903201201260331008}}, {events = 32764, data = {ptr = 0x1c, fd = 28, u32 = 28, u64 = 28}}, {events = 908785656, data = {ptr = 0x1469c4800007ffc, fd = 32764, u32 = 32764, u64 = 91932675459284988}}, {events = 0, data = {ptr = 0x7ffc362af480, fd = 908784768, u32 = 908784768, u64 = 140721217270912}}, {events = 22064883, data = {ptr = 0x362af45000000000, fd = 0, u32 = 0, u64 = 3903200651504517120}}, {events = 32764, data = {ptr = 0x14b89aa <icu_60::UnicodeString::operator=(icu_60::UnicodeString const&)+186>, fd = 21727658, u32 = 21727658, u64 = 21727658}}, {events = 908784720, data = {ptr = 0x1468d3600007ffc, fd = 32764, u32 = 32764, u64 = 91916105475457020}}, {events = 0, data = {ptr = 0x7ffc362b06c0, fd = 908789440, u32 = 908789440, u64 = 140721217275584}}, {events = 2, data = {ptr = 0x362af77000000000, fd = 0, u32 = 0, u64 = 3903204087478353920}}, {events = 32764, data = {ptr = 0x2, fd = 2, u32 = 2, u64 = 2}}, {events = 908785008, data = {ptr = 0x13e6eb400007ffc, fd = 32764, u32 = 32764, u64 = 89630761967190012}}, {events = 0, data = {ptr = 0x7ffc362af580, fd = 908785024, u32 = 908785024, u64 = 140721217271168}}, {events = 74, data = {ptr = 0x100000002, fd = 2, u32 = 2, u64 = 4294967298}}, {events = 16777216, data = {ptr = 0x1a11a0d <icusmdt60_dat+819725>, fd = 27335181, u32 = 27335181, u64 = 27335181}}, {events = 9, data = {ptr = 0x362af6f000007ffc, fd = 32764, u32 = 32764, u64 = 3903203537722572796}}, {events = 32764, data = {ptr = 0x1a3c620 <icusmdt60_dat+994848>, fd = 27510304, u32 = 27510304, u64 = 27510304}}, {events = 908785392, data = {ptr = 0x1a3c8de00007ffc, fd = 32764, u32 = 32764, u64 = 118158871050092540}}, {events = 0, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 0, data = {ptr = 0x1a3c8e400000000, fd = 0, u32 = 0, u64 = 118158896819863552}}, {events = 0, data = {ptr = 0x7ffc00000002, fd = 2, u32 = 2, u64 = 140720308486146}}, {events = 908785248, data = {ptr = 0x1a3c85200007ffc, fd = 32764, u32 = 32764, u64 = 118158269754671100}}, {events = 0, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 27510872, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 0, data = {ptr = 0x7ffc00000003, fd = 3, u32 = 3, u64 = 140720308486147}}, {events = 22038014, data = {ptr = 0x193bd9000000000, fd = 0, u32 = 0, u64 = 113642841787334656}}, {events = 0, data = {ptr = 0x6d754e0000000128, fd = 296, u32 = 296, u64 = 7887296084316258600}}, {events = 10, data = {ptr = 0x1a3c62000000000, fd = 0, u32 = 0, u64 = 118155855983017984}}, {events = 0, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 0, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 0, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 0, data = {ptr = 0x362af79000000000, fd = 0, u32 = 0, u64 = 3903204224917307392}}, {events = 32764, data = {ptr = 0x7ffc362af9c0, fd = 908786112, u32 = 908786112, u64 = 140721217272256}}, {events = 0, data = {ptr = 0x362b06c000000000, fd = 0, u32 = 0, u64 = 3903220923750154240}}, {events = 32764, data = {ptr = 0x7ffc362af770, fd = 908785520, u32 = 908785520, u64 = 140721217271664}}, {events = 908785504, data = {ptr = 0x1487d1000007ffc, fd = 32764, u32 = 32764, u64 = 92461300034076668}}, {events = 0, data = {ptr = 0x7ffc362af6f0, fd = 908785392, u32 = 908785392, u64 = 140721217271536}}, {events = 26019744, data = {ptr = 0x9d00000000, fd = 0, u32 = 0, u64 = 674309865472}}, {events = 0, data = {ptr = 0x7ffc362af920, fd = 908785952, u32 = 908785952, u64 = 140721217272096}}, {events = 908785328, data = {ptr = 0x150713000007ffc, fd = 32764, u32 = 32764, u64 = 94700043147182076}}, {events = 0, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 0, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 0, data = {ptr = 0x7ffc362af6f0, fd = 908785392, u32 = 908785392, u64 = 140721217271536}}, {events = 908789440, data = {ptr = 0x146a7be00007ffc, fd = 32764, u32 = 32764, u64 = 91945276893331452}}, {events = 0, data = {ptr = 0x200000c1000608c0, fd = 395456, u32 = 395456, u64 = 2305843838142777536}}, {events = 0, data = {ptr = 0x1a3c5e800000000, fd = 0, u32 = 0, u64 = 118155615464849408}}, {events = 0, data = {ptr = 0x1a3c8ee <icusmdt60_dat+995566>, fd = 27511022, u32 = 27511022, u64 = 27511022}}, {events = 908785344, data = {ptr = 0x362af6fd00007ffc, fd = 32764, u32 = 32764, u64 = 3903203593557147644}}, {events = 32764, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 6, data = {ptr = 0x362af6d000007ffc, fd = 32764, u32 = 32764, u64 = 3903203400283619324}}, {events = 32764, data = {ptr = 0x25839c8, fd = 39336392, u32 = 39336392, u64 = 39336392}}, {events = 0, data = {ptr = 0x400000000, fd = 0, u32 = 0, u64 = 17179869184}}, {events = 0, data = {ptr = 0x7ffc362af670, fd = 908785264, u32 = 908785264, u64 = 140721217271408}}, {events = 0, data = {ptr = 0x362b06c000000000, fd = 0, u32 = 0, u64 = 3903220923750154240}}, {events = 32764, data = {ptr = 0x2579ca0, fd = 39296160, u32 = 39296160, u64 = 39296160}}, {events = 40865264, data = {ptr = 0x25839a000000000, fd = 0, u32 = 0, u64 = 168948345383944192}}, {events = 0, data = {ptr = 0x7ffc362af760, fd = 908785504, u32 = 908785504, u64 = 140721217271648}}, {events = 21526877, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 0, data = {ptr = 0x7ffc362af790, fd = 908785552, u32 = 908785552, u64 = 140721217271696}}, {events = 908789440, data = {ptr = 0x7ffc, fd = 32764, u32 = 32764, u64 = 32764}}, {events = 0, data = {ptr = 0x200000bd362af7b0, fd = 908785584, u32 = 908785584, u64 = 2305843821871298480}}, {events = 39336392, data = {ptr = 0x18d08c000000000, fd = 0, u32 = 0, u64 = 111755186480873472}}, {events = 0, data = {ptr = 0x7ffc362af790, fd = 908785552, u32 = 908785552, u64 = 140721217271696}}, {events = 27335123, data = {ptr = 0xc800000000, fd = 0, u32 = 0, u64 = 858993459200}}, {events = 0, data = {ptr = 0x7ffc362af70c, fd = 908785420, u32 = 908785420, u64 = 140721217271564}}, {events = 2, data = {ptr = 0x18d08c0626d7973, fd = 1651341683, u32 = 1651341683, u64 = 111755188132215155}}, {events = 0, data = {ptr = 0xf, fd = 15, u32 = 15, u64 = 15}}, {events = 908785405, data = {ptr = 0x2800007ffc, fd = 32764, u32 = 32764, u64 = 171798724604}}, {events = 1920295680, data = {ptr = 0x61705379636e6572, fd = 1668179314, u32 = 1668179314, u64 = 7021203599894930802}}, {events = 1735289187, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 0, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 91, data = {ptr = 0xf0000006e, fd = 110, u32 = 110, u64 = 64424509550}}, {events = 0, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 908789440, data = {ptr = 0x362af79000007ffc, fd = 32764, u32 = 32764, u64 = 3903204224917340156}}, {events = 32764, data = {ptr = 0x7ffc362af9c0, fd = 908786112, u32 = 908786112, u64 = 140721217272256}}, {events = 40865056, data = {ptr = 0x362b023800000000, fd = 0, u32 = 0, u64 = 3903215941588090880}}, {events = 32764, data = {ptr = 0x7ffc362af880, fd = 908785792, u32 = 908785792, u64 = 140721217271936}}, {events = 21529005, data = {ptr = 0x193bd9000000000, fd = 0, u32 = 0, u64 = 113642841787334656}}, {events = 0, data = {ptr = 0x7ffc362af7b8, fd = 908785592, u32 = 908785592, u64 = 140721217271736}}, {events = 1610621533, data = {ptr = 0x2583af000000000, fd = 0, u32 = 0, u64 = 168949788492955648}}, {events = 0, data = {ptr = 0x18d08c0 <icu_60::gCurrencySpacingTag>, fd = 26020032, u32 = 26020032, u64 = 26020032}}, {events = 39336352, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 0, data = {ptr = 0x2583af0, fd = 39336688, u32 = 39336688, u64 = 39336688}}, {events = 0, data = {ptr = 0x2583a2000000000, fd = 0, u32 = 0, u64 = 168948895139758080}}, {events = 0, data = {ptr = 0x1a3c5e8 <icusmdt60_dat+994792>, fd = 27510248, u32 = 27510248, u64 = 27510248}}, {events = 27510284, data = {ptr = 0x1a117ec00000000, fd = 0, u32 = 0, u64 = 117401367668064256}}, {events = 0, data = {ptr = 0x1, fd = 1, u32 = 1, u64 = 1}}, {events = 27336668, data = {ptr = 0x225300000000, fd = 0, u32 = 0, u64 = 37739877629952}}, {events = 8787, data = {ptr = 0x1010000 <v8::internal::Runtime_AtomicsSub(int, v8::internal::Object**, v8::internal::Isolate*)+192>, fd = 16842752, u32 = 16842752, u64 = 16842752}}, {events = 1920103779, data = {ptr = 0x6361705379636e65, fd = 2036559461, u32 = 2036559461, u64 = 7161128386316955237}}, {events = 795307625, data = {ptr = 0x2747c90, fd = 41188496, u32 = 41188496, u64 = 41188496}}, {events = 908786288, data = {ptr = 0x362afac000007ffc, fd = 32764, u32 = 32764, u64 = 3903207729610653692}}, {events = 32764, data = {ptr = 0x7ffc362b06c0, fd = 908789440, u32 = 908789440, u64 = 140721217275584}}, {events = 40865056, data = {ptr = 0x362b023800000000, fd = 0, u32 = 0, u64 = 3903215941588090880}}, {events = 32764, data = {ptr = 0x7f40d418353c <__GI___libc_free+76>, fd = -736611012, u32 = 3558356284, u64 = 139916412990780}}, {events = 0, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 4294967295, data = {ptr = 0x2, fd = 2, u32 = 2, u64 = 2}}, {events = 39887584, data = {ptr = 0x362af88000000000, fd = 0, u32 = 0, u64 = 3903205255709458432}}, {events = 32764, data = {ptr = 0x2747c90, fd = 41188496, u32 = 41188496, u64 = 41188496}}, {events = 908786288, data = {ptr = 0x362afac000007ffc, fd = 32764, u32 = 32764, u64 = 3903207729610653692}}, {events = 32764, data = {ptr = 0x7ffc362b06c0, fd = 908789440, u32 = 908789440, u64 = 140721217275584}}, {events = 20873197, data = {ptr = 0x362af9f000000000, fd = 0, u32 = 0, u64 = 3903206836257423360}}, {events = 32764, data = {ptr = 0x7ffc362b06c0, fd = 908789440, u32 = 908789440, u64 = 140721217275584}}, {events = 908786368, data = {ptr = 0x362afa0000007ffc, fd = 32764, u32 = 32764, u64 = 3903206904976932860}}, {events = 32764, data = {ptr = 0x7ffc362af980, fd = 908786048, u32 = 908786048, u64 = 140721217272192}}, {events = 39887584, data = {ptr = 0x26f8df000000000, fd = 0, u32 = 0, u64 = 175514972422406144}}, {events = 0, data = {ptr = 0x7ffc362af9c0, fd = 908786112, u32 = 908786112, u64 = 140721217272256}}, {events = 2, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 0, data = {ptr = 0x2, fd = 2, u32 = 2, u64 = 2}}, {events = 0, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 0, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 0, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 0, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 0, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 0, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 908788613, data = {ptr = 0x362b02e800007ffc, fd = 32764, u32 = 32764, u64 = 3903216697502367740}}, {events = 32764, data = {ptr = 0x1925965, fd = 26368357, u32 = 26368357, u64 = 26368357}}, {events = 0, data = {ptr = 0x193bd9000000000, fd = 0, u32 = 0, u64 = 113642841787334656}}, {events = 0, data = {ptr = 0x7ffc362afac0, fd = 908786368, u32 = 908786368, u64 = 140721217272512}}, {events = 16843009, data = {ptr = 0x100000001010000, fd = 16842752, u32 = 16842752, u64 = 72057594054770688}}, {events = 16842753, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 16777216, data = {ptr = 0x193bd9000000000, fd = 0, u32 = 0, u64 = 113642841787334656}}, {events = 0, data = {ptr = 0x1480002 <icu_60::UnicodeSet::removeAll(icu_60::UnicodeString const&)+98>, fd = 21495810, u32 = 21495810, u64 = 21495810}}, {events = 57, data = {ptr = 0xbbe9c8700000000, fd = 0, u32 = 0, u64 = 846285883626749952}}, {events = 0, data = {ptr = 0x7ffc362afa00, fd = 908786176, u32 = 908786176, u64 = 140721217272320}}, {events = 22076324, data = {ptr = 0x362afab000000000, fd = 0, u32 = 0, u64 = 3903207660891144192}}, {events = 32764, data = {ptr = 0xffffffff00000039, fd = 57, u32 = 57, u64 = 18446744069414584377}}, {events = 26459536, data = {ptr = 0x362afac000000000, fd = 0, u32 = 0, u64 = 3903207729610620928}}, {events = 32764, data = {ptr = 0x7ffc362a0101, fd = 908722433, u32 = 908722433, u64 = 140721217208577}}, {events = 26368357, data = {ptr = 0x362afa4000000000, fd = 0, u32 = 0, u64 = 3903207179854807040}}, {events = 32764, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 908786944, data = {ptr = 0x362b020800007ffc, fd = 32764, u32 = 32764, u64 = 3903215735429693436}}, {events = 32764, data = {ptr = 0x193bd90 <vtable for icu_60::UObject+16>, fd = 26459536, u32 = 26459536, u64 = 26459536}}, {events = 3146050, data = {ptr = 0x34003300320031, fd = 3276849, u32 = 3276849, u64 = 14636917835563057}}, {events = 3538997, data = {ptr = 0x3900380037, fd = 3670071, u32 = 3670071, u64 = 244816805943}}, {events = 0, data = {ptr = 0x362afac000007ffc, fd = 32764, u32 = 32764, u64 = 3903207729610653692}}, {events = 32764, data = {ptr = 0x7ffc362b0208, fd = 908788232, u32 = 908788232, u64 = 140721217274376}}, {events = 908786376, data = {ptr = 0x362afa7000007ffc, fd = 32764, u32 = 32764, u64 = 3903207386013270012}}, {events = 32764, data = {ptr = 0x13e8f7c <icu_60::DecimalFormatSymbols::~DecimalFormatSymbols()+140>, fd = 20877180, u32 = 20877180, u64 = 20877180}}, {events = 40822392, data = {ptr = 0x362b06c000000000, fd = 0, u32 = 0, u64 = 3903220923750154240}}, {events = 32764, data = {ptr = 0x26ee678, fd = 40822392, u32 = 40822392, u64 = 40822392}}, {events = 40820016, data = {ptr = 0x362b05d000000000, fd = 0, u32 = 0, u64 = 3903219892958003200}}, {events = 32764, data = {ptr = 0x1353832 <icu_60::DateTimePatternGenerator::setDecimalSymbols(icu_60::Locale const&, UErrorCode&)+50>, fd = 20265010, u32 = 20265010, u64 = 20265010}}, {events = 26459536, data = {ptr = 0x2e002200000000, fd = 0, u32 = 0, u64 = 12947994957578240}}, {events = 0, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}...}
        pe = <optimized out>
        e = {events = 1, data = {ptr = 0x3, fd = 3, u32 = 3, u64 = 3}}
        real_timeout = 181
        q = <optimized out>
        w = <optimized out>
        sigset = {__val = {0 <repeats 16 times>}}
        psigset = 0x0
        base = 19356723387
        have_signals = <optimized out>
        nevents = 1
        count = 48
        nfds = 1
        fd = <optimized out>
        op = <optimized out>
        i = <optimized out>
        __PRETTY_FUNCTION__ = "uv__io_poll"
#11 0x00000000009bb225 in uv_run (loop=0x218cda0 <default_loop_struct>, mode=UV_RUN_DEFAULT) at ../deps/uv/src/unix/core.c:370
        timeout = <optimized out>
        r = 1
        ran_pending = <optimized out>
#12 0x00000000008d6b65 in node::Start(uv_loop_s*, int, char const* const*, int, char const* const*) ()
No symbol table info available.
#13 0x00000000008d5da0 in node::Start(int, char**) ()
No symbol table info available.
#14 0x00007f40d411f830 in __libc_start_main (main=0x89f510 <main>, argc=2, argv=0x7ffc362b2c08, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffc362b2bf8) at ../csu/libc-start.c:291
        self = <optimized out>
        result = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {0, -949488590861498358, 9041368, 140721217285120, 0, 0, 948803583395629066, 888079530644342794}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x7ffc362b2c20, 0x7f40d561d168}, data = {prev = 0x0, cleanup = 0x0, canceltype = 908799008}}}
        not_first_call = <optimized out>
#15 0x000000000089f601 in _start ()
No symbol table info available.

@mkhahani
Copy link
Author

mkhahani commented Feb 5, 2020

I tried taking the snapshot using chrome dev tools and the process crashed again. So you are right, it's some thing about my app.

I know it's out of scope of this project but according to your experience, I'll appreciate if you could put me in the right direction. Thanks in advance.

BTW here is the core dump when taking the snapshot by chrome:

core dump
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x0000000000fd0a93 in v8::internal::V8HeapExplorer::AddEntry(v8::internal::HeapObject*) ()
[Current thread is 1 (Thread 0x7f437a707740 (LWP 12773))]
(gdb) bt full
#0  0x0000000000fd0a93 in v8::internal::V8HeapExplorer::AddEntry(v8::internal::HeapObject*) ()
No symbol table info available.
#1  0x0000000000fc8780 in v8::internal::V8HeapExplorer::SetContextReference(v8::internal::HeapObject*, int, v8::internal::String*, v8::internal::Object*, int) ()
No symbol table info available.
#2  0x0000000000fcabb0 in v8::internal::V8HeapExplorer::ExtractContextReferences(int, v8::internal::Context*) ()
No symbol table info available.
#3  0x0000000000fcacb5 in v8::internal::V8HeapExplorer::ExtractReferencesPass2(int, v8::internal::HeapObject*) ()
No symbol table info available.
#4  0x0000000000fd1e85 in bool v8::internal::V8HeapExplorer::IterateAndExtractSinglePass<&v8::internal::V8HeapExplorer::ExtractReferencesPass2>() ()
No symbol table info available.
#5  0x0000000000fd2448 in v8::internal::V8HeapExplorer::IterateAndExtractReferences(v8::internal::SnapshotFiller*) ()
No symbol table info available.
#6  0x0000000000fd2832 in v8::internal::HeapSnapshotGenerator::GenerateSnapshot() ()
No symbol table info available.
#7  0x0000000000fbd26c in v8::internal::HeapProfiler::TakeSnapshot(v8::ActivityControl*, v8::HeapProfiler::ObjectNameResolver*) ()
No symbol table info available.
#8  0x0000000000a4032b in v8_inspector::V8HeapProfilerAgentImpl::takeHeapSnapshot(v8_inspector::protocol::Maybe<bool>) ()
No symbol table info available.
#9  0x00000000009ea4a9 in v8_inspector::protocol::HeapProfiler::DispatcherImpl::takeHeapSnapshot(int, std::unique_ptr<v8_inspector::protocol::DictionaryValue, std::default_delete<v8_inspector::protocol::DictionaryValue> >, v8_inspector::protocol::ErrorSupport*) ()
No symbol table info available.
#10 0x00000000009ecd16 in v8_inspector::protocol::HeapProfiler::DispatcherImpl::dispatch(int, v8_inspector::String16 const&, std::unique_ptr<v8_inspector::protocol::DictionaryValue, std::default_delete<v8_inspector::protocol::DictionaryValue> >) ()
No symbol table info available.
#11 0x00000000009d588c in v8_inspector::protocol::UberDispatcher::dispatch(std::unique_ptr<v8_inspector::protocol::Value, std::default_delete<v8_inspector::protocol::Value> >) ()
No symbol table info available.
#12 0x0000000000a46ea2 in v8_inspector::V8InspectorSessionImpl::dispatchProtocolMessage(v8_inspector::StringView const&) ()
No symbol table info available.
#13 0x0000000000972edc in node::inspector::InspectorIo::DispatchMessages() [clone .part.69] ()
No symbol table info available.
#14 0x0000000000ea6ac1 in v8::internal::Isolate::InvokeApiInterruptCallbacks() ()
No symbol table info available.
#15 0x0000000000daac30 in v8::internal::StackGuard::HandleInterrupts() ()
No symbol table info available.
#16 0x000000000102c9b5 in v8::internal::Runtime_StackGuard(int, v8::internal::Object**, v8::internal::Isolate*) ()
No symbol table info available.
#17 0x0000089bc2f042fd in ?? ()
No symbol table info available.
#18 0x0000089bc2f04241 in ?? ()
No symbol table info available.
#19 0x00007ffc3cdf4670 in ?? ()
No symbol table info available.
#20 0x0000000000000006 in ?? ()
--Type <RET> for more, q to quit, c to continue without paging--c
No symbol table info available.
#21 0x00007ffc3cdf46e8 in ?? ()
No symbol table info available.
#22 0x0000089bc3349c37 in ?? ()
No symbol table info available.
#23 0x00002c75aceb3f79 in ?? ()
No symbol table info available.
#24 0x000006e370384721 in ?? ()
No symbol table info available.
#25 0x00000d04b51f8401 in ?? ()
No symbol table info available.
#26 0x0000098edef8aea1 in ?? ()
No symbol table info available.
#27 0x00002c75aceb4179 in ?? ()
No symbol table info available.
#28 0x0000000100000000 in ?? ()
No symbol table info available.
#29 0x0000008e00000000 in ?? ()
No symbol table info available.
#30 0x0000098edef8e041 in ?? ()
No symbol table info available.
#31 0x0000026a3ff3bcf9 in ?? ()
No symbol table info available.
#32 0x00001d4df590b799 in ?? ()
No symbol table info available.
#33 0x00007ffc3cdf4758 in ?? ()
No symbol table info available.
#34 0x0000089bc2fbedb6 in ?? ()
No symbol table info available.
#35 0x000021a02dec4969 in ?? ()
No symbol table info available.
#36 0x0000350a84f44089 in ?? ()
No symbol table info available.
#37 0x00002eb24bc91591 in ?? ()
No symbol table info available.
#38 0x00002eb24bc915b1 in ?? ()
No symbol table info available.
#39 0x000021a02dec4969 in ?? ()
No symbol table info available.
#40 0x0000350a84f35e41 in ?? ()
No symbol table info available.
#41 0x0000026a3ff3bcf9 in ?? ()
No symbol table info available.
#42 0x00002eb24bc91591 in ?? ()
No symbol table info available.
#43 0x0000011500000000 in ?? ()
No symbol table info available.
#44 0x000029f100cdc971 in ?? ()
No symbol table info available.
#45 0x000034b824960e01 in ?? ()
No symbol table info available.
#46 0x0000098edef8e041 in ?? ()
No symbol table info available.
#47 0x00007ffc3cdf47b8 in ?? ()
No symbol table info available.
#48 0x0000089bc2fbedb6 in ?? ()
No symbol table info available.
#49 0x0000350a84f44089 in ?? ()
No symbol table info available.
#50 0x0000202b64a822d1 in ?? ()
No symbol table info available.
#51 0x000034b82495f309 in ?? ()
No symbol table info available.
#52 0x00002eb24bc91591 in ?? ()
No symbol table info available.
#53 0x000034b824960e01 in ?? ()
No symbol table info available.
#54 0x00000d8cf0075cb1 in ?? ()
No symbol table info available.
#55 0x000000e300000000 in ?? ()
No symbol table info available.
#56 0x000029f100cdc289 in ?? ()
No symbol table info available.
#57 0x000034b824960db9 in ?? ()
No symbol table info available.
#58 0x0000098edef8e041 in ?? ()
No symbol table info available.
#59 0x00007ffc3cdf4808 in ?? ()
No symbol table info available.
#60 0x0000089bc2f0535f in ?? ()
No symbol table info available.
#61 0x0000202b64a822d1 in ?? ()
No symbol table info available.
#62 0x00000d8cf0075c79 in ?? ()
No symbol table info available.
#63 0x0000202b64a822d1 in ?? ()
No symbol table info available.
#64 0x00000d04b51f1fb9 in ?? ()
No symbol table info available.
#65 0x0000350a84f44089 in ?? ()
No symbol table info available.
#66 0x0000000100000000 in ?? ()
No symbol table info available.
#67 0x000034b824960db9 in ?? ()
No symbol table info available.
#68 0x0000000000000022 in ?? ()
No symbol table info available.
#69 0x00007ffc3cdf4888 in ?? ()
No symbol table info available.
#70 0x0000089bc3268a6f in ?? ()
No symbol table info available.
#71 0x00000d04b51f1fb9 in ?? ()
No symbol table info available.
#72 0x0000350a84f44089 in ?? ()
No symbol table info available.
#73 0x0000202b64a822d1 in ?? ()
No symbol table info available.
#74 0x0000004e00000000 in ?? ()
No symbol table info available.
#75 0x00002c75aceb3e01 in ?? ()
No symbol table info available.
#76 0x0000191d65cdce69 in ?? ()
No symbol table info available.
#77 0x0000000000004268 in ?? ()
No symbol table info available.
#78 0x0000000000004268 in ?? ()
No symbol table info available.
#79 0x00002c75aceb36f1 in ?? ()
No symbol table info available.
#80 0x00002c75aceb35f1 in ?? ()
No symbol table info available.
#81 0x00002c75aceb3739 in ?? ()
No symbol table info available.
#82 0x0000350a84f44089 in ?? ()
No symbol table info available.
#83 0x000034b824960b31 in ?? ()
No symbol table info available.
#84 0x0000098edef8e041 in ?? ()
No symbol table info available.
#85 0x00007ffc3cdf4900 in ?? ()
No symbol table info available.
#86 0x0000089bc324f5c8 in ?? ()
No symbol table info available.
#87 0x00000d8cf0075b61 in ?? ()
No symbol table info available.
#88 0x0000350a84f44089 in ?? ()
No symbol table info available.
#89 0x0000000000b10f8f in v8::internal::Builtin_HandleApiCall(int, v8::internal::Object**, v8::internal::Isolate*) ()
No symbol table info available.
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

@bnoordhuis
Copy link
Owner

Heap corruption is often difficult to debug because the real bug is frequently removed in time and space from the crash but I'd start with excluding the other add-on (posix), if possible. That will at least tell you if it's an issue with node or the add-on.

@mkhahani
Copy link
Author

mkhahani commented Feb 5, 2020

Great! Looking for your update.

@bnoordhuis
Copy link
Owner

What do you mean, "your update"?

@mkhahani
Copy link
Author

mkhahani commented Feb 5, 2020

Oops! I thought you're going to do some change by saying "I'd start with excluding the other add-on".

Okay I'll try to test without other add-ons. Thanks for your help.

@bnoordhuis
Copy link
Owner

Happy to help. I'll close this out.

@mkhahani
Copy link
Author

FYI the crash was for node.js version 8 and it works well on higher node.js versions (i.e. 10 and 12).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants