Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-79662

Track open threads and parallel shells for diagnostics on shutdown

    • Server Programmability

      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 Unassigned
            Reporter:
            matt.broadstone@mongodb.com Matt Broadstone
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: