[SERVER-22852] Fatal assertion 17508 after receiving CTRL_SHUTDOWN_EVENT on Windows Created: 25/Feb/16  Updated: 05/Feb/18  Resolved: 05/Feb/18

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

Type: Bug Priority: Minor - P4
Reporter: Robert Guo (Inactive) Assignee: DO NOT USE - Backlog - Platform Team
Resolution: Won't Fix Votes: 0
Labels: platforms-needs-37-triage
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Operating System: ALL
Steps To Reproduce:

This was observed once and no repro has been found so far.

Participants:
Linked BF Score: 0

 Description   

The server may fassert when seeing a null GlobalServiceContext after getting a CTRL_SHUTDOWN_EVENT

logs:

2015-11-19T20:47:48.310+0000 I CONTROL  [thread2] CTRL_SHUTDOWN_EVENT signal
2015-11-19T20:47:48.310+0000 I -        [thread2] Fatal Assertion 17508
2015-11-19T20:47:48.310+0000 I -        [thread2]
 
***aborting after fassert() failure

code:

src/mongo/db/service_context.cpp-52-ServiceContext* getGlobalServiceContext() {
src/mongo/db/service_context.cpp:53:    fassert(17508, globalServiceContext);
src/mongo/db/service_context.cpp-54-    return globalServiceContext;
src/mongo/db/service_context.cpp-55-}



 Comments   
Comment by Mark Benvenuto [ 26/Feb/16 ]

CTRL_SHUTDOWN_EVENT is triggered by rebooting or shutting down the machine. MongoDB will receive this signal when it is not run as an NT service. When MongoDB is run as a service, we get SERVICE_CONTROL_PRESHUTDOWN sent to MongoDB first.

You are right that CTRL+C should have the same effect in this case as CTRL_SHUTDOWN_EVENT. The source of the bug is probably some sort of race that occurred during termination or GlobalServiceContext was not set.

Generated at Thu Feb 08 04:01:37 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.