[SERVER-54531] All ASSERTs should fail hard if they're on an unsafe thread Created: 12/Feb/21 Updated: 06/Dec/22 Resolved: 09/Mar/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Billy Donahue | Assignee: | Backlog - Service Architecture |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Assigned Teams: |
Service Arch
|
||||||||
| Operating System: | ALL | ||||||||
| Participants: | |||||||||
| Description |
|
From An ASSERT failure from a non-main thread is going to throw an exception that the thread callback can't catch, and so the test will std::terminate. ASSERT statements always pass (or the test would be red), but there's a difference between an aborted test and a failed test. If you wanted an aborted test you'd use an invariant.
To identify ASSERT statements that are misplaced, perhaps we can just fail ALL ASSERTS from an unsafe thread to identify the dangerous tests before they bite. |