[SERVER-63198] Prevent shutdown command from hanging Created: 01/Feb/22  Updated: 29/Oct/23  Resolved: 11/Apr/22

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

Type: Bug Priority: Major - P3
Reporter: Daniel Morilha (Inactive) Assignee: Daniel Morilha (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-64500 Change src/mongo/db/commands/shutdown... Closed
Related
related to SERVER-63768 Create a manually triggered evergreen... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Service Arch 2022-2-07, Service Arch 2022-2-21, Service Arch 2022-03-07, Service Arch 2022-03-21, Service Arch 2022-04-04, Service Arch 2022-04-18
Participants:
Linked BF Score: 48

 Description   

Investigation of BF-24143 lead to discover that a client session hangs if it issues a shutdown admin command. It is unclear if the current infrastructure would allow for a proper reply to the shutdown command or if the connection to the client must abruptly stop upon issuance.



 Comments   
Comment by Githook User [ 11/Apr/22 ]

Author:

{'name': 'Daniel Morilha', 'email': 'daniel.morilha@mongodb.com', 'username': 'daniel-mdb'}

Message: SERVER-63198 Prevent shutdown command from hanging
Branch: master
https://github.com/mongodb/mongo/commit/6d4b13ac2e199b5b9a34986e4d317fdfc695b3d4

Comment by Daniel Morilha (Inactive) [ 02/Mar/22 ]

It looks like this is getting closer to what the desired solution is. (github PR: https://github.com/10gen/mongo/pull/3094)

Comment by Daniel Morilha (Inactive) [ 22/Feb/22 ]

Apparently triggering a server shutdown from another thread breaks the assumptions found in the older mongo shell : https://github.com/10gen/mongo/blob/7ad05d39663d30ee9f20afafd499905a165127f9/src/mongo/shell/db.js#L424-L458

Comment by Daniel Morilha (Inactive) [ 22/Feb/22 ]

raising a signal breaks a bunch of tests : https://spruce.mongodb.com/version/6210085d61837d286f8ad981/tasks

Comment by Daniel Morilha (Inactive) [ 22/Feb/22 ]

Had a discussion with Billy and Sam and Sam advised me to investigate spawning a thread and calling into shutdown.

Comment by Daniel Morilha (Inactive) [ 15/Feb/22 ]

raising a signal breaks a bunch of tests,

the solution proposed here is still a solid one to move forward: https://github.com/10gen/mongo/pull/3094

Comment by Daniel Morilha (Inactive) [ 14/Feb/22 ]

There was a change into the scope of this and now the shutdown command has to raise an async signal and immediately return to the client that issued the command.

Generated at Thu Feb 08 05:57:08 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.