Bug 308806 - Keeping UI tread alive causes Deadlocks
Summary: Keeping UI tread alive causes Deadlocks
Status: CLOSED MOVED
Alias: None
Product: EMF Services
Classification: Modeling
Component: Transaction (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal
Target Milestone: ---   Edit
Assignee: EMF Services Transaction inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 249951
Blocks:
  Show dependency tree
 
Reported: 2010-04-12 05:07 EDT by Bernd Vogt CLA
Modified: 2022-09-04 12:15 EDT (History)
3 users (show)

See Also:


Attachments
Newsgroup discussion with Christian (4.12 KB, text/plain)
2010-04-12 05:12 EDT, Bernd Vogt CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bernd Vogt CLA 2010-04-12 05:07:53 EDT
Build Identifier: M20090917-0800

Hi,

we are using GEF, EMF and EMF Transaction to realize a visual modeling tool. Sometimes we have deadlocks whose thread dumps leads me to the suspicion that they will be caused by the order in which the transaction framework tries to assign the active transaction to a thread an the UI thread keep alive strategy.

See attached file for newsgroup discussion with Christian.

Here an exemplary thread dump. Note, there is no other thread with an active transaction.

Thread [main] (Suspended)
  (WorkManager locked)
  WorkManager.checkIn()
  JavaModelManager.initializeAllContainers()
  Display.readAndDispatch()
  (need transaction -> not acquired)
  Viewer.refresh()
  Main.main(String[])

Thread [Worker-3] (Suspended)
  (need transaction)
  ourResourceListener.resourceChanged()
  NotificationManager.notify()
  (WorkManager locked)
  Workspace.endOperation()
  Worker.run()

Currently I have no proposal for a solution. In my opinion it is a good and necessary idea to keep the UI thread alive.

Reproducible: Always
Comment 1 Bernd Vogt CLA 2010-04-12 05:12:01 EDT
Created attachment 164526 [details]
Newsgroup discussion with Christian
Comment 2 James Blackburn CLA 2011-05-03 13:06:00 EDT
See also bug 249951, if we didn't hold the workspace lock during the notification it looks like this deadlock would go away.
Comment 3 Pierre-Charles David CLA 2022-05-14 09:51:27 EDT
Eclipse EMF Transaction is moving away from this bugs.eclipse.org issue tracker to https://github.com/eclipse/emf-transaction.

If this issue is relevant to you and still present in the latest release:

* Create a new issue at https://github.com/eclipse/emf-transaction/issues/.
  * Use as title in GitHub the title of this Bugzilla ticket (may include the bug number or not, at your own convenience)
  * In the GitHub description, start with a link to this bugzilla ticket
  * Optionally add new content to the description if it can helps towards resolution
* Update bugzilla ticket
  * Add to "See also" property (up right column) the link to the newly created GitHub issue
  * Add a comment "Migrated to <link-to-newly-created-GitHub-issue>"
  * Set status as CLOSED MOVED

All issues that remain open will be automatically closed next week or so. Then the Bugzilla component for EMF Transaction will be archived and made read-only.
Comment 4 Pierre-Charles David CLA 2022-09-04 12:15:35 EDT
Replaced with https://github.com/eclipse/emf-transaction/issues/14