[SERVER-79138] Fix data race in AuthorizationSessionTest fixture Created: 19/Jul/23 Updated: 18/Jan/24 Resolved: 09/Aug/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 7.0.0, 7.1.0-rc0 |
| Fix Version/s: | 7.1.0-rc0, 7.0.1 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Erwin Pe | Assignee: | Erwin Pe |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Assigned Teams: |
Server Security
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Backport Requested: |
v7.0
|
||||||||||||||||
| Sprint: | Security 2023-08-07, Security 2023-08-21 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Linked BF Score: | 20 | ||||||||||||||||
| Description |
|
When the `setUp()` method of AuthorizationSessionTest replaces the existing AuthorizationManager attached to the global ServiceContext with another AuthorizationManager instance, it causes a race with the JournalFlusher thread, which gets started earlier (in the ServiceContextMongoDTest constructor) and tries to acquire a pointer to the current global AuthorizationManager. One fix is to ensure that we perform the replacement of the AuthorizationManager, before the JournalFlusher (or any other thread that creates a authorization session) is started. |
| Comments |
| Comment by Githook User [ 21/Aug/23 ] |
|
Author: {'name': 'Erwin Pe', 'email': 'erwin.pe@mongodb.com', 'username': 'erwee'}Message: (cherry picked from commit 9eb4fbf166ba9ae6cec9876940f3813a99546379) |
| Comment by Githook User [ 09/Aug/23 ] |
|
Author: {'name': 'Erwin Pe', 'email': 'erwin.pe@mongodb.com', 'username': 'erwee'}Message: |