Skip to content
This repository was archived by the owner on Apr 22, 2023. It is now read-only.
This repository was archived by the owner on Apr 22, 2023. It is now read-only.

post-mortem MDB debugger crash with ::jsstack #3567

@isaacs

Description

@isaacs

Seeing this on the latest v0.8 branch (0.8.1-pre).

$ mdb core.10023 
Loading modules: [ libumem.so.1 libc.so.1 ld.so.1 ]
> $C
080471d8 0x22d231f6(0, 0, 0, 0, 0, 12345678)
08047204 0x22d130dd(43e317b5, 51033dc5, 43e317ed, 43e31811, 43e31795, 804723c)
08047220 0x22d13013(51033dc5, 43e31811, 43e31811, 43e31835, 43e31795, 8047270)
0804723c 0x22d13408(205135e9, 2051360d, 43e31859, 43e3189d, 43e318c1, 43e318c1)
08047270 0x3d624625(43e318cd, 43e318c1, 43e31835, 20513659, 43e31835, 43e318cd)
080472a8 0x3d6566fb(2051360d, 205137e5, 43e31859, 205137e5, 51046b8d, 43e318f9)
080472c8 0x3d6567d9(2051360d, 43e31859, 43e31955, 2051392d, 2051392d, 51046b05)
080472ec 0x3d6558bf(2051360d, 43e31859, 8047398, 3d655021, 2, 43e318f9)
0804732c 0x3d6553b3(510080b1, 51008081, 20513941, 43e31961, 51046bf9, 43e318f9)
0804734c 0x3d656a73(51033dc5, 51046bf9, 51046bf9, 43e31985, 2, 510438d1)
08047370 0x3d62945c(43e319b5, 510438d1, 3d621ba1, c, 0, 80473c8)
0804738c 0x3d621c39(0, 0, 3d612b81, 0, 0, 0)
080473c8 0x3d612c2a(3d6292e0, 510438d1, 37708c41, 0, 0, 37708c41)
08047448 _ZN2v88internalL6InvokeEbNS0_6HandleINS0_10JSFunctionEEENS1_INS0_6ObjectEEEiPS5_Pb+0x101(89ede38, 0, 0, 80474cf, 10, 0)
08047488 _ZN2v88internal9Execution4CallENS0_6HandleINS0_6ObjectEEES4_iPS4_Pbb+0xd1(80474bc, 89d1134, 89ede38, 0, 0, 80474cf)
080474e8 _ZN2v88Function4CallENS_6HandleINS_6ObjectEEEiPNS1_INS_5ValueEEE+0xcf(804751c, 89d1134, 89ede38, 0, 0, 804759c)
08047568 _ZN4nodeL4TickEv.part.14+0x95(886aac0, 0, 80475d8, 886bfa0, 886bfa0, 89ede08)
08047588 uv__run_idle+0x37(886bfa0, 11e888, f4240, 0, 0, 510080a1)
080475c8 uv__run+0x48(89ede08, 80475fc, 8047638, 824f634, 886bfa0, 89ede08)
080475d8 uv_run+0x17(886bfa0, 89ede08, 804767c, 0, 80477a5, 804767c)
08047638 _ZN4node5StartEiPPc+0x1c4(2, 804767c, 8047638, 8047658, 82440a7, feffbafc)
08047658 main+0x1b(2, 804767c, 8047688, 82440b0, 0, 0)
08047670 _start+0x83(2, 80477a0, 80477a5, 0, 80477b8, 80477c4)
> ::load v8.so
V8 version: 3.11.10.12
mdb: failed to read "v8dbg_prop_idx_content": unknown symbol name
mdb: failed to autoconfigure from target
> ::jsstack
80471d8 0x22d231f6 ??R (43e317c9)
    file: <two-byte string>

*** mdb: received signal SEGV at:
    [1] libc.so.1`strcmp+0xea()
    [2] v8.so`heap_offset+0x2f()
    [3] v8.so`read_heap_ptr+0x25()
    [4] v8.so`read_heap_smi+0x22()
    [5] v8.so`jsfunc_lineno+0x43()
    [6] v8.so`do_jsframe+0x2c6()
    [7] v8.so`dcmd_jsstack+0x67()
    [8] mdb`dcmd_invoke+0x4e()
    [9] mdb`mdb_call_idcmd+0x134()
    [10] mdb`mdb_call+0x32e()
    [11] mdb`yyparse+0x473()
    [12] mdb`mdb_run+0x2eb()
    [13] mdb`main+0x13e3()
    [14] mdb`_start+0x7d()

mdb: (c)ore dump, (q)uit, (r)ecover, or (s)top for debugger [cqrs]? 

Here's the program that I gcored to achieve that:

function foo () {
  bar({ some: "bears", err: new Error('is human') });
}

function bar (arg) {
  baz(100, 200, 300, arg);
}

function baz (one, two, three, arg) {
  while (!(arg.foo <= one)) {
    arg.foo ++;
    two ++;
    three ++;
    one --;
  }
}

console.log('About to get lost. pid=%d', process.pid)
foo();

Same behavior with v0.8.0 (which uses V8 3.11.10.10).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions