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

Track open threads and parallel shells for diagnostics on shutdown

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Service Arch

      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:
            backlog-server-servicearch [DO NOT USE] Backlog - Service Architecture
            Reporter:
            matt.broadstone@mongodb.com Matt Broadstone
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: