[SERVER-61974] Call quickExit() in mongoauditdecrypt before returning from main() Created: 09/Dec/21 Updated: 29/Oct/23 Resolved: 20/Jan/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 5.3.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Erwin Pe | Assignee: | Mark Benvenuto |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Operating System: | ALL | ||||||||
| Backport Requested: |
v5.2
|
||||||||
| Sprint: | Security 2022-01-24 | ||||||||
| Participants: | |||||||||
| Linked BF Score: | 27 | ||||||||
| Description |
|
On Windows, an access violation may occur if the main thread returns normally from the main() function while the signal handler thread is still in the process of initializing thread local variables that require access to static global variables (e.g. ThreadContext::_handler calling Decorable::getRegistry()). This is because the windows C runtime library registers an atexit() handler that destroys the global mutex that is used to ensure that accesses to static global variables are thread-safe. If quickExit() is called instead of returning normally from main(), then it will call TerminateProcess() which simply terminates all threads without needing to run atexit() handlers. |
| Comments |
| Comment by Dziana Hurynovich [ 03/Feb/22 ] |
|
Requesting backport because of new failure BFG https://buildbaron.corp.mongodb.com/ui/#/bfg/BFG-1020036 |
| Comment by Githook User [ 20/Jan/22 ] |
|
Author: {'name': 'Mark Benvenuto', 'email': 'mark.benvenuto@mongodb.com', 'username': 'markbenvenuto'}Message: |