[SERVER-17818] Abrupt termination due to service shutdown on Windows can lead to unrecoverable database under WiredTiger Created: 31/Mar/15  Updated: 05/Feb/16  Resolved: 31/Oct/15

Status: Closed
Project: Core Server
Component/s: Storage, WiredTiger
Affects Version/s: None
Fix Version/s: 3.1.8

Type: Bug Priority: Critical - P2
Reporter: Bruce Lucas (Inactive) Assignee: Michael Cahill (Inactive)
Resolution: Done Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-17820 Windows service stop can lead to mong... Closed
is related to SERVER-17152 WiredTiger file corrupted during powe... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   

2015-03-23T20:41:02.102Z I CONTROL  [serviceShutdown] got SERVICE_CONTROL_STOP request from Windows Service Control Manager, will terminate after current cmd ends
2015-03-23T20:41:02.106Z I STORAGE  [conn398] got request after shutdown()
...
2015-03-23T20:41:59.157Z I STORAGE  [conn223] got request after shutdown()
2015-03-23T20:42:12.065Z I CONTROL  ***** SERVER RESTARTED *****
2015-03-23T20:42:12.071Z I CONTROL  Trying to start Windows service 'MongoDB'
2015-03-23T20:42:12.071Z I STORAGE  Service running
2015-03-23T20:42:12.072Z W -        [initandlisten] Detected unclean shutdown - D:\Mongo\data\db\mongod.lock is not empty.
2015-03-23T20:42:12.072Z W STORAGE  [initandlisten] Recovering data from the last clean checkpoint.
2015-03-23T20:42:12.072Z I STORAGE  [initandlisten] wiredtiger_open config: create,cache_size=63G,session_max=20000,eviction=(threads_max=4),statistics=(fast),checkpoint=(wait=60,log_size=2GB),statistics_log=(wait=0),
2015-03-23T20:42:12.094Z I -        [initandlisten] Fatal assertion 28548 NoSuchKey Unable to find metadata for table:survey/collection-9-5755622992935745294
2015-03-23T20:42:12.094Z I -        [initandlisten] 
 
***aborting after fassert() failure

  • mongod received SERVICE_CONTROL_STOP request
  • it takes a while to shut down (maybe doing a lengthy checkpoint?)
  • Windows gets impatient after 60 seconds and abruptly terminates mongod
  • recovery fails on subsequent startup

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