[SERVER-49762] Destroy the ServiceContext on clean shutdown in TSAN builds Created: 21/Jul/20 Updated: 08/Jan/24 Resolved: 29/Jul/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | 4.5.1, 4.2.8, 4.4.0-rc13 |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Tommaso Tocci | Assignee: | Backlog - Service Architecture |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | thread-sanitizer | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Assigned Teams: |
Service Arch
|
||||||||||||
| Participants: | |||||||||||||
| Linked BF Score: | 0 | ||||||||||||
| Description |
|
At the moment DestructorActions are not executed at shutdown because quick exit process is used to reduce shutdown time. Memory reclaim, socket cleanup and thread shutdown is instead delegated to the underlying operating system. In order to use the ThreadSanitizer and to get meaningful diagnostic, all running threads needs to be joined and cleaned up before exiting the process. In particular for some components (like the AuthorizationManager) this can be achieved by ensuring that the DestructorActions are actually executed on shutdown. |
| Comments |
| Comment by Andrew Morrow (Inactive) [ 29/Jul/20 ] |
|
Also, I think we should consider closing this as a duplicate of |