Bug #2169
Cleanup of collected resources may remove good resource entry
Start date:
29.02.2024
Due date:
% Done:
0%
Estimated time:
origin:
Description
The following sequence of events may lead to untracking of a still valid resource:
1. In NamespaceImpl _getResourceHandleImplNonNull we find a vh!=null && rh==null and (in another loop) put the vh directly into the invQ.
2. A subsequent tick() removes the vh.getKey() from the resource map and we can bind a new entry
Later:
3. In another tick we ingest the gc queue from the resource map into invQ. Because only now the GC noted the collected value, we get the same vh from above again in the invQ and the tick removes the key again from the resource map.
Solution¶
- In tick make sure to check for value holders that are still bound in the map
- Only remove from the map, if it is still bound.
Related issues
Updated by Henning Blohm 10 months ago
- Category set to z2-core
- Status changed from New to In Progress
- Assignee set to Henning Blohm
- Target version set to 2.9.1b
Updated by Henning Blohm 10 months ago
- Status changed from In Progress to Feedback
- Assignee changed from Henning Blohm to Udo Offermann
Updated by Henning Blohm 10 months ago
- Related to Improvement #2171: Upport #2169 to 2.10.1 added