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

Node.js crashed with the following stacktrace #29435

Closed
ghost opened this issue Sep 4, 2019 · 13 comments
Closed

Node.js crashed with the following stacktrace #29435

ghost opened this issue Sep 4, 2019 · 13 comments
Labels
http2 Issues or PRs related to the http2 subsystem.

Comments

@ghost
Copy link

ghost commented Sep 4, 2019

Node.js crashes before sending response with the below stack trace.

  • Version: v8.16.1
  • Platform: Darwin mbp.domain.name 18.7.0 Darwin Kernel Version 18.7.0: Thu Jun 20 18:42:21 PDT 2019; root:xnu-4903.270.47~4/RELEASE_X86_64 x86_64
  • Subsystem:
node[3549]: ../src/node_http2.cc:1930:static void node::http2::Http2Session::OnStreamAllocImpl(size_t, uv_buf_t *, void *): Assertion `(session->stream_buf_.base) == (nullptr)' failed.
 1: node::Abort() [/usr/local/bin/node]
 2: node::(anonymous namespace)::DomainEnter(node::Environment*, v8::Local<v8::Object>) [/usr/local/bin/node]
 3: node::http2::Http2Session::OnStreamAllocImpl(unsigned long, uv_buf_t*, void*) [/usr/local/bin/node]
 4: node::TLSWrap::ClearOut() [/usr/local/bin/node]
 5: node::TLSWrap::DoRead(long, uv_buf_t const*, uv_handle_type) [/usr/local/bin/node]
 6: node::LibuvStreamWrap::OnRead(uv_stream_s*, long, uv_buf_t const*) [/usr/local/bin/node]
 7: uv__stream_io [/usr/local/bin/node]
 8: uv__io_poll [/usr/local/bin/node]
 9: uv_run [/usr/local/bin/node]
10: node::Start(v8::Isolate*, node::IsolateData*, int, char const* const*, int, char const* const*) [/usr/local/bin/node]
11: node::Start(uv_loop_s*, int, char const* const*, int, char const* const*) [/usr/local/bin/node]
12: node::Start(int, char**) [/usr/local/bin/node]
13: start [/usr/local/bin/node]
Waiting for the debugger to disconnect...

Process finished with exit code 0

The server uses Firestore as the backend. Kindly let me know how to fix this.

@mscdex
Copy link
Contributor

mscdex commented Sep 4, 2019

Even though this is a different backtrace, it may be the same underlying issue as #29353.

@Trott Trott added the http2 Issues or PRs related to the http2 subsystem. label Sep 4, 2019
@Trott
Copy link
Member

Trott commented Sep 4, 2019

@nodejs/http2

@mcollina
Copy link
Member

mcollina commented Sep 4, 2019

@jsloop42 would you mind to add a way to reproduce this crash?

Could you try using Node 10 and see if the issue persists?

@addaleax
Copy link
Member

addaleax commented Sep 4, 2019

@mscdex That’s pretty unlikely, but it was probably also introduced in the v8.x backport of 8a4a193.

@ghost
Copy link
Author

ghost commented Sep 5, 2019

Please find the code that produces the crash.

public async checkForDuplicatePosts(body: string, postId: string): Promise<Post[]> {
    let xs = await this.fsDB.collection(Collection.Posts).get().then(xs => xs).catch(err => []);  // Fetches the entire collection
    let dupList: Post[] = [];
    xs.forEach(function(doc) {
        let post = doc.data();
        if (post["postId"] != postId && Utils.isDuplicatePost(body, post)) {  // runs string similarity algorithm
            dupList.push(ModelUtils.getPostFromData(post));  // converts the DocumentData to Entity object
        }
    });
    return dupList;
}

This crashes even if I fetch the collection with pagination and runs the string similarity algorithm on it.


Since I am using Firebase as the deployment target, the node version I am having to use is v8 as the environment does not support other versions as of now.

@addaleax
Copy link
Member

addaleax commented Sep 6, 2019

I’ve looked into this, but with the limited information available, I’d say either this is also addressed by #29399, or we need more information (e.g. a reproduction, a core dump, etc.).

@ghost
Copy link
Author

ghost commented Sep 19, 2019

Please find the debug log.

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'start' ]
2 info using npm@6.4.1
3 info using node@v8.16.1
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle server-api@1.0.7~prestart: server-api@1.0.7
6 info lifecycle server-api@1.0.7~start: server-api@1.0.7
7 verbose lifecycle server-api@1.0.7~start: unsafe-perm in lifecycle true
8 verbose lifecycle server-api@1.0.7~start: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/jsloop/dev/api-server/cloud_functions/api/functions/node_modules/.bin:/Users/jsloop/env/google-cloud-sdk/bin:/Users/jsloop/bin:/usr/local/Cellar/mongodb-community@4.0/4.0.12/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin
9 verbose lifecycle server-api@1.0.7~start: CWD: /Users/jsloop/dev/api-server/cloud_functions/api/functions
10 silly lifecycle server-api@1.0.7~start: Args: [ '-c', './start' ]
11 silly lifecycle server-api@1.0.7~start: Returned: code: 130  signal: null
12 info lifecycle server-api@1.0.7~start: Failed to exec start script
13 verbose stack Error: server-api@1.0.7 start: `./start`
13 verbose stack Exit status 130
13 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack     at emitTwo (events.js:126:13)
13 verbose stack     at EventEmitter.emit (events.js:214:7)
13 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at emitTwo (events.js:126:13)
13 verbose stack     at ChildProcess.emit (events.js:214:7)
13 verbose stack     at maybeClose (internal/child_process.js:915:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
14 verbose pkgid server-api@1.0.7
15 verbose cwd /Users/jsloop/dev/api-server/cloud_functions/api/functions/src
16 verbose Darwin 18.7.0
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
18 verbose node v8.16.1
19 verbose npm  v6.4.1
20 error code ELIFECYCLE
21 error errno 130
22 error server-api@1.0.7 start: `./start`
22 error Exit status 130
23 error Failed at the server-api@1.0.7 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 130, true ]

@addaleax
Copy link
Member

@jsloop42 Thanks, but a reproduction or a core dump or something along those lines would really be more helpful. The npm debug log doesn’t really say more than that there was an error.

@ghost
Copy link
Author

ghost commented Sep 27, 2019

Please find a crash log.

Process:               node [67647]
Path:                  /usr/local/bin/node
Identifier:            node
Version:               ???
Code Type:             X86-64 (Native)
Parent Process:        node [67645]
Responsible:           node [67647]
User ID:               502

Date/Time:             2019-09-20 ---
OS Version:            Mac OS X 10.14.6 (18G87)
Report Version:        12
Anonymous UUID:        331F6FF4-843C---


Time Awake Since Boot: 40000 seconds

System Integrity Protection: enabled

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

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Application Specific Information:
abort() called

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib          0x00007fff7e90a2c6 __pthread_kill + 10
1   libsystem_pthread.dylib         0x00007fff7e9c5bf1 pthread_kill + 284
2   libsystem_c.dylib               0x00007fff7e8746a6 abort + 127
3   node                            0x00000001000283e3 node::Abort() + 34
4   node                            0x0000000100027608 node::Assert(char const* const (*) [4]) + 140
5   node                            0x000000010005bfca node::http2::Http2Session::OnStreamAllocImpl(unsigned long, uv_buf_t*, void*) + 96
6   node                            0x00000001000d82ab node::TLSWrap::ClearOut() + 153
7   node                            0x00000001000d905f node::TLSWrap::DoRead(long, uv_buf_t const*, uv_handle_type) + 107
8   node                            0x000000010009875b node::LibuvStreamWrap::OnRead(uv_stream_s*, long, uv_buf_t const*) + 161
9   node                            0x00000001008f0dbb uv__stream_io + 1245
10  node                            0x00000001008f84c1 uv__io_poll + 1934
11  node                            0x00000001008e8f3d uv_run + 315
12  node                            0x00000001000304ad node::Start(v8::Isolate*, node::IsolateData*, int, char const* const*, int, char const* const*) + 805
13  node                            0x000000010002fa2a node::Start(uv_loop_s*, int, char const* const*, int, char const* const*) + 461
14  node                            0x000000010002f189 node::Start(int, char**) + 522
15  node                            0x0000000100001334 start + 52

Thread 1:
0   libsystem_kernel.dylib          0x00007fff7e90786a __psynch_cvwait + 10
1   libsystem_pthread.dylib         0x00007fff7e9c656e _pthread_cond_wait + 722
2   node                            0x00000001008f3b33 uv_cond_wait + 9
3   node                            0x0000000100074f70 node::TaskQueue<v8::Task>::BlockingPop() + 58
4   node                            0x00000001000745ee node::BackgroundRunner(void*) + 88
5   libsystem_pthread.dylib         0x00007fff7e9c32eb _pthread_body + 126
6   libsystem_pthread.dylib         0x00007fff7e9c6249 _pthread_start + 66
7   libsystem_pthread.dylib         0x00007fff7e9c240d thread_start + 13

Thread 2:
0   libsystem_kernel.dylib          0x00007fff7e90786a __psynch_cvwait + 10
1   libsystem_pthread.dylib         0x00007fff7e9c656e _pthread_cond_wait + 722
2   node                            0x00000001008f3b33 uv_cond_wait + 9
3   node                            0x0000000100074f70 node::TaskQueue<v8::Task>::BlockingPop() + 58
4   node                            0x00000001000745ee node::BackgroundRunner(void*) + 88
5   libsystem_pthread.dylib         0x00007fff7e9c32eb _pthread_body + 126
6   libsystem_pthread.dylib         0x00007fff7e9c6249 _pthread_start + 66
7   libsystem_pthread.dylib         0x00007fff7e9c240d thread_start + 13

Thread 3:
0   libsystem_kernel.dylib          0x00007fff7e90786a __psynch_cvwait + 10
1   libsystem_pthread.dylib         0x00007fff7e9c656e _pthread_cond_wait + 722
2   node                            0x00000001008f3b33 uv_cond_wait + 9
3   node                            0x0000000100074f70 node::TaskQueue<v8::Task>::BlockingPop() + 58
4   node                            0x00000001000745ee node::BackgroundRunner(void*) + 88
5   libsystem_pthread.dylib         0x00007fff7e9c32eb _pthread_body + 126
6   libsystem_pthread.dylib         0x00007fff7e9c6249 _pthread_start + 66
7   libsystem_pthread.dylib         0x00007fff7e9c240d thread_start + 13

Thread 4:
0   libsystem_kernel.dylib          0x00007fff7e90786a __psynch_cvwait + 10
1   libsystem_pthread.dylib         0x00007fff7e9c656e _pthread_cond_wait + 722
2   node                            0x00000001008f3b33 uv_cond_wait + 9
3   node                            0x0000000100074f70 node::TaskQueue<v8::Task>::BlockingPop() + 58
4   node                            0x00000001000745ee node::BackgroundRunner(void*) + 88
5   libsystem_pthread.dylib         0x00007fff7e9c32eb _pthread_body + 126
6   libsystem_pthread.dylib         0x00007fff7e9c6249 _pthread_start + 66
7   libsystem_pthread.dylib         0x00007fff7e9c240d thread_start + 13

Thread 5:
0   libsystem_kernel.dylib          0x00007fff7e904266 semaphore_wait_trap + 10
1   node                            0x00000001008f3fae uv_sem_wait + 16
2   node                            0x00000001000aedec node::inspector::(anonymous namespace)::StartIoThreadMain(void*) + 28
3   libsystem_pthread.dylib         0x00007fff7e9c32eb _pthread_body + 126
4   libsystem_pthread.dylib         0x00007fff7e9c6249 _pthread_start + 66
5   libsystem_pthread.dylib         0x00007fff7e9c240d thread_start + 13

Thread 6:
0   libsystem_kernel.dylib          0x00007fff7e90786a __psynch_cvwait + 10
1   libsystem_pthread.dylib         0x00007fff7e9c656e _pthread_cond_wait + 722
2   node                            0x00000001008f3b33 uv_cond_wait + 9
3   node                            0x00000001008e571d worker + 71
4   libsystem_pthread.dylib         0x00007fff7e9c32eb _pthread_body + 126
5   libsystem_pthread.dylib         0x00007fff7e9c6249 _pthread_start + 66
6   libsystem_pthread.dylib         0x00007fff7e9c240d thread_start + 13

Thread 7:
0   libsystem_kernel.dylib          0x00007fff7e90786a __psynch_cvwait + 10
1   libsystem_pthread.dylib         0x00007fff7e9c656e _pthread_cond_wait + 722
2   node                            0x00000001008f3b33 uv_cond_wait + 9
3   node                            0x00000001008e571d worker + 71
4   libsystem_pthread.dylib         0x00007fff7e9c32eb _pthread_body + 126
5   libsystem_pthread.dylib         0x00007fff7e9c6249 _pthread_start + 66
6   libsystem_pthread.dylib         0x00007fff7e9c240d thread_start + 13

Thread 8:
0   libsystem_kernel.dylib          0x00007fff7e90786a __psynch_cvwait + 10
1   libsystem_pthread.dylib         0x00007fff7e9c656e _pthread_cond_wait + 722
2   node                            0x00000001008f3b33 uv_cond_wait + 9
3   node                            0x00000001008e571d worker + 71
4   libsystem_pthread.dylib         0x00007fff7e9c32eb _pthread_body + 126
5   libsystem_pthread.dylib         0x00007fff7e9c6249 _pthread_start + 66
6   libsystem_pthread.dylib         0x00007fff7e9c240d thread_start + 13

Thread 9:
0   libsystem_kernel.dylib          0x00007fff7e90786a __psynch_cvwait + 10
1   libsystem_pthread.dylib         0x00007fff7e9c656e _pthread_cond_wait + 722
2   node                            0x00000001008f3b33 uv_cond_wait + 9
3   node                            0x00000001008e571d worker + 71
4   libsystem_pthread.dylib         0x00007fff7e9c32eb _pthread_body + 126
5   libsystem_pthread.dylib         0x00007fff7e9c6249 _pthread_start + 66
6   libsystem_pthread.dylib         0x00007fff7e9c240d thread_start + 13

Thread 0 crashed with X86 Thread State (64-bit):
  rax: 0x0000000000000000  rbx: 0x00000001103bd5c0  rcx: 0x00007ffeefbf0488  rdx: 0x0000000000000000
  rdi: 0x0000000000000307  rsi: 0x0000000000000006  rbp: 0x00007ffeefbf04c0  rsp: 0x00007ffeefbf0488
   r8: 0x00000000000130a8   r9: 0x00007fffb5062048  r10: 0x0000000000000000  r11: 0x0000000000000206
  r12: 0x0000000000000307  r13: 0x000000010120f976  r14: 0x0000000000000006  r15: 0x000000000000002d
  rip: 0x00007fff7e90a2c6  rfl: 0x0000000000000206  cr2: 0x00007fffb5060188
  
Logical CPU:     0
Error Code:      0x02000148
Trap Number:     133


Binary Images:
       0x100000000 -        0x1014c2017 +node (???) <14C9FF58-3AA8-305C-9EAD-DB2341DA10B9> /usr/local/bin/node
       0x11031b000 -        0x1103856ef  dyld (655.1.1) <D3E77331-ACE5-349D-A7CC-433D626D4A5B> /usr/lib/dyld
    0x7fff5283f000 -     0x7fff52c83fe7  com.apple.CoreFoundation (6.9 - 1575.17) <EE7948FC-FDA8-3F95-A1E0-69FAED5D81AA> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
    0x7fff7b376000 -     0x7fff7b377ffb  libDiagnosticMessagesClient.dylib (107) <A14D0819-0970-34CD-8680-80E4D7FE8C2C> /usr/lib/libDiagnosticMessagesClient.dylib
    0x7fff7b7b6000 -     0x7fff7b7b7ffb  libSystem.B.dylib (1252.250.1) <E6C586CE-EEFA-3B4B-9316-AC4322AF0E75> /usr/lib/libSystem.B.dylib
    0x7fff7b9f9000 -     0x7fff7ba4cff7  libc++.1.dylib (400.9.4) <9A60A190-6C34-339F-BB3D-AACE942009A4> /usr/lib/libc++.1.dylib
    0x7fff7ba4d000 -     0x7fff7ba62ff7  libc++abi.dylib (400.17) <38C09CED-9090-3719-90F3-04A2749F5428> /usr/lib/libc++abi.dylib
    0x7fff7c4a9000 -     0x7fff7c70affb  libicucore.A.dylib (62141.0.1) <A0D63918-76E9-3C1B-B255-46F4C1DA7FE8> /usr/lib/libicucore.A.dylib
    0x7fff7cfed000 -     0x7fff7d772fdf  libobjc.A.dylib (756.2) <7C312627-43CB-3234-9324-4DEA92D59F50> /usr/lib/libobjc.A.dylib
    0x7fff7de5c000 -     0x7fff7de6eff7  libz.1.dylib (70.200.4) <B048FC1F-058F-3A08-A1FE-81D5308CB3E6> /usr/lib/libz.1.dylib
    0x7fff7e652000 -     0x7fff7e656ff3  libcache.dylib (81) <1987D1E1-DB11-3291-B12A-EBD55848E02D> /usr/lib/system/libcache.dylib
    0x7fff7e657000 -     0x7fff7e661ff3  libcommonCrypto.dylib (60118.250.2) <1765BB6E-6784-3653-B16B-CB839721DC9A> /usr/lib/system/libcommonCrypto.dylib
    0x7fff7e662000 -     0x7fff7e669ff7  libcompiler_rt.dylib (63.4) <5212BA7B-B7EA-37B4-AF6E-AC4F507EDFB8> /usr/lib/system/libcompiler_rt.dylib
    0x7fff7e66a000 -     0x7fff7e673ff7  libcopyfile.dylib (146.250.1) <98CD00CD-9B91-3B5C-A9DB-842638050FA8> /usr/lib/system/libcopyfile.dylib
    0x7fff7e674000 -     0x7fff7e6f8fc3  libcorecrypto.dylib (602.260.2) <01464D24-570C-3B83-9D18-467769E0FCDD> /usr/lib/system/libcorecrypto.dylib
    0x7fff7e77f000 -     0x7fff7e7b8ff7  libdispatch.dylib (1008.270.1) <97273678-E94C-3C8C-89F6-2E2020F4B43B> /usr/lib/system/libdispatch.dylib
    0x7fff7e7b9000 -     0x7fff7e7e5ff7  libdyld.dylib (655.1.1) <002418CC-AD11-3D10-865B-015591D24E6C> /usr/lib/system/libdyld.dylib
    0x7fff7e7e6000 -     0x7fff7e7e6ffb  libkeymgr.dylib (30) <0D0F9CA2-8D5A-3273-8723-59987B5827F2> /usr/lib/system/libkeymgr.dylib
    0x7fff7e7f4000 -     0x7fff7e7f4ff7  liblaunch.dylib (1336.261.2) <2B07E27E-D404-3E98-9D28-BCA641E5C479> /usr/lib/system/liblaunch.dylib
    0x7fff7e7f5000 -     0x7fff7e7fafff  libmacho.dylib (927.0.3) <A377D608-77AB-3F6E-90F0-B4F251A5C12F> /usr/lib/system/libmacho.dylib
    0x7fff7e7fb000 -     0x7fff7e7fdffb  libquarantine.dylib (86.220.1) <6D0BC770-7348-3608-9254-F7FFBD347634> /usr/lib/system/libquarantine.dylib
    0x7fff7e7fe000 -     0x7fff7e7ffff7  libremovefile.dylib (45.200.2) <9FBEB2FF-EEBE-31BC-BCFC-C71F8D0E99B6> /usr/lib/system/libremovefile.dylib
    0x7fff7e800000 -     0x7fff7e817ff3  libsystem_asl.dylib (356.200.4) <A62A7249-38B8-33FA-9875-F1852590796C> /usr/lib/system/libsystem_asl.dylib
    0x7fff7e818000 -     0x7fff7e818ff7  libsystem_blocks.dylib (73) <A453E8EE-860D-3CED-B5DC-BE54E9DB4348> /usr/lib/system/libsystem_blocks.dylib
    0x7fff7e819000 -     0x7fff7e8a0fff  libsystem_c.dylib (1272.250.1) <7EDACF78-2FA3-35B8-B051-D70475A35117> /usr/lib/system/libsystem_c.dylib
    0x7fff7e8a1000 -     0x7fff7e8a4ffb  libsystem_configuration.dylib (963.270.3) <2B4A836D-68A4-33E6-8D48-CD4486B03387> /usr/lib/system/libsystem_configuration.dylib
    0x7fff7e8a5000 -     0x7fff7e8a8ff7  libsystem_coreservices.dylib (66) <719F75A4-74C5-3BA6-A09E-0C5A3E5889D7> /usr/lib/system/libsystem_coreservices.dylib
    0x7fff7e8a9000 -     0x7fff7e8affff  libsystem_darwin.dylib (1272.250.1) <EC9B39A5-9592-3577-8997-7DC721D20D8C> /usr/lib/system/libsystem_darwin.dylib
    0x7fff7e8b0000 -     0x7fff7e8b6ff7  libsystem_dnssd.dylib (878.270.2) <E9A5ACCF-E35F-3909-AF0A-2A37CD217276> /usr/lib/system/libsystem_dnssd.dylib
    0x7fff7e8b7000 -     0x7fff7e902ffb  libsystem_info.dylib (517.200.9) <D09D5AE0-2FDC-3A6D-93EC-729F931B1457> /usr/lib/system/libsystem_info.dylib
    0x7fff7e903000 -     0x7fff7e92bff7  libsystem_kernel.dylib (4903.270.47) <4195838C-EFEF-3CC9-B459-75032AF7EA1A> /usr/lib/system/libsystem_kernel.dylib
    0x7fff7e92c000 -     0x7fff7e977ff7  libsystem_m.dylib (3158.200.7) <F19B6DB7-014F-3820-831F-389CCDA06EF6> /usr/lib/system/libsystem_m.dylib
    0x7fff7e978000 -     0x7fff7e9a2fff  libsystem_malloc.dylib (166.270.1) <011F3AD0-8E6A-3A89-AE64-6E5F6840F30A> /usr/lib/system/libsystem_malloc.dylib
    0x7fff7e9a3000 -     0x7fff7e9adff7  libsystem_networkextension.dylib (767.250.2) <FF06F13A-AEFE-3A27-A073-910EF78AEA36> /usr/lib/system/libsystem_networkextension.dylib
    0x7fff7e9ae000 -     0x7fff7e9b5fff  libsystem_notify.dylib (172.200.21) <145B5CFC-CF73-33CE-BD3D-E8DDE268FFDE> /usr/lib/system/libsystem_notify.dylib
    0x7fff7e9b6000 -     0x7fff7e9bffef  libsystem_platform.dylib (177.270.1) <9D1FE5E4-EB7D-3B3F-A8D1-A96D9CF1348C> /usr/lib/system/libsystem_platform.dylib
    0x7fff7e9c0000 -     0x7fff7e9caff7  libsystem_pthread.dylib (330.250.2) <2D5C08FF-484F-3D59-9132-CE1DCB3F76D7> /usr/lib/system/libsystem_pthread.dylib
    0x7fff7e9cb000 -     0x7fff7e9ceff7  libsystem_sandbox.dylib (851.270.1) <9494594B-5199-3186-82AB-5FF8BED6EE16> /usr/lib/system/libsystem_sandbox.dylib
    0x7fff7e9cf000 -     0x7fff7e9d1ff3  libsystem_secinit.dylib (30.260.2) <EF1EA47B-7B22-35E8-BD9B-F7003DCB96AE> /usr/lib/system/libsystem_secinit.dylib
    0x7fff7e9d2000 -     0x7fff7e9d9ff3  libsystem_symptoms.dylib (820.267.1) <03F1C2DD-0F5A-3D9D-88F6-B26C0F94EB52> /usr/lib/system/libsystem_symptoms.dylib
    0x7fff7e9da000 -     0x7fff7e9effff  libsystem_trace.dylib (906.260.1) <FC761C3B-5434-3A52-912D-F1B15FAA8EB2> /usr/lib/system/libsystem_trace.dylib
    0x7fff7e9f1000 -     0x7fff7e9f6ffb  libunwind.dylib (35.4) <24A97A67-F017-3CFC-B0D0-6BD0224B1336> /usr/lib/system/libunwind.dylib
    0x7fff7e9f7000 -     0x7fff7ea26fff  libxpc.dylib (1336.261.2) <7DEE2300-6D8E-3C00-9C63-E3E80D56B0C4> /usr/lib/system/libxpc.dylib

External Modification Summary:
  Calls made by other processes targeting this process:
    task_for_pid: 1
    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: 261715
    thread_create: 0
    thread_set_state: 3773

VM Region Summary:
ReadOnly portion of Libraries: Total=274.0M resident=0K(0%) swapped_out_or_unallocated=274.0M(100%)
Writable regions: Total=664.3M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=664.3M(100%)
 
                                VIRTUAL   REGION 
REGION TYPE                        SIZE    COUNT (non-coalesced) 
===========                     =======  ======= 
Activity Tracing                   256K        1 
Kernel Alloc Once                    8K        1 
MALLOC                            79.3M       27 
MALLOC guard page                   16K        4 
Memory Tag 255                     1.0G      885 
STACK GUARD                       56.0M       10 
Stack                             72.1M       10 
__DATA                            4440K       44 
__LINKEDIT                       234.9M        3 
__TEXT                            39.1M       43 
__UNICODE                          564K        1 
mapped file                         24K        1 
shared memory                       12K        3 
===========                     =======  ======= 
TOTAL                              1.5G     1033 

@TheMax2000
Copy link

I'm still having a similar problem when receiving a lot of messages from @google-cloud/pubsub.
I'm on 8.16.2 and can reproduce fairly easily.

* thread #1, name = 'node', stop reason = signal SIGABRT
  * frame #0: libc.so.6`__GI_raise(sig=2) at raise.c:51
    frame #1: libc.so.6`__GI_abort at abort.c:79
    frame #2: 0x00007ffeb7355461 node`node::Abort() + 33
    frame #3: 0x00007ffeb735587b node`node::Assert(char const* const (*) [4]) + 123
    frame #4: 0x00007ffeb738f81a node`node::http2::Http2Session::OnStreamAllocImpl(unsigned long, uv_buf_t*, void*) + 106
    frame #5: 0x00007ffeb742860a node`node::TLSWrap::ClearOut() + 154
    frame #6: 0x00007ffeb7428dee node`node::TLSWrap::OnReadImpl(long, uv_buf_t const*, uv_handle_type, void*) + 174
    frame #7: 0x00007ffeb73dc87c node`node::LibuvStreamWrap::OnRead(uv_stream_s*, long, uv_buf_t const*) + 124
    frame #8: node`uv__read(stream=<unavailable>) at stream.c:1257
    frame #9: node`uv__stream_io(loop=<unavailable>, w=<unavailable>, events=<unavailable>) at stream.c:1324
    frame #10: node`uv__io_poll(loop=<unavailable>, timeout=<unavailable>) at linux-core.c:375
    frame #11: node`uv_run(loop=<unavailable>, mode=<unavailable>) at core.c:370
    frame #12: 0x00007ffeb735eb65 node`node::Start(uv_loop_s*, int, char const* const*, int, char const* const*) + 1205
    frame #13: 0x00007ffeb735dda0 node`node::Start(int, char**) + 352
    frame #14: libc.so.6`__libc_start_main(main=(node`main), argc=5, argv=0x00007ffeb6e5fcb8, init=<unavailable>, fini=<unavailable>, rtld_fini=<unavailable>, stack_end=0x00007ffeb6e5fca8) at libc-start.c:310
    frame #15: 0x00007ffeb7327601 node`_start + 41
  thread #2, stop reason = signal 0
    frame #0: 0x00007f23d5b829f3 libpthread.so.0`__pthread_cond_wait + 579
    frame #1: node`uv_cond_wait(cond=<unavailable>, mutex=<unavailable>) at thread.c:735
    frame #2: 0x00007ffeb73ad234 node`node::BackgroundRunner(void*) + 116
    frame #3: 0x00007f23d5b7c6db libpthread.so.0`start_thread + 219
    frame #4: libc.so.6`__GI___clone at clone.S:95
  thread #3, stop reason = signal 0
    frame #0: 0x00007f23d5b856d6 libpthread.so.0`do_futex_wait.constprop.1 + 54
    frame #1: 0x00007f23d5b857c8 libpthread.so.0`__new_sem_wait_slow.constprop.0 + 152
    frame #2: node`uv_sem_wait at thread.c:579
    frame #3: node`uv_sem_wait(sem=<unavailable>) at thread.c:635
    frame #4: 0x00007ffeb73f7eda node`node::inspector::(anonymous namespace)::StartIoThreadMain(void*) + 26
    frame #5: 0x00007f23d5b7c6db libpthread.so.0`start_thread + 219
    frame #6: libc.so.6`__GI___clone at clone.S:95
  thread #4, stop reason = signal 0
    frame #0: 0x00007f23d5b829f3 libpthread.so.0`__pthread_cond_wait + 579
    frame #1: node`uv_cond_wait(cond=<unavailable>, mutex=<unavailable>) at thread.c:735
    frame #2: node`worker(arg=<unavailable>) at threadpool.c:76
    frame #3: 0x00007f23d5b7c6db libpthread.so.0`start_thread + 219
    frame #4: libc.so.6`__GI___clone at clone.S:95
  thread #5, stop reason = signal 0
    frame #0: 0x00007f23d5b829f3 libpthread.so.0`__pthread_cond_wait + 579
    frame #1: node`uv_cond_wait(cond=<unavailable>, mutex=<unavailable>) at thread.c:735
    frame #2: node`worker(arg=<unavailable>) at threadpool.c:76
    frame #3: 0x00007f23d5b7c6db libpthread.so.0`start_thread + 219
    frame #4: libc.so.6`__GI___clone at clone.S:95
  thread #6, stop reason = signal 0
    frame #0: 0x00007f23d5b829f3 libpthread.so.0`__pthread_cond_wait + 579
    frame #1: node`uv_cond_wait(cond=<unavailable>, mutex=<unavailable>) at thread.c:735
    frame #2: node`worker(arg=<unavailable>) at threadpool.c:76
    frame #3: 0x00007f23d5b7c6db libpthread.so.0`start_thread + 219
    frame #4: libc.so.6`__GI___clone at clone.S:95
  thread #7, stop reason = signal 0
    frame #0: 0x00007f23d5b829f3 libpthread.so.0`__pthread_cond_wait + 579
    frame #1: node`uv_cond_wait(cond=<unavailable>, mutex=<unavailable>) at thread.c:735
    frame #2: 0x00007ffeb73ad234 node`node::BackgroundRunner(void*) + 116
    frame #3: 0x00007f23d5b7c6db libpthread.so.0`start_thread + 219
    frame #4: libc.so.6`__GI___clone at clone.S:95
  thread #8, stop reason = signal 0
    frame #0: 0x00007f23d5b829f3 libpthread.so.0`__pthread_cond_wait + 579
    frame #1: node`uv_cond_wait(cond=<unavailable>, mutex=<unavailable>) at thread.c:735
    frame #2: node`worker(arg=<unavailable>) at threadpool.c:76
    frame #3: 0x00007f23d5b7c6db libpthread.so.0`start_thread + 219
    frame #4: libc.so.6`__GI___clone at clone.S:95
  thread #9, stop reason = signal 0
    frame #0: 0x00007f23d5b829f3 libpthread.so.0`__pthread_cond_wait + 579
    frame #1: node`uv_cond_wait(cond=<unavailable>, mutex=<unavailable>) at thread.c:735
    frame #2: 0x00007ffeb73ad234 node`node::BackgroundRunner(void*) + 116
    frame #3: 0x00007f23d5b7c6db libpthread.so.0`start_thread + 219
    frame #4: libc.so.6`__GI___clone at clone.S:95
  thread #10, stop reason = signal 0
    frame #0: libc.so.6`__GI_epoll_pwait(epfd=11, events=0x00007f23d1de6850, maxevents=1024, timeout=-1, set=0x0000000000000000) at epoll_pwait.c:42
    frame #1: node`uv__io_poll(loop=<unavailable>, timeout=<unavailable>) at linux-core.c:275
    frame #2: node`uv_run(loop=<unavailable>, mode=<unavailable>) at core.c:370
    frame #3: 0x00007ffeb73fcbc4 node`void node::inspector::InspectorIo::ThreadMain<node::inspector::InspectorSocketServer>() + 596
    frame #4: 0x00007f23d5b7c6db libpthread.so.0`start_thread + 219
    frame #5: libc.so.6`__GI___clone at clone.S:95
  thread #11, stop reason = signal 0
    frame #0: 0x00007f23d5b829f3 libpthread.so.0`__pthread_cond_wait + 579
    frame #1: node`uv_cond_wait(cond=<unavailable>, mutex=<unavailable>) at thread.c:735
    frame #2: 0x00007ffeb73ad234 node`node::BackgroundRunner(void*) + 116
    frame #3: 0x00007f23d5b7c6db libpthread.so.0`start_thread + 219
    frame #4: libc.so.6`__GI___clone at clone.S:95

@dobromyslov
Copy link

I have same crash when use pubsub subscription.

@dobromyslov
Copy link

Updated to 10.18.0. Everything is ok there. But Node 10 is Beta in Google Cloud Functions.

@BridgeAR
Copy link
Member

BridgeAR commented Jan 2, 2020

@dobromyslov thanks for your confirmation.

Node.js v8.x is end-of-life and won't receive any fixes anymore. I am closing this, since the issue seems to be specific about v8.x. If it does happen on any other release line, please leave a comment so that this is reopened.

@BridgeAR BridgeAR closed this as completed Jan 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
http2 Issues or PRs related to the http2 subsystem.
Projects
None yet
Development

No branches or pull requests

7 participants