-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
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.