[SERVER-54363] Tests using ShardServerTestFixture can seg fault if there are outstanding tasks in the CatalogCache Created: 05/Feb/21 Updated: 29/Oct/23 Resolved: 08/Mar/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | 4.9.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Randolph Tan | Assignee: | Marcos José Grillo Ramirez |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | sharding-wfbf-day | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Operating System: | ALL | ||||||||||||
| Participants: | |||||||||||||
| Linked BF Score: | 45 | ||||||||||||
| Description |
|
The CatalogCache takes in a loader as a reference. When the fixture calls tearDown, it clears the loader. That means that if the CatalogCache still has pending refresh tasks, it can end up trying to use the loader after it was freed. |
| Comments |
| Comment by Githook User [ 08/Mar/21 ] |
|
Author: {'name': 'Marcos José Grillo Ramirez', 'email': 'marcos.grillo@mongodb.com', 'username': 'm4nti5'}Message: |
| Comment by Marcos José Grillo Ramirez [ 04/Mar/21 ] |
|
The catalog cache is using it's own threadpool so, by the time the CatalogCache object is destroyed (on the ShardingMongodFixture) and the outstanding operations joined, the CatalogCacheLoader is already freed. I will discuss with the team about adding a function that will allow joining and shutting down that threadpool for tests (something like the catalog cache loader already has) that can be called BEFORE freeing the loader. |