Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 322914 - [implementation] deadlock in ASTProvider when copy paste in CU editor
Summary: [implementation] deadlock in ASTProvider when copy paste in CU editor
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.7   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: 3.7 M6   Edit
Assignee: Dani Megert CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 333531 335656 342132 346657 348931 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-08-17 11:42 EDT by Benno Baumgartner CLA
Modified: 2012-01-26 03:23 EST (History)
9 users (show)

See Also:


Attachments
thread dump (23.38 KB, text/plain)
2010-08-17 11:42 EDT, Benno Baumgartner CLA
no flags Details
Log from 08/17 (84.01 KB, text/plain)
2010-08-23 05:36 EDT, Benno Baumgartner CLA
no flags Details
2 deadlocks in SharedASTProvider (71.36 KB, text/plain)
2010-10-26 12:36 EDT, Johan Compagner CLA
no flags Details
2 exceptions (8.85 KB, text/plain)
2010-10-27 04:30 EDT, Johan Compagner CLA
no flags Details
Thread dump (18.02 KB, text/plain)
2011-06-16 13:28 EDT, Ian Bull CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Benno Baumgartner CLA 2010-08-17 11:42:07 EDT
Created attachment 176802 [details]
thread dump

I20100805-1700

Ok, this time on the brand new 3.7M1;-) I did try to copy paste something in the CU editor:

"main" prio=6 tid=0x008f6400 nid=0xbf8 in Object.wait() [0x0012e000]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        at java.lang.Object.wait(Object.java:485)
        at org.eclipse.jdt.internal.ui.javaeditor.ASTProvider.getAST(ASTProvider.java:456)
        - locked <0x18fd0568> (a java.lang.Object)
        at org.eclipse.jdt.ui.SharedASTProvider.getAST(SharedASTProvider.java:126)
        at org.eclipse.jdt.internal.ui.javaeditor.ClipboardOperationAction.getClipboardData(ClipboardOperationAction.java:406)
        at org.eclipse.jdt.internal.ui.javaeditor.ClipboardOperationAction.doCutCopyWithImportsOperation(ClipboardOperationAction.java:333)
        at org.eclipse.jdt.internal.ui.javaeditor.ClipboardOperationAction.internalDoOperation(ClipboardOperationAction.java:289)
        at org.eclipse.jdt.internal.ui.javaeditor.ClipboardOperationAction$1.run(ClipboardOperationAction.java:258)
        at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
        at org.eclipse.jdt.internal.ui.javaeditor.ClipboardOperationAction.run(ClipboardOperationAction.java:256)
        at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
        at org.eclipse.ui.commands.ActionHandler.execute(ActionHandler.java:185)
        at org.eclipse.ui.internal.handlers.LegacyHandlerWrapper.execute(LegacyHandlerWrapper.java:109)
        at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
        at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
        at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
        at org.eclipse.ui.internal.keys.WorkbenchKeyboard.executeCommand(WorkbenchKeyboard.java:468)
        at org.eclipse.ui.internal.keys.WorkbenchKeyboard.press(WorkbenchKeyboard.java:786)
        at org.eclipse.ui.internal.keys.WorkbenchKeyboard.processKeyEvent(WorkbenchKeyboard.java:885)
        at org.eclipse.ui.internal.keys.WorkbenchKeyboard.filterKeySequenceBindings(WorkbenchKeyboard.java:567)
        at org.eclipse.ui.internal.keys.WorkbenchKeyboard.access$3(WorkbenchKeyboard.java:508)
        at org.eclipse.ui.internal.keys.WorkbenchKeyboard$KeyDownFilter.handleEvent(WorkbenchKeyboard.java:123)
        at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
        at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1253)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1052)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062)
        at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1103)
        at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1099)
        at org.eclipse.swt.widgets.Widget.wmChar(Widget.java:1508)
        at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:4271)
        at org.eclipse.swt.widgets.Canvas.WM_CHAR(Canvas.java:345)
        at org.eclipse.swt.widgets.Control.windowProc(Control.java:4163)
        at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:341)
        at org.eclipse.swt.widgets.Display.windowProc(Display.java:4873)
        at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
        at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2459)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3655)
        at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2629)
        at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2593)
        at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2427)
        at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:670)
        at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
        at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:663)
        at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
        at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
        at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
        at org.eclipse.equinox.launcher.Main.run(Main.java:1407)

