-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
Observed on the node-nightly e2e variant (patch 6013, version 6a5e8b913af2960007dc95eb).
After the separate completer/DEP0174 fix, the nightly e2e run still fails and then hangs. Root behavior: on the Node.js nightly build, a mongosh process does not terminate when exit/quit is entered, and it also does not terminate on shell.kill() (SIGTERM). The child processes stay alive (observed in the task's ps dumps).
Consequences in CI:
- The 6 "closes the shell …" tests in packages/e2e-tests/test/e2e.spec.ts (exit, quit, exit
, quit
, pre-specified exit code) time out. - Every shell teardown hook hangs, because ensureTestShellAfterHook does kill() then await waitForAnyExit() — surfaces as Timeout of 15000ms exceeded and AssertionError: Expected no open shells across e2e.spec / e2e-direct / e2e-tls / e2e-snippet (17 failures total).
- The task never exits after mocha's summary (leftover shells keep the event loop alive), so it hangs until the 2h idle timeout instead of failing fast.
Workaround landed on the ci-fixes branch (gated on process.version.includes('-nightly')):
- skip the 6 exit/quit tests
- escalate teardown to SIGKILL so hooks don't hang
Revert both once mongosh's exit path works on the new Node. Likely a Node behavior change around process/REPL termination (same flavor as the completer change nodejs/node#64034); needs investigation to determine whether it's a Node regression or an adaptation mongosh must make.