Project

General

Profile

Bug #2169

Cleanup of collected resources may remove good resource entry

Added by Henning Blohm 9 months ago. Updated 9 months ago.

Status:
Feedback
Priority:
Normal
Assignee:
Category:
z2-core
Target version:
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

Related to z2-Environment - Improvement #2171: Upport #2169 to 2.10.1Resolved29.02.2024Henning Blohm

Actions
Related to z2-Environment - Improvement #2170: Upport #2169 to 2.9.6New29.02.2024

Actions

Also available in: Atom PDF