[SERVER-41042] NonAuthTaskExecutor should mask "async" signals Created: 07/May/19  Updated: 29/Oct/23  Resolved: 08/May/19

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 4.1.11
Fix Version/s: 4.1.11

Type: Bug Priority: Major - P3
Reporter: Ian Boros Assignee: Mira Carey
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-39447 $mongotRemote Implementation Work Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Service Arch 2019-05-20
Participants:

 Description   

The NonAuthTaskExecutor thread is created as part of the ServiceContext creation, through the ConstructorActionRegisterer.

We construct the service context here. However, we don't set up the signal masks or the signal processing thread until later (here).

This means that the NonAuthTaskExecutor thread will not have the "async" signals masked off. This can prevent a clean shutdown when the server gets a SIGTERM, as the NonAuthTaskExecutor thread may be chosen to handle it instead of the signal processing thread.

I think the best way to fix this would be to move the creation of NonAuthTaskExecutor to after the signal processing thread is created.



 Comments   
Comment by Githook User [ 08/May/19 ]

Author:

{'name': 'Jason Carey', 'username': 'hanumantmk', 'email': 'jcarey@argv.me'}

Message: SERVER-41042 fix early thread in NonAuthTE

The NonAuthTaskExecutor makes threads too early in global startup. We
have to delay thread startup until after the signal handling thread to
avoid failing to mask that early thread from signals.
Branch: master
https://github.com/mongodb/mongo/commit/401a54fb7a03c0a09a7c36c8ceb91489fe600204

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