Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 365700 - [Xtend] XtextDocument causes Deadlock
Summary: [Xtend] XtextDocument causes Deadlock
Status: CLOSED FIXED
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 2.0.1   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-06 05:37 EST by Oliver L CLA
Modified: 2012-01-31 03:08 EST (History)
2 users (show)

See Also:


Attachments
Thread 1 (57.56 KB, image/png)
2011-12-06 05:38 EST, Oliver L CLA
no flags Details
Thread 2 (26.58 KB, image/png)
2011-12-06 05:38 EST, Oliver L CLA
no flags Details
Stack (7.18 KB, text/plain)
2011-12-06 07:29 EST, Oliver L CLA
no flags Details
thread dump for deadlock (30.99 KB, text/plain)
2012-01-31 02:56 EST, Nikolay Kasyanov CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver L CLA 2011-12-06 05:37:34 EST
From time to time the Xtend editor causes a deadlock and you have to kill the whole Eclipse instance.

I have attached two screenshots showing the two threads waiting for each other. 

I didn't find a way to reproduce this problem, but it occurs quite often (roundabout every 2 hours).. very annoying as all unsaved changes are lost.
Comment 1 Oliver L CLA 2011-12-06 05:38:06 EST
Created attachment 207963 [details]
Thread 1
Comment 2 Oliver L CLA 2011-12-06 05:38:26 EST
Created attachment 207964 [details]
Thread 2
Comment 3 Sebastian Zarnekow CLA 2011-12-06 05:41:56 EST
Which version do you use? 2.0.1?

Can you provide the stack of the thread that holds the modify lock of the document? #readonly locks should be allowed concurrently.
Comment 4 Oliver L CLA 2011-12-06 05:46:15 EST
(In reply to comment #3)
> Which version do you use? 2.0.1?
> 
> Can you provide the stack of the thread that holds the modify lock of the
> document? #readonly locks should be allowed concurrently.

Yes, I use 2.0.1.

In the meantime I have killed the Eclipse instance, but I'm pretty sure it will occur again soon... then I will provide the missing stack.
Comment 5 Knut Wannheden CLA 2011-12-06 05:56:09 EST
By the looks of it this is probably bug 358396, which was fixed in 2.1. The line EditorResourceAccess.java:63 from the stack trace at least seems to indicate that.
Comment 6 Oliver L CLA 2011-12-06 07:29:39 EST
Created attachment 207975 [details]
Stack
Comment 7 Oliver L CLA 2011-12-06 07:31:59 EST
(In reply to comment #5)
> By the looks of it this is probably bug 358396, which was fixed in 2.1. The
> line EditorResourceAccess.java:63 from the stack trace at least seems to
> indicate that.

I guess you are right. I have attached the stacks of all threads as the problem occured again.
Comment 8 Oliver L CLA 2011-12-06 07:35:54 EST
Btw. Is it possible to disable "Mark occurences" as a workaround?
Comment 9 Sebastian Zarnekow CLA 2011-12-06 07:38:08 EST
(In reply to comment #8)
> Btw. Is it possible to disable "Mark occurences" as a workaround?

Yes, that should work. Just toggle Mark occurrences in your toolbar.
Comment 10 Sebastian Zarnekow CLA 2011-12-06 18:01:37 EST
(In reply to comment #9)
> (In reply to comment #8)
> > Btw. Is it possible to disable "Mark occurences" as a workaround?
> 
> Yes, that should work. Just toggle Mark occurrences in your toolbar.

Please try to verify the fix with 2.1, too. Thanks.
Comment 11 Nikolay Kasyanov CLA 2012-01-31 02:56:11 EST
Created attachment 210297 [details]
thread dump for deadlock

I experienced similar deadlock on 2.2. Here is thread dump, threads "Worker-53", "Worker-41" and main seems to be deadlocked

I caught this deadlock after content assist activation
Comment 12 Oliver L CLA 2012-01-31 03:08:58 EST
This has been reported: Bug 366784