Free cookie consent management tool by TermsFeed Policy Generator

Opened 13 years ago

Closed 13 years ago

#1588 closed defect (done)

NullReferenceException occurs during parallel execution of experiment optmizers

Reported by: mkommend Owned by: ascheibe
Priority: highest Milestone: HeuristicLab 3.3.6
Component: Optimization Version: 3.3.6
Keywords: Cc:

Description

If two optimizers of an experiment are executed side by side a NullReferenceExecution could occur. The reason behind this is that the ExecutionContext of a parameter or operator in an executing algorithm is set to null during the clean up of another algorithm.

From this it can be inferred that while iterating an object graph, objects belonging to a different algorithm are discovered.

Attachments (1)

ParallelBatchRuns.png (76.8 KB) - added by abeham 13 years ago.

Download all attachments as: .zip

Change History (11)

comment:1 Changed 13 years ago by mkommend

  • Status changed from new to accepted

comment:2 Changed 13 years ago by mkommend

r6572: Corrected a cloning bug in OperatorGraphVisualizationInfo.

comment:3 Changed 13 years ago by mkommend

  • Owner changed from mkommend to swagner
  • Status changed from accepted to reviewing

comment:4 Changed 13 years ago by abeham

I still experience this bug from time to time, although it's difficult to reproduce. I'll see what I can do.

comment:5 Changed 13 years ago by mkommend

  • Owner changed from swagner to ascheibe

comment:6 Changed 13 years ago by abeham

I've had an error again when executing optimizers in parallel in an experiment, though the exception is an InvalidOperationException. It reads: "Collection was modified...". A screenshot is attached, unfortunately the application crashed and I couldn't access the exception dialog again. It seems to stem from a race condition somewhere in the RunCollection or RunCollectionView.

Last edited 13 years ago by gkronber (previous) (diff)

Changed 13 years ago by abeham

comment:7 follow-up: Changed 13 years ago by ascheibe

I have just got an exception in the experiment view. I have created an experiment with different mutation operators and mutation rates for GA/VRP. I ran 2 of the experiments and got the following exception:

ObjectDisposedException: The CancellationTokenSource associated with this CancellationToken has been disposed.
at System.Threading.CancellationToken.ThrowIfSourceDisposed()
at System.Threading.Tasks.Task.TaskConstructorCore(Object action, Object state, CancellationToken cancellationToken, TaskCreationOptions creationOptions, InternalTaskOptions internalOptions, TaskScheduler scheduler)
at System.Threading.Tasks.TaskFactory.StartNew(Action`1 action, Object state, CancellationToken cancellationToken)
at HeuristicLab.ParallelEngine.ParallelEngine.Run(Object state) in C:\dev\trunk\sources\HeuristicLab.ParallelEngine\3.3\ParallelEngine.cs:line 72
at HeuristicLab.ParallelEngine.ParallelEngine.Run(CancellationToken cancellationToken) in C:\dev\trunk\sources\HeuristicLab.ParallelEngine\3.3\ParallelEngine.cs:line 51
at HeuristicLab.Core.Engine.Run(Object state) in C:\dev\trunk\sources\HeuristicLab.Core\3.3\Engine.cs:line 153
at System.Threading.Tasks.Task.Execute()
   

OperatorExecutionException: An exception was thrown by the operator "SubScopesProcessor": The number of operators doesn't match the number of sub-scopes at depth 1
at HeuristicLab.ParallelEngine.ParallelEngine.Run(Object state) in C:\dev\trunk\sources\HeuristicLab.ParallelEngine\3.3\ParallelEngine.cs:line 115
at HeuristicLab.ParallelEngine.ParallelEngine.Run(CancellationToken cancellationToken) in C:\dev\trunk\sources\HeuristicLab.ParallelEngine\3.3\ParallelEngine.cs:line 51
at HeuristicLab.Core.Engine.Run(Object state) in C:\dev\trunk\sources\HeuristicLab.Core\3.3\Engine.cs:line 153
at System.Threading.Tasks.Task.Execute()
-----
ArgumentException: The number of operators doesn't match the number of sub-scopes at depth 1
at HeuristicLab.Operators.SubScopesProcessor.Apply() in C:\dev\trunk\sources\HeuristicLab.Operators\3.3\SubScopesProcessor.cs:line 74
at HeuristicLab.Operators.Operator.Execute(IExecutionContext context, CancellationToken cancellationToken) in C:\dev\trunk\sources\HeuristicLab.Operators\3.3\Operator.cs:line 120
at HeuristicLab.ParallelEngine.ParallelEngine.Run(Object state) in C:\dev\trunk\sources\HeuristicLab.ParallelEngine\3.3\ParallelEngine.cs:line 99

I'm not really sure what or why it happened and I wasn't able to reproduce it. I thought i post it here, maybe somebody else got this exception or knows what this means, else ignore it as it only happened once and i tried hard to reproduce it.

comment:8 in reply to: ↑ 7 Changed 13 years ago by mkommend

I'm not really sure what or why it happened and I wasn't able to reproduce it. I thought i post it here, maybe somebody else got this exception or knows what this means, else ignore it as it only happened once and i tried hard to reproduce it.

This problem is normally related to an cloning error within the algorithm or the problem. As we can be quite sure that there should not be a cloning bug in the GA, my first guess is that there is cloning bug in the VRP problem.

comment:9 Changed 13 years ago by ascheibe

  • Status changed from reviewing to readytorelease

I have tested the experiment view again and everything worked fine, so I'm setting this ticket readytorelease.

comment:10 Changed 13 years ago by swagner

  • Resolution set to done
  • Status changed from readytorelease to closed
  • Version changed from 3.3.5 to 3.3.6
Note: See TracTickets for help on using tickets.