Track open threads and parallel shells for diagnostics on shutdown

XMLWordPrintableJSON

    • Server Programmability
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      Today this code will crash the shell with what appears to be undefined behavior

      load('jstests/libs/parallelTester.js');
      var a = fork(function(a, b) {
          return a / b;
      }, 10, 2);
      a.start();
      

      If you run the snippet in gdb, it will show you that we're calling terminate() because the std::thread was never joined. We can provided an easier-to-debug experience for developers by tracking thread creation ourselves, and checking for open threads (and their source location) on shutdown of the test runner.

            Assignee:
            Unassigned
            Reporter:
            Matt Broadstone
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: