Details
-
Type:
Improvement
-
Status: In Progress
-
Priority:
Trivial
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: 2.12.0
-
Component/s: analysis, Dev and Dep, renderer
-
Labels:None
Description
AlignCalcWorker#removeAnnotation uses synchronisation on the ourAnnots list when iterating over annotations, but it's the only place when the synchronisation block is actually used. Just after leaving the synchronized block, it clears the list in a thread-unsafe way. Racing conditions and concurrent modifications may occur if multiple threads operate on the worker, which is not the case currently as the AlignCalcManager is single-threaded. AlignCalcWorker should either be deemed not thread-safe or enforce ourAnnots to be fully synchronised.