Skip to content

running GC appears to interfere with jsconstructor #103

@davepacheco

Description

@davepacheco

After making some changes for #27, I found tst.postmortem_details.js failing sometimes as follows:

$ node test/standalone/tst.postmortem_details.js
mdb stderr: mdb: unable to read object map

mdb stderr: mdb: unable to read object map

mdb stderr: mdb: unable to read object map

verifying test: jsconstructor using verifyConstructor
verifying test: nodebuffer using verifyNodebuffer
verifying test: nodebuffer contents using verifyBufferContents
verifying test: v8internal using verifyV8internal
verifying test: sliced buffer using verifySlicedBufferConstructor

assert.js:86
  throw new assert.AssertionError({
        ^
AssertionError: [] deepEqual [ 'NativeBuffer' ]
    at Array.verifySlicedBufferConstructor (/home/dap/mdb_v8/test/standalone/tst.postmortem_details.js:165:11)
    at ChildProcess.<anonymous> (/home/dap/mdb_v8/test/standalone/tst.postmortem_details.js:101:26)
    at ChildProcess.emit (events.js:110:17)
    at Process.ChildProcess._handle.onexit (child_process.js:1078:12)

It's the part of the test that locates the SlicedBuffer it creates and uses jsconstructor to print its constructor. jsconstructor is failing with mdb: unable to read object map.

There are a couple of interesting data points:

  • when I apply an mdb_v8.so compiled from master to the same core file left by the above failing test, the same jsconstructor command fails
  • when I use a copy of the mdb_v8 source from master, modify the test to leave its core file, and use my updated mdb_v8.so on the core file, the jsconstructor command succeeds
  • the test program sometimes succeeds even in my dev branch (probably about 50% of the time on 64-bit Node v0.12.17. I'm not sure I've seen the failure at all on other builds, though I've mostly been using 0.10.)
  • if I add a line to the test that prints the constructor name, the test reliably works.

So it seems as though the core file being generated is sometimes different based on some V8 implementation choice, not that there's new breakage in my dev version of mdb_v8.so. My conclusion is that there's some case that jsconstructor doesn't handle. This ticket covers handling that case. I will upload the test case core file to thoth.

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