[SERVER-61860] Death Test should exec after fork Created: 02/Dec/21 Updated: 29/Oct/23 Resolved: 20/Mar/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: | George Wangensteen | Assignee: | Billy Donahue |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | auto-reverted, servicearch-wfbf-day | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||
| Sprint: | Service Arch 2022-03-07, Service Arch 2022-03-21, Service Arch 2022-04-04 | ||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Linked BF Score: | 170 | ||||||||||||||||||||
| Story Points: | 4 | ||||||||||||||||||||
| Description |
|
Currently, death test unittests work by having a the main unittest process fork(), and then running the code that's expected to crash in the child process. This requires the parent process to be very careful to ensure that all of the state shared with the child process at the time of fork() (i.e. the entire address space which is copied) is in a consistent state. In the case of third-party libraries we vendor (like gperftools), this often means relying on things like pthread_atfork registered handlers to ensure locks are in a consistent state; this can be fragile (the order pthread_atfork handlers will run in is hard to determine, see https://github.com/gperftools/gperftools/issues/904).
Since the child doesn't actually need to share any state with the parent, we should give it a "fresh start" and have it run the code expected to crash in a clean process image via exec(); the parent can still listen in on that process to ensure it fails as expected. This will prevent the child process from starting with bad state (for example locks held in the allocator). |
| Comments |
| Comment by Githook User [ 20/Mar/22 ] |
|
Author: {'name': 'Billy Donahue', 'email': 'billy.donahue@mongodb.com', 'username': 'BillyDonahue'}Message: |
| Comment by xgen-buildbaron-user [ 17/Mar/22 ] |
|
Ticket re-opened due to revert. stitch_support_install_tests began a consistent failure of stitch_support_install_tests |
| Comment by Githook User [ 17/Mar/22 ] |
|
Author: {'name': 'auto-revert-processor', 'email': 'dev-prod-dag@mongodb.com'}Message: Revert " This reverts commit b372b25622b9ec4dd7ae5b8e3424218b8eaa774a. |
| Comment by Githook User [ 16/Mar/22 ] |
|
Author: {'name': 'Billy Donahue', 'email': 'billy.donahue@mongodb.com', 'username': 'BillyDonahue'}Message: |