[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:
Depends
Related
is related to SERVER-48490 Destroy the ServiceContext on clean s... Closed
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 SERVER-48490 and moving the linked BF over to that ticket. We would retitle that ticket to indicate that the service context should be destroyed under both ASAN and TSAN.

Generated at Thu Feb 08 05:20:44 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.