[SERVER-21270] Invariant if Ctrl+C handler runs before certain mongo initializers have run Created: 03/Nov/15  Updated: 24/Jun/19  Resolved: 24/Jun/19

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor - P4
Reporter: Kaloian Manassiev Assignee: DO NOT USE - Backlog - Platform Team
Resolution: Won't Fix Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Participants:

 Description   

If Ctrl+C is pressed before the mongo initializers have run (which is pretty unlikely), mongod could fail with an invariant during thread name initialization of the Ctrl+C handler thread:

mongod.exe!mongo::invariantFailed(const char * expr=0x00007ff7ada2bdc8, const char * file=0x00007ff7ada2bd98, unsigned int line=63) Line 152
mongod.exe!mongo::setThreadName(mongo::StringData name) Line 63
mongod.exe!mongo::Client::initThread(const char * desc=0x00007ff7ada64050, mongo::ServiceContext * service=0x000000ed0714db30, mongo::AbstractMessagingPort * mp=0x0000000000000000) Line 89
mongod.exe!mongo::Client::initThread(const char * desc=0x00007ff7ada64050, mongo::AbstractMessagingPort * mp=0x0000000000000000) Line 70
mongod.exe!mongo::`anonymous namespace'::consoleTerminate(const char * controlCodeName=0x00007ff7ada640a8) Line 94
mongod.exe!mongo::`anonymous namespace'::CtrlHandler(unsigned long fdwCtrlType=0) Line 103
KERNELBASE.dll!CtrlRoutine()
kernel32.dll!BaseThreadInitThunk()
ntdll.dll!RtlUserThreadStart()


Generated at Thu Feb 08 03:56:50 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.