Community
Participate
Working Groups
Now that bug 497342 is fixed and the control-mode resource load listener actually runs to poke the sash model in an unprotected transaction, model validation will deadlock if it ever causes a sub-unit resource or another cross-referenced model to load. The problem is simply that the the AbstractValidateCommand, running in a transaction on the main thread, forks the validation operation onto the Model Context Thread without handing off its transaction to the that other thread. Consequently, any listener reacting to resource load notifications that attempts to open even a read-only transaction or an unprotected write transaction will deadlock the UI. Steps to reproduce: 1. Open a model that has cross-references to some other model (for example, ModelA attached to bug 458837, imported from RSA. 2. Validate the model. 3. See the progress dialog hang.
I have a fix in hand.
New Gerrit change created: https://git.eclipse.org/r/76698
New Gerrit change created: https://git.eclipse.org/r/76699
Gerrit change https://git.eclipse.org/r/76698 was merged to [streams/2.0-maintenance]. Commit: http://git.eclipse.org/c/papyrus/org.eclipse.papyrus.git/commit/?id=01e4e159c54433189d8a8b1a899c0711642bf311
Gerrit change https://git.eclipse.org/r/76699 was merged to [master]. Commit: http://git.eclipse.org/c/papyrus/org.eclipse.papyrus.git/commit/?id=cfc4d531b1d9c6d2d3510c1562bf8760b39b8788
(In reply to Eclipse Genie from comment #4) > Gerrit change https://git.eclipse.org/r/76698 was merged to > [streams/2.0-maintenance]. (In reply to Eclipse Genie from comment #5) > Gerrit change https://git.eclipse.org/r/76699 was merged to [master].
Verified in the context of Papyrus-RT (with Gerrit changes to shard-prototype applied) with the latest Neon Papyrus build, that the dead-lock no longer occurs when validating a model with cross-references to another model.