Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » Re: Deadlock in WorkspaceSynchronizer
Re: Deadlock in WorkspaceSynchronizer [message #71236] Fri, 09 February 2007 16:33 Go to next message
Eclipse UserFriend
Originally posted by: cdamus.ca.ibm.com

Hi, Alex,

As Cherie indicates, the correct newsgroup for EMFT questions is
eclipse.technology.emft (which I have copied).

Technically, a transaction is not required for saving or loading resources,
because transactions only protect the data contained by resources in the
resource set. So, one work-around for you would be to perform your
multi-resource save not in a transaction.

Of course, one does want to avoid the possibility of updates concurrent with
saving, which is the purpose of read-only transactions (in which save is
performed). So, possibly a better solution in the WorkspaceSynchronizer
would be to not do the runExclusive. I think this may not be necessary
because the default action always involves unloading the resource (custom
sync delegates may do more) and the synchronizer must assume that the
resource change may have been triggered within a transaction.

Please raise a bug, and I will investigate further.

Thanks!


Alex Shatalin wrote:

> Hello!
>
> While working with the WorkspaceSynchronizer I found a deadlock. For me it
> looks like a frequent situation, so can somebody from the runtime team
> review this posting and answer the question how to handle this situation
> correctly.
>
> Precondition: WorkspaceSynchronizer was instantiated and tracking any
> resource changes in the underlying ResourceSet.
>
> Thread-1: OpenEditPolicy.doExecuteWithResult() executed, model loaded into
> this ResourceSet was modified and saving action for whole ResourceSet was
> executed. First resource loaded into this ResourceSet saved using
> Resource.save() call.
>
> Thread-2: WorkspaceSynchronizer receive notification from the resource
> subsystem -> ResourceSynchJob executed and stopped in SynchRequest.
> Perform() method because of synch.getEditingDomain().runExclusive() call
> (Thread-1 AFAIU is currently inside a transaction in the same
> EditingDomain, so this call can not be satisfied).
>
> Thread-1: trying to save second resource from the same ResourceSet and
> stopped in: File.setContents() because of workspace.prepareOperation(rule,
> monitor); call. This operation is trying to execute job with the
> corresponding rule, but can not because WorkspaceSynchronizer.
> ResourceSynchJob is already running with the following rule:
> ResourcesPlugin.getWorkspace().getRoot().
>
> So, looks like this deadlock will show up any time we have
> WorkspaceSynchronizer running and trying to save more then one resource
> from within transaction executed on the same EditngDomain. My question is:
> should I submit a request for it? Or is there any other way to save
> resources correctly? (outside the transaction?)
>
> -----------------
> Alex Shatalin
Re: Deadlock in WorkspaceSynchronizer [message #72482 is a reply to message #71236] Tue, 20 February 2007 15:42 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Christian,

> Please raise a bug, and I will investigate further.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=174787 was submitted.

-----------------
Alex Shatalin
Re: Deadlock in WorkspaceSynchronizer [message #72502 is a reply to message #72482] Tue, 20 February 2007 19:40 Go to previous message
Eclipse UserFriend
Originally posted by: cdamus.ca.ibm.com

Hi, Alex,

Thanks for following this up!

Christian


Alex Shatalin wrote:

> Hello Christian,
>
>> Please raise a bug, and I will investigate further.
>
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=174787 was submitted.
>
> -----------------
> Alex Shatalin
Re: Deadlock in WorkspaceSynchronizer [message #602862 is a reply to message #71236] Tue, 20 February 2007 15:42 Go to previous message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Christian,

> Please raise a bug, and I will investigate further.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=174787 was submitted.

-----------------
Alex Shatalin
Re: Deadlock in WorkspaceSynchronizer [message #602870 is a reply to message #72482] Tue, 20 February 2007 19:40 Go to previous message
Eclipse UserFriend
Originally posted by: cdamus.ca.ibm.com

Hi, Alex,

Thanks for following this up!

Christian


Alex Shatalin wrote:

> Hello Christian,
>
>> Please raise a bug, and I will investigate further.
>
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=174787 was submitted.
>
> -----------------
> Alex Shatalin
Previous Topic:EMFT release plans for Europa?
Next Topic:[Teneo] Embeddable annotation?
Goto Forum:
  


Current Time: Sun Dec 22 06:18:30 GMT 2024

Powered by FUDForum. Page generated in 0.03526 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top