[SERVER-70444] fsync lock/unlock command fails when primary has not fully shutdown Created: 11/Oct/22  Updated: 29/Oct/23  Resolved: 18/Apr/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.1.0-rc0

Type: Bug Priority: Major - P3
Reporter: Shin Yee Tan Assignee: Dianna Hohensee (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Problem/Incident
is caused by SERVER-17589 Allow mongod shutdown whilst fsync lo... Closed
Related
related to SERVER-17589 Allow mongod shutdown whilst fsync lo... Closed
is related to SERVER-76240 Make sure that an FSync command canno... Backlog
is related to SERVER-76131 Move the global fsync state from the ... Closed
Assigned Teams:
Storage Execution
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Execution Team 2023-04-17, Execution Team 2023-05-01
Participants:
Linked BF Score: 135

 Description   

It is possible to hit this invariant when we shut down the primary node and call ReplSetTest.stopSet() before the node finishes shutting down.



 Comments   
Comment by Githook User [ 18/Apr/23 ]

Author:

{'name': 'Dianna Hohensee', 'email': 'dianna.hohensee@mongodb.com', 'username': 'DiannaHohensee'}

Message: SERVER-70444 Interrupt the FSyncThread directly from the mongod shutdown task
Branch: master
https://github.com/mongodb/mongo/commit/54bf6d0378feeb4e2bf2d8a775415370feae62e6

Comment by Dianna Hohensee (Inactive) [ 12/Apr/23 ]

It looks like this is related to SERVER-17589 from way back when. The FSyncLockThread thread calls registerShutdownTask(...) asynchronously to startup, whenever the first fsync command occurs. So it is possible for a race to occur where shutdown commences and the async thread is starting up. The other registerShutdownTask() calls take place synchronously on the server startup paths.

Generated at Thu Feb 08 06:16:12 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.