Opened 14 years ago
Closed 13 years ago
#1569 closed defect (done)
Parallel execution of many algorithms fails (sometimes)
Reported by: | cneumuel | Owned by: | gkronber |
---|---|---|---|
Priority: | medium | Milestone: | HeuristicLab 3.3.5 |
Component: | Core | Version: | 3.3.5 |
Keywords: | Cc: |
Description (last modified by cneumuel)
When many algorithms are executed in parallel some fail because the ExecutionContext property of Parameters and Operators is null. It is unclear why ExecutionContext can be null (it might be related with #1522).
This issue was found on a 4-core machine.
Attachments (1)
Change History (10)
comment:1 Changed 14 years ago by cneumuel
- Description modified (diff)
Changed 14 years ago by cneumuel
adds SetControl to IStatefultem to check which object cleans it up.
comment:2 Changed 14 years ago by mkommend
- Owner changed from swagner to mkommend
- Status changed from new to accepted
comment:3 Changed 14 years ago by mkommend
The cause of this issue is that the backing fields of ThreadLocal<> were reached during the object graph collection. As a result multiple algorithms call the ClearState method of IStatefulItems which clears the IExecutionContext of every IOperator and IParameter. and a NullReferenceException occurs.
comment:4 Changed 14 years ago by mkommend
r6500: Added special handling for ThreadLocal<> in Object.GetObjectGraphObjects().
comment:5 Changed 14 years ago by mkommend
- Owner changed from mkommend to cneumuel
- Status changed from accepted to assigned
Please test the commited changes on your quad-core machine to ensure that everything works as expected.
comment:6 Changed 13 years ago by mkommend
- Owner changed from cneumuel to gkronber
- Status changed from assigned to reviewing
comment:7 Changed 13 years ago by swagner
- Milestone changed from HeuristicLab 3.3.x Backlog to HeuristicLab 3.3.5
comment:8 Changed 13 years ago by gkronber
- Status changed from reviewing to readytorelease
Reviewed r6500. Thanks!
comment:9 Changed 13 years ago by swagner
- Resolution set to done
- Status changed from readytorelease to closed
- Version changed from 3.3.4 to 3.3.5
r6495 checked in test-case for this issue.
The following output shows the number of instances each genetic algorithm consists of. It shows that there is an issue with the objects used in the genetic algorithm instances (the number of objects increases before cleanup).
(before cleanup and after cleanup are inserted for debugging purposes in Algorithm.OnStopped right before and after ClearState is called on the IStatefulItems)