[SERVER-74433] Embedded periodic jobs can access runner after destruction Created: 28/Feb/23 Updated: 29/Oct/23 Resolved: 01/Mar/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 7.0.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Gregory Noma | Assignee: | Gregory Noma |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Operating System: | ALL | ||||||||
| Sprint: | Execution Team 2023-03-06 | ||||||||
| Participants: | |||||||||
| Description |
|
PeriodicRunnerEmbedded::PeriodicJobImpl holds a pointer to PeriodicRunnerEmbedded, and when the job is stopped it uses that pointer to take the mutex of the runner. This can be an issue because the periodic runner lives in the service context while the periodic job anchors often live in decorations on the service context; thus in these cases the periodic runner will be destructed before the job anchor. Then when the job anchor is destructed and attempts to stop, it will try to access the already-freed runner. |
| Comments |
| Comment by Githook User [ 01/Mar/23 ] |
|
Author: {'name': 'Gregory Noma', 'email': 'gregory.noma@gmail.com', 'username': 'gregorynoma'}Message: |