Bug 536914

Summary: ConcurrentModificationException is thrown by transformation runtime in case of conflicting rule activations
Product: [Modeling] Viatra Reporter: Zoltan Ujhelyi <zoltan.ujhelyi>
Component: TransformationAssignee: Zoltan Ujhelyi <zoltan.ujhelyi>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 2.0.0   
Target Milestone: 2.0.1   
Hardware: Macintosh   
OS: Mac OS X   
See Also: https://git.eclipse.org/r/125922
https://git.eclipse.org/c/viatra/org.eclipse.viatra.git/commit/?id=41eb8c597738e90e12b1399e8341a3121cb92708
https://git.eclipse.org/r/125945
https://git.eclipse.org/c/viatra/org.eclipse.viatra.git/commit/?id=dba5a5b6b1212392cf0e32ee77b4e8fc783b17b8
https://git.eclipse.org/r/127225
https://git.eclipse.org/c/viatra/org.eclipse.viatra.git/commit/?id=2ba32823199db8584b398db108498e7a9070fd1d
https://git.eclipse.org/r/127243
https://git.eclipse.org/c/viatra/org.eclipse.viatra.git/commit/?id=fca20e031a6384fb53470671a53e8458b28d0489
Whiteboard:

Description Zoltan Ujhelyi CLA 2018-07-11 08:03:08 EDT
We have received a report that starting with VIATRA 2.0 some transformation began throwing ConcurrentModificationExceptions that worked fine previously. A deeper look has shown that the exception is only thrown when conflicting rule activations are fired in one go.

java.util.ConcurrentModificationException
	at java.util.HashMap$HashIterator.nextNode(HashMap.java:1442)
	at java.util.HashMap$KeyIterator.next(HashMap.java:1466)
	at java.util.Collections$UnmodifiableCollection$1.next(Collections.java:1042)
	at org.eclipse.viatra.transformation.evm.api.Executor.execute(Executor.java:46)
	at org.eclipse.viatra.transformation.runtime.emf.transformation.batch.BatchTransformationStatements.fireAllCurrent(BatchTransformationStatements.java:310)
	at org.eclipse.viatra.transformation.runtime.emf.transformation.batch.BatchTransformationStatements.fireAllCurrent(BatchTransformationStatements.java:161)
Comment 1 Eclipse Genie CLA 2018-07-11 09:10:53 EDT
New Gerrit change created: https://git.eclipse.org/r/125922
Comment 3 Eclipse Genie CLA 2018-07-11 15:55:09 EDT
New Gerrit change created: https://git.eclipse.org/r/125945
Comment 4 Zoltan Ujhelyi CLA 2018-07-12 04:06:14 EDT
The API documentation of conflict resolvers were updated and all relevant conflict resolvers were hardened against this kind of leaking internal information. The fix is merged into master and backported to 2.0-maintenance with appropriate tests.
Comment 6 Eclipse Genie CLA 2018-08-09 05:43:30 EDT
New Gerrit change created: https://git.eclipse.org/r/127225
Comment 8 Eclipse Genie CLA 2018-08-09 09:37:43 EDT
New Gerrit change created: https://git.eclipse.org/r/127243