-
Type:
Bug
-
Resolution: Won't Fix
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
DB Integration & Observability
-
ALL
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Problem
On Windows, NamedPipeOutput creates a valid pipe handle in its constructor but its destructor only calls CloseHandle() when the pipe is marked open. If the object is destroyed before open() succeeds, the handle is leaked.
There are Windows and POSIX variants of NamedPipeOutput. Currently this code is only used in JavaScript and C++ tests.
Impact
The handle remains open until the shell process exits.
Reproduction Context
The issue is exposed when callers construct NamedPipeOutput synchronously before launching the writer thread. A stdx::thread construction failure can trigger destruction of an unconnected NamedPipeOutput. A proposed fix for SERVER-132126 exposed this issue.
Suggested Fix
Update the Windows NamedPipeOutput cleanup path to close any valid handle regardless of connection state, and invalidate the handle after closing.
Scope
- src/mongo/transport/named_pipe/named_pipe_windows.cpp - ensure unconnected NamedPipeOutput handles are released during destruction
- is related to
-
SERVER-132126 Race in external_data_source.js causing intermittent failures
-
- Closed
-