And:

"Worker-130" prio=6 tid=0x5d749400 nid=0xf40 in Object.wait() [0x633ef000]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        at java.lang.Object.wait(Object.java:485)
        at org.eclipse.jdt.internal.ui.javaeditor.ASTProvider.getAST(ASTProvider.java:456)
        - locked <0x18fd0568> (a java.lang.Object)
        at org.eclipse.jdt.ui.SharedASTProvider.getAST(SharedASTProvider.java:126)
        at org.eclipse.jdt.ui.OverrideIndicatorLabelDecorator.getOverrideIndicators(OverrideIndicatorLabelDecorator.java:161)
        at org.eclipse.jdt.ui.OverrideIndicatorLabelDecorator.computeAdornmentFlags(OverrideIndicatorLabelDecorator.java:136)
        at org.eclipse.jdt.ui.OverrideIndicatorLabelDecorator.decorate(OverrideIndicatorLabelDecorator.java:273)
        at org.eclipse.ui.internal.decorators.LightweightDecoratorDefinition.decorate(LightweightDecoratorDefinition.java:269)
        at org.eclipse.ui.internal.decorators.LightweightDecoratorManager$LightweightRunnable.run(LightweightDecoratorManager.java:81)
        at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
        at org.eclipse.ui.internal.decorators.LightweightDecoratorManager.decorate(LightweightDecoratorManager.java:365)
        at org.eclipse.ui.internal.decorators.LightweightDecoratorManager.getDecorations(LightweightDecoratorManager.java:347)
        at org.eclipse.ui.internal.decorators.DecorationScheduler$1.ensureResultCached(DecorationScheduler.java:371)
        at org.eclipse.ui.internal.decorators.DecorationScheduler$1.run(DecorationScheduler.java:331)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

And:

"Worker-122" prio=6 tid=0x5d58b400 nid=0xf28 in Object.wait() [0x638ff000]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        at java.lang.Object.wait(Object.java:485)
        at org.eclipse.jdt.internal.ui.javaeditor.ASTProvider.getAST(ASTProvider.java:456)
        - locked <0x18fd0568> (a java.lang.Object)
        at org.eclipse.jdt.ui.SharedASTProvider.getAST(SharedASTProvider.java:126)
        at org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager$PartListenerGroup.calculateASTandInform(SelectionListenerWithASTMan
ager.java:169)
        at org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager$3.run(SelectionListenerWithASTManager.java:154)
        - locked <0x1e251ce0> (a java.lang.Object)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

Had to kill eclipse.
Comment 1 Dani Megert CLA 2010-08-23 05:22:26 EDT
Anything in the .log? Maybe the reconciler thread died. I assume you cannot reproduce this or provide more detailed steps.
Comment 2 Benno Baumgartner CLA 2010-08-23 05:36:19 EDT
Created attachment 177199 [details]
Log from 08/17
Comment 3 Benno Baumgartner CLA 2010-08-23 05:37:23 EDT
(In reply to comment #1)
> Anything in the .log? Maybe the reconciler thread died. 

See attachment.

> I assume you cannot
> reproduce this or provide more detailed steps.

No, Sorry.
Comment 4 Dani Megert CLA 2010-08-23 05:54:43 EDT
Hard to say whether the part init exceptions relate to the deadlock since the stack dumps don't have timestamps :-(. The ASTProvider also listens for part (de-) activation and if there's a broken listener notification then this might be the culprit.
Comment 5 Johan Compagner CLA 2010-10-26 12:36:44 EDT
Created attachment 181745 [details]
2 deadlocks in SharedASTProvider 

wiht 3.6.2 i have had now a few hangs, i have created 2 stack dumps of the last 2 times that i attached to this bug.
Both come from different locations.
Comment 6 Dani Megert CLA 2010-10-27 02:56:49 EDT
(In reply to comment #5)
> Created an attachment (id=181745) [details] [diff]
> 2 deadlocks in SharedASTProvider 
> 
> wiht 3.6.2 i have had now a few hangs, i have created 2 stack dumps of the last
> 2 times that i attached to this bug.
> Both come from different locations.

Johan, any exceptions in the .log? I assume you have no steps?
Comment 7 Johan Compagner CLA 2010-10-27 04:30:19 EDT
Created attachment 181808 [details]
2 exceptions

I have these in my log around that same day, but if they are really related i don't know.
I will check next time it happens and will attach a stackdump and then the exception if something happened.

Its not reproducible, it just happens, i think i did have a few times when copy/pasting, but the last time this was not the case.
Comment 8 Johan Compagner CLA 2010-11-22 10:48:57 EST
ok got another one, and nothing in the log

"Worker-44" prio=6 tid=0x07db4c00 nid=0x1040 in Object.wait() [0x0afff000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	at java.lang.Object.wait(Object.java:485)
	at org.eclipse.jdt.internal.ui.javaeditor.ASTProvider.getAST(ASTProvider.java:456)
	- locked <0x19541f10> (a java.lang.Object)
	at org.eclipse.jdt.ui.SharedASTProvider.getAST(SharedASTProvider.java:126)
	at org.eclipse.jdt.ui.OverrideIndicatorLabelDecorator.getOverrideIndicators(OverrideIndicatorLabelDecorator.java:161)
	at org.eclipse.jdt.ui.OverrideIndicatorLabelDecorator.computeAdornmentFlags(OverrideIndicatorLabelDecorator.java:136)
	at org.eclipse.jdt.ui.OverrideIndicatorLabelDecorator.decorate(OverrideIndicatorLabelDecorator.java:273)
	at org.eclipse.ui.internal.decorators.LightweightDecoratorDefinition.decorate(LightweightDecoratorDefinition.java:269)
	at org.eclipse.ui.internal.decorators.LightweightDecoratorManager$LightweightRunnable.run(LightweightDecoratorManager.java:81)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.internal.decorators.LightweightDecoratorManager.decorate(LightweightDecoratorManager.java:365)
	at org.eclipse.ui.internal.decorators.LightweightDecoratorManager.getDecorations(LightweightDecoratorManager.java:347)
	at org.eclipse.ui.internal.decorators.DecorationScheduler$1.ensureResultCached(DecorationScheduler.java:371)
	at org.eclipse.ui.internal.decorators.DecorationScheduler$1.run(DecorationScheduler.java:331)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)



"main" prio=6 tid=0x02689800 nid=0x14e0 in Object.wait() [0x0018e000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	at java.lang.Object.wait(Object.java:485)
	at org.eclipse.jdt.internal.ui.javaeditor.ASTProvider.getAST(ASTProvider.java:456)
	- locked <0x19541f10> (a java.lang.Object)
	at org.eclipse.jdt.ui.SharedASTProvider.getAST(SharedASTProvider.java:126)
	at org.eclipse.jdt.internal.debug.ui.actions.ToggleBreakpointAdapter.parseCompilationUnit(ToggleBreakpointAdapter.java:1103)
	at org.eclipse.jdt.internal.debug.ui.actions.ToggleBreakpointAdapter.parseCompilationUnit(ToggleBreakpointAdapter.java:1093)
	at org.eclipse.jdt.internal.debug.ui.actions.ToggleBreakpointAdapter.toggleBreakpoints(ToggleBreakpointAdapter.java:1241)
	at org.eclipse.debug.ui.actions.ToggleBreakpointAction.run(ToggleBreakpointAction.java:101)
	at org.eclipse.ui.texteditor.AbstractRulerActionDelegate.run(AbstractRulerActionDelegate.java:103)
	at org.eclipse.ui.internal.handlers.ActionDelegateHandlerProxy.execute(ActionDelegateHandlerProxy.java:289)
	at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
	at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
	at org.eclipse.ui.actions.ContributedAction.runWithEvent(ContributedAction.java:185)
	at org.eclipse.ui.internal.actions.CommandAction.run(CommandAction.java:171)
	at org.eclipse.ui.texteditor.AbstractTextEditor$14.triggerAction(AbstractTextEditor.java:2909)
	at org.eclipse.ui.texteditor.AbstractTextEditor$14.mouseDoubleClick(AbstractTextEditor.java:2934)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:189)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4066)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
Comment 9 Dani Megert CLA 2011-01-05 03:18:13 EST
*** Bug 333531 has been marked as a duplicate of this bug. ***
Comment 10 Markus Keller CLA 2011-01-13 05:59:47 EST
It just hung up after I closed a second editor that was open on the same CU. I closed the second editor, and right after closing, I typed a character, made a selection, and then invoked quick fix in the other editor that was already open.

2011-01-13 11:45:56
Full thread dump Java HotSpot(TM) Client VM (17.0-b16 mixed mode):

"Worker-114" prio=6 tid=0x3c1c9c00 nid=0x5a0 in Object.wait() [0x3a2bf000]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        at java.lang.Object.wait(Object.java:485)
        at org.eclipse.jdt.internal.ui.javaeditor.ASTProvider.getAST(ASTProvider.java:456)
        - locked <0x0e1b8358> (a java.lang.Object)
        at org.eclipse.jdt.ui.SharedASTProvider.getAST(SharedASTProvider.java:126)
        at org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager$PartListenerGroup.calculateASTandInform(SelectionListenerWithASTMan
ager.java:169)
        at org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager$3.run(SelectionListenerWithASTManager.java:154)
        - locked <0x2a1a0568> (a java.lang.Object)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

"Worker-111" prio=6 tid=0x3c1ca000 nid=0x1f4c in Object.wait() [0x3b58f000]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        at java.lang.Object.wait(Object.java:485)
        at org.eclipse.jdt.internal.ui.javaeditor.ASTProvider.getAST(ASTProvider.java:456)
        - locked <0x0e1b8358> (a java.lang.Object)
        at org.eclipse.jdt.internal.ui.javaeditor.ASTProvider.getAST(ASTProvider.java:469)
        at org.eclipse.jdt.ui.SharedASTProvider.getAST(SharedASTProvider.java:126)
        at org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager$PartListenerGroup.calculateASTandInform(SelectionListenerWithASTMan
ager.java:169)
        at org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager$3.run(SelectionListenerWithASTManager.java:154)
        - locked <0x18c58028> (a java.lang.Object)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

"main" prio=6 tid=0x00b2b000 nid=0x8dc in Object.wait() [0x0022d000]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        at java.lang.Object.wait(Object.java:485)
        at org.eclipse.jdt.internal.ui.javaeditor.ASTProvider.getAST(ASTProvider.java:456)
        - locked <0x0e1b8358> (a java.lang.Object)
        at org.eclipse.jdt.ui.SharedASTProvider.getAST(SharedASTProvider.java:126)
        at org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionAssistant.ensureUpdatedAnnotations(JavaCorrectionAssistant.java:264)
        at org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionAssistant.collectQuickFixableAnnotations(JavaCorrectionAssistant.java:212)
        at org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionAssistant.showPossibleQuickAssists(JavaCorrectionAssistant.java:175)
        at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor$AdaptedSourceViewer.doOperation(CompilationUnitEditor.java:194)
        at org.eclipse.ui.texteditor.TextOperationAction$1.run(TextOperationAction.java:128)
        at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
        at org.eclipse.ui.texteditor.TextOperationAction.run(TextOperationAction.java:126)
        at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
        at org.eclipse.ui.commands.ActionHandler.execute(ActionHandler.java:185)
        at org.eclipse.ui.internal.handlers.LegacyHandlerWrapper.execute(LegacyHandlerWrapper.java:109)
        at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
        at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
        at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
        at org.eclipse.ui.internal.keys.WorkbenchKeyboard.executeCommand(WorkbenchKeyboard.java:468)
        at org.eclipse.ui.internal.keys.WorkbenchKeyboard.press(WorkbenchKeyboard.java:786)
        at org.eclipse.ui.internal.keys.WorkbenchKeyboard.processKeyEvent(WorkbenchKeyboard.java:885)
        at org.eclipse.ui.internal.keys.WorkbenchKeyboard.filterKeySequenceBindings(WorkbenchKeyboard.java:567)
        at org.eclipse.ui.internal.keys.WorkbenchKeyboard.access$3(WorkbenchKeyboard.java:508)
        at org.eclipse.ui.internal.keys.WorkbenchKeyboard$KeyDownFilter.handleEvent(WorkbenchKeyboard.java:123)
        at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
...
Comment 11 Dani Megert CLA 2011-01-28 10:13:35 EST
*** Bug 335656 has been marked as a duplicate of this bug. ***
Comment 12 Dani Megert CLA 2011-02-11 09:47:45 EST
I'm able to sporadically reproduce the issue (about 1 in 100 tries) when I quickly
- type in one Java editor
- switch to another Java editors
- do something (e.g. 'Copy Qualified Name')

Important is to
- use big files (so that reconcile takes longer)
- use keyboard to be faster

Unfortunately I was not able to find reliable steps using the debugger.

By code inspection I found three potential holes in the code. After fixing them I could no longer trigger the deadlock with above steps.

Fixed in HEAD (ASTProvider.java, rev. 1.75).
Comment 13 Markus Keller CLA 2011-03-15 09:52:02 EDT
Verified via code inspection.
Comment 14 Dani Megert CLA 2011-04-07 07:18:06 EDT
*** Bug 342132 has been marked as a duplicate of this bug. ***
Comment 15 Dani Megert CLA 2011-05-20 08:25:07 EDT
*** Bug 346657 has been marked as a duplicate of this bug. ***
Comment 16 Markus Keller CLA 2011-06-09 13:40:01 EDT
*** Bug 348931 has been marked as a duplicate of this bug. ***
Comment 17 Ian Bull CLA 2011-06-16 13:28:09 EDT
Created attachment 198135 [details]
Thread dump

FWIW, this is still happening to be on a regular basis (using I20110603-0909).

I've attached the thread dump.
Comment 18 Ian Bull CLA 2011-08-08 08:17:12 EDT
(In reply to comment #17)
> Created attachment 198135 [details]
> Thread dump
> 
> FWIW, this is still happening to be on a regular basis (using I20110603-0909).
> 
> I've attached the thread dump.

I think this new problem is actually bug 350616 since it seems related to sleep / resume.
Comment 19 Ralf Grossklaus CLA 2011-12-17 03:29:40 EST
Is that one really fixed? I just hat one of this deadlocks on my machine. I use Eclipse 3.7.1 on Windows 7. Unfortunately i have no idea, how to reproduce this issue. The Thread dumps are below:


Name: Worker-269
State: WAITING on java.lang.Object@915f00
Total blocked: 2  Total waited: 6

Stack trace: 
 java.lang.Object.wait(Native Method)
java.lang.Object.wait(Object.java:485)
org.eclipse.jdt.internal.ui.javaeditor.ASTProvider.getAST(ASTProvider.java:457)
org.eclipse.jdt.ui.SharedASTProvider.getAST(SharedASTProvider.java:128)
org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager$PartListenerGroup.calculateASTandInform(SelectionListenerWithASTManager.java:170)
org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager$PartListenerGroup$3.run(SelectionListenerWithASTManager.java:155)
   - locked java.lang.Object@133e395
org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)


and 


Name: main
State: WAITING on java.lang.Object@915f00
Total blocked: 5.715  Total waited: 2.352

Stack trace: 
 java.lang.Object.wait(Native Method)
java.lang.Object.wait(Object.java:485)
org.eclipse.jdt.internal.ui.javaeditor.ASTProvider.getAST(ASTProvider.java:457)
org.eclipse.jdt.ui.SharedASTProvider.getAST(SharedASTProvider.java:128)
org.eclipse.jdt.ui.OverrideIndicatorLabelDecorator.getOverrideIndicators(OverrideIndicatorLabelDecorator.java:161)
org.eclipse.jdt.ui.OverrideIndicatorLabelDecorator.computeAdornmentFlags(OverrideIndicatorLabelDecorator.java:136)
org.eclipse.jdt.ui.OverrideIndicatorLabelDecorator.decorateImage(OverrideIndicatorLabelDecorator.java:110)
org.eclipse.jdt.internal.ui.viewsupport.JavaUILabelProvider.decorateImage(JavaUILabelProvider.java:134)
org.eclipse.jdt.internal.ui.viewsupport.JavaUILabelProvider.getImage(JavaUILabelProvider.java:149)
org.eclipse.jdt.internal.ui.text.JavaOutlineInformationControl$OutlineLabelProvider.getImage(JavaOutlineInformationControl.java:200)
org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider.getImage(DelegatingStyledCellLabelProvider.java:184)
org.eclipse.jface.viewers.DecoratingStyledCellLabelProvider.getImage(DecoratingStyledCellLabelProvider.java:167)
org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider.update(DelegatingStyledCellLabelProvider.java:118)
org.eclipse.jface.viewers.DecoratingStyledCellLabelProvider.update(DecoratingStyledCellLabelProvider.java:134)
org.eclipse.jface.viewers.ViewerColumn.refresh(ViewerColumn.java:152)
org.eclipse.jface.viewers.AbstractTreeViewer.doUpdateItem(AbstractTreeViewer.java:938)
org.eclipse.jface.viewers.AbstractTreeViewer$UpdateItemSafeRunnable.run(AbstractTreeViewer.java:106)
org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
org.eclipse.jface.viewers.AbstractTreeViewer.doUpdateItem(AbstractTreeViewer.java:1018)
org.eclipse.jface.viewers.StructuredViewer$UpdateItemSafeRunnable.run(StructuredViewer.java:485)
org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
org.eclipse.jface.viewers.StructuredViewer.updateItem(StructuredViewer.java:2167)
org.eclipse.jface.viewers.AbstractTreeViewer.createTreeItem(AbstractTreeViewer.java:833)
org.eclipse.jface.viewers.AbstractTreeViewer$1.run(AbstractTreeViewer.java:808)
org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(AbstractTreeViewer.java:782)
org.eclipse.jface.viewers.TreeViewer.createChildren(TreeViewer.java:644)
org.eclipse.jface.viewers.AbstractTreeViewer.internalExpandToLevel(AbstractTreeViewer.java:1755)
org.eclipse.jdt.internal.ui.text.JavaOutlineInformationControl$OutlineTreeViewer.internalExpandToLevel(JavaOutlineInformationControl.java:245)
org.eclipse.jface.viewers.AbstractTreeViewer.internalExpandToLevel(AbstractTreeViewer.java:1765)
org.eclipse.jdt.internal.ui.text.JavaOutlineInformationControl$OutlineTreeViewer.internalExpandToLevel(JavaOutlineInformationControl.java:245)
org.eclipse.jface.viewers.AbstractTreeViewer.internalInitializeTree(AbstractTreeViewer.java:1534)
org.eclipse.jface.viewers.TreeViewer.internalInitializeTree(TreeViewer.java:833)
org.eclipse.jface.viewers.AbstractTreeViewer$5.run(AbstractTreeViewer.java:1517)
org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1443)
org.eclipse.jface.viewers.TreeViewer.preservingSelection(TreeViewer.java:403)
org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1404)
org.eclipse.jface.viewers.AbstractTreeViewer.inputChanged(AbstractTreeViewer.java:1510)
org.eclipse.jface.viewers.ContentViewer.setInput(ContentViewer.java:280)
org.eclipse.jface.viewers.StructuredViewer.setInput(StructuredViewer.java:1690)
org.eclipse.jdt.internal.ui.text.AbstractInformationControl.inputChanged(AbstractInformationControl.java:594)
org.eclipse.jdt.internal.ui.text.JavaOutlineInformationControl.setInput(JavaOutlineInformationControl.java:657)
org.eclipse.jface.text.AbstractInformationControlManager.internalShowInformationControl(AbstractInformationControlManager.java:1181)
org.eclipse.jface.text.AbstractInformationControlManager.presentInformation(AbstractInformationControlManager.java:1150)
org.eclipse.jface.text.AbstractInformationControlManager.setInformation(AbstractInformationControlManager.java:418)
org.eclipse.jface.text.information.InformationPresenter.computeInformation(InformationPresenter.java:355)
org.eclipse.jface.text.AbstractInformationControlManager.doShowInformation(AbstractInformationControlManager.java:1131)
org.eclipse.jface.text.AbstractInformationControlManager.showInformation(AbstractInformationControlManager.java:1121)
org.eclipse.jdt.internal.ui.javaeditor.JavaSourceViewer.doOperation(JavaSourceViewer.java:179)
org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor$AdaptedSourceViewer.doOperation(CompilationUnitEditor.java:200)
org.eclipse.ui.texteditor.TextOperationAction$1.run(TextOperationAction.java:128)
org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
org.eclipse.ui.texteditor.TextOperationAction.run(TextOperationAction.java:126)
org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
org.eclipse.ui.commands.ActionHandler.execute(ActionHandler.java:185)
org.eclipse.ui.internal.handlers.LegacyHandlerWrapper.execute(LegacyHandlerWrapper.java:109)
org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
org.eclipse.ui.internal.keys.WorkbenchKeyboard.executeCommand(WorkbenchKeyboard.java:468)
org.eclipse.ui.internal.keys.WorkbenchKeyboard.press(WorkbenchKeyboard.java:786)
org.eclipse.ui.internal.keys.WorkbenchKeyboard.processKeyEvent(WorkbenchKeyboard.java:885)
org.eclipse.ui.internal.keys.WorkbenchKeyboard.filterKeySequenceBindings(WorkbenchKeyboard.java:567)
org.eclipse.ui.internal.keys.WorkbenchKeyboard.access$3(WorkbenchKeyboard.java:508)
org.eclipse.ui.internal.keys.WorkbenchKeyboard$KeyDownFilter.handleEvent(WorkbenchKeyboard.java:123)
org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
org.eclipse.swt.widgets.Display.filterEvent(Display.java:1262)
org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1052)
org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077)
org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062)
org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1104)
org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1100)
org.eclipse.swt.widgets.Widget.wmChar(Widget.java:1509)
org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:4640)
org.eclipse.swt.widgets.Canvas.WM_CHAR(Canvas.java:345)
org.eclipse.swt.widgets.Control.windowProc(Control.java:4528)
org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:341)
org.eclipse.swt.widgets.Display.windowProc(Display.java:4972)
org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2531)
org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3752)
org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
org.eclipse.equinox.launcher.Main.run(Main.java:1410)
Comment 20 Dani Megert CLA 2011-12-17 03:47:48 EST
(In reply to comment #19)
> Is that one really fixed? I just hat one of this deadlocks on my machine. I use
> Eclipse 3.7.1 on Windows 7. Unfortunately i have no idea, how to reproduce this
> issue. The Thread dumps are below:

The dump is not complete and does not allow to see a deadlock. If you still see this using 3.8, then please open a new bug with steps to reproduce.
Comment 21 Ralf Grossklaus CLA 2011-12-21 02:32:27 EST
(In reply to comment #20)

> The dump is not complete and does not allow to see a deadlock. If you still see
> this using 3.8, then please open a new bug with steps to reproduce.

Maybe this is because i did't use jstack to print it and thus you cannot see the object addresses the threads are syncing on... Anyway the threads were dead locked and the traces look pretty similar to the other traces shown in the comments. 

i experienced that on 3.7.1. Since you recommended trying it on 3.8 i guess this issue hasn't been fixed in 3.7.x?! I'm asking, since the target milestone for this is 3.7 M6 and using a 3.8 is not an option for me.

Regards, Ralf
Comment 22 Dani Megert CLA 2011-12-21 02:43:07 EST
> i experienced that on 3.7.1. Since you recommended trying it on 3.8 i guess
> this issue hasn't been fixed in 3.7.x?!
The fix should be in 3.7.1. We saw some other deadlocks caused when coming back from sleep, but that was an OS issue (Linux).

If you see it again, please open a new bug, with a complete stack dump and steps if possible.
Comment 23 arnaud Mising name CLA 2012-01-25 08:40:10 EST
See Bug 369662
Comment 24 arnaud Mising name CLA 2012-01-26 03:23:57 EST
(In reply to comment #23)
> See Bug 369662

and bug 366048