Node.js - Need core dump

I have a node c++ addon that I am calling which is connecting to a database for me. It is using an internal c++ library for the connection and it is on one of this library's calls that I get failure, this is the printed trace:

before conn 
zsh: abort (core dumped)  node test_connection.js

I can't reveal all the inner workings of my class but just to make sense of the trace this is the line where it is failing:

std::cout << "before conn" << std::endl;        
<library>ConnectionPtr conn = connmgr.open("<databasename>");
std::cout << "after connection" << std::endl;

The lines before set up the connection and configure it. Running the c++ code by itself works, and it connects perfectly. So the set-up and everything is functional.

So there is something about running it within node.js that is causing it to fail.

I have downloaded and put in place two libraries:

  • node-panic (provides a primitive postmortem debugging facility for Node.js)
  • segfault-handler (If a SIGSEGV signal is raised, the module will print a native stack trace to both STDERR and to a timestamped file)

However, while they will work if I put some kind of intentional bug in the database connection info. They are not firing when the info is correct and I get this meaningless (core dumped) message.

I have tried running

node --log_all test_connection.js

which gives me everything v8 spits out but there is nothing useful in there.

node --log_suspect test_connection.js //is giving me this: 

suspect-read,process,"noDeprecation"
suspect-read,process,"noDeprecation"
suspect-read,process,"_eval"
suspect-read,process,"noDeprecation"
suspect-read,global,"v8debug"
suspect-read,process,"domain"
suspect-read,Object,"domain"
suspect-read,Array,"toJSON"
suspect-read,Object,"toJSON"
suspect-read,Array,"toJSON"
suspect-read,Object,"O_SYMLINK"
suspect-read,global,"v8debug"
suspect-read,global,"v8debug"
suspect-read,Object,"module_root"
suspect-read,Object,"prepareStackTrace"
suspect-read,Object,"path"
suspect-read,Object,"path"
suspect-read,Object,"path"
suspect-read,global,"panicDbg"
suspect-read,process,"noDeprecation"
suspect-read,Object,"usingDomains"
suspect-read,Object,"_events"
suspect-read,Object,"_maxListeners"
suspect-read,Object,"fd"
suspect-read,Object,"allowHalfOpen"
suspect-read,process,"_events"
suspect-read,Object,"listener"
suspect-read,Object,"_connecting"
suspect-read,Object,"_idleTimeout"
suspect-read,Object,"_connecting"
suspect-read,Object,"_idleTimeout"

But I'm not seeing anything terribly revealing there either. How do I get this core dump and see what is going wrong?