[DOCS-5469] fsyncLock() prevents the mongod process to shut it down with SIGTERM or the shutdown command Created: 20/May/15  Updated: 30/Oct/23  Resolved: 01/Nov/22

Status: Closed
Project: Documentation
Component/s: manual, Server
Affects Version/s: None
Fix Version/s: Server_Docs_20231030

Type: Bug Priority: Critical - P2
Reporter: Gianfranco Palumbo Assignee: Kay Kim (Inactive)
Resolution: Won't Fix Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-17589 Allow mongod shutdown whilst fsync lo... Closed
Participants:
Days since reply: 1 year, 14 weeks, 1 day ago
Epic Link: DOCSP-1769

 Description   

There are two behaviours while trying to shutdown a mongod which is fync'd and locked based on it's version:

2.6 shutdowns only after it's unlocked

SIGTERM

2015-05-20T14:06:48.849+0100 [initandlisten] connection accepted from 127.0.0.1:64721 #1 (1 connection now open)
2015-05-20T14:06:52.969+0100 [conn1] CMD fsync: sync:1 lock:1
2015-05-20T14:06:52.977+0100 [fsyncLockWorker] removeJournalFiles
2015-05-20T14:06:52.984+0100 [conn1] db is now locked for snapshotting, no writes allowed. db.fsyncUnlock() to unlock
2015-05-20T14:06:52.984+0100 [conn1]     For more info see http://dochub.mongodb.org/core/fsynccommand
// gap
2015-05-20T14:06:55.960+0100 [signalProcessingThread] got signal 15 (Terminated: 15), will terminate after current cmd ends
2015-05-20T14:07:01.217+0100 [conn1] command: unlock requested
2015-05-20T14:07:01.217+0100 [signalProcessingThread] now exiting

shutdown command

2015-05-20T14:07:53.878+0100 [conn1] CMD fsync: sync:1 lock:1
2015-05-20T14:07:53.887+0100 [fsyncLockWorker] removeJournalFiles
2015-05-20T14:07:53.894+0100 [conn1] db is now locked for snapshotting, no writes allowed. db.fsyncUnlock() to unlock
2015-05-20T14:07:53.894+0100 [conn1]     For more info see http://dochub.mongodb.org/core/fsynccommand
// gap
2015-05-20T14:08:26.359+0100 [initandlisten] connection accepted from 127.0.0.1:64882 #2 (2 connections now open)
2015-05-20T14:08:26.359+0100 [conn2] command: unlock requested
2015-05-20T14:08:26.359+0100 [conn1] terminating, shutdown command received
2015-05-20T14:08:26.359+0100 [conn1] dbexit: shutdown called
2015-05-20T14:08:26.359+0100 [conn1] shutdown: going to close listening sockets...
2015-05-20T14:08:26.359+0100 [conn1] closing listening socket: 7
2015-05-20T14:08:26.359+0100 [conn1] closing listening socket: 8
2015-05-20T14:08:26.359+0100 [conn1] removing socket file: /tmp/mongodb-27017.sock
2015-05-20T14:08:26.360+0100 [conn1] shutdown: going to flush diaglog...
2015-05-20T14:08:26.360+0100 [conn1] shutdown: going to close sockets...
2015-05-20T14:08:26.360+0100 [conn1] shutdown: waiting for fs preallocator...
2015-05-20T14:08:26.360+0100 [conn1] shutdown: lock for final commit...
2015-05-20T14:08:26.360+0100 [conn1] shutdown: final commit...
2015-05-20T14:08:26.360+0100 [conn2] end connection 127.0.0.1:64882 (1 connection now open)
2015-05-20T14:08:26.368+0100 [conn1] shutdown: closing all files...
2015-05-20T14:08:26.370+0100 [conn1] closeAllFiles() finished
2015-05-20T14:08:26.370+0100 [conn1] journalCleanup...
2015-05-20T14:08:26.370+0100 [conn1] removeJournalFiles
2015-05-20T14:08:26.370+0100 [conn1] shutdown: removing fs lock...
2015-05-20T14:08:26.370+0100 [conn1] dbexit: really exiting now

3.0 cannot be shutdown or unlocked after a shutdown command or SIGTERM is sent to the mongod

The process cannot be killed after the database is locked (SERVER-17589).
It won't accept further commands (fsyncUnlock()) or SIGTERM.

2015-05-20T14:50:53.162+0100 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:53261 #1 (1 connection now open)
2015-05-20T14:50:56.174+0100 I STORAGE  [conn1] CMD fsync: sync:1 lock:1
2015-05-20T14:50:56.183+0100 I JOURNAL  [fsyncLockWorker] journalCleanup...
2015-05-20T14:50:56.183+0100 I JOURNAL  [fsyncLockWorker] removeJournalFiles
2015-05-20T14:50:56.190+0100 I STORAGE  [conn1] db is now locked, no writes allowed. db.fsyncUnlock() to unlock
2015-05-20T14:50:56.190+0100 I STORAGE  [conn1]     For more info see http://dochub.mongodb.org/core/fsynccommand
2015-05-20T14:50:58.852+0100 I CONTROL  [signalProcessingThread] got signal 15 (Terminated: 15), will terminate after current cmd ends
2015-05-20T14:51:02.439+0100 I STORAGE  [conn1] got request after shutdown()



 Comments   
Comment by Education Bot [ 01/Nov/22 ]

Hello! This ticket has been closed due to inactivity. If you believe this ticket is still important, please reopen it and leave a comment to explain why. Thank you!

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