Files
mongo/jstests/libunwind/stacktrace_signal.js
Billy Donahue bc68d8424d SERVER-45587 SIGUSR2 one thread per log line
- add mongosymb_multithread.py
    - mongosymb.py argparse and slight refactor for reuse.

 create mode 100755 buildscripts/mongosymb_multithread.py
2020-01-30 17:42:02 +00:00

19 lines
538 B
JavaScript

/**
* Hit mongod with a SIGUSR2 and observe multithread stack trace.
* Should only work on Linux, and when mongod is built with libunwind.
*
* @tags: [
* requires_libunwind
* ]
*/
(function() {
clearRawMongoProgramOutput();
const conn = MongoRunner.runMongod();
runMongoProgram('/bin/kill', '-s', 'SIGUSR2', conn.pid);
MongoRunner.stopMongod(conn);
const output = rawMongoProgramOutput();
assert(output.search(/"processInfo":/) >= 0, output);
// Will be several of these
assert(output.search(/"backtrace":/) >= 0, output);
})();