Deadlock occurred in main thread while:
1. analyzing a large webdsl file using the plugin (dynamically loaded from checkout in workspace)
2. pressing ctrl-space for content completion in a Stratego file

CPU consumption was 0% and multiple thread dumps gave the same result.

Lennart: the complete stackdump is in your email; posting it here gave a stack overflow exception in the java regexp parser…

Submitted by Nathan Bruning on 25 March 2010 at 13:33

On 29 March 2010 at 08:08 Lennart Kats commented:

Cleaned up stack trace:


2010-03-25 14:20:19
Full thread dump Java HotSpot(TM) 64-Bit Server VM (14.1-b02 mixed mode):

“RMI TCP Connection(69)-127.0.0.1” daemon prio=10 tid=0x00007f84ba247000 nid=0x11ec runnable [0x00007f847a3f5000]
java.lang.Thread.State: RUNNABLE
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
- locked <0x00007f85cced0408> (a java.io.BufferedInputStream)
at java.io.FilterInputStream.read(FilterInputStream.java:66)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:517)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)

Locked ownable synchronizers:
- <0x00007f85cced0708> (a java.util.concurrent.locks.ReentrantLock$NonfairSync)

“Text Viewer Hover Presenter” daemon prio=10 tid=0x00007f8510cfd000 nid=0x11e9 waiting for monitor entry [0x00007f84857f8000]
java.lang.Thread.State: BLOCKED (on object monitor)
at org.strategoxt.imp.runtime.services.StrategoReferenceResolver.getLinkTarget(StrategoReferenceResolver.java:51)
- waiting to lock <0x00007f8518172088> (a java.lang.Class for org.strategoxt.imp.runtime.Environment)
at org.strategoxt.imp.runtime.services.StrategoReferenceResolver.getLinkTarget(StrategoReferenceResolver.java:1)
at org.strategoxt.imp.runtime.dynamicloading.DynamicReferenceResolver.getLinkTarget(DynamicReferenceResolver.java:21)
at org.strategoxt.imp.runtime.services.AnnotationHoverHelper.getHoverHelpAt(AnnotationHoverHelper.java:44)
at org.eclipse.imp.editor.internal.HoverHelpController.getHoverInfo(HoverHelpController.java:59)
at org.eclipse.jface.text.TextViewerHoverManager$4.run(TextViewerHoverManager.java:168)

Locked ownable synchronizers:
- None

“Worker-17” prio=10 tid=0x00007f85106fa000 nid=0x11d3 in Object.wait() [0x00007f84c3398000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00007f852b0b09a8> (a java.util.ArrayList)
at java.lang.Object.wait(Object.java:485)
at org.eclipse.ui.internal.console.IOConsolePartitioner.streamAppended(IOConsolePartitioner.java:471)
- locked <0x00007f852b0b09a8> (a java.util.ArrayList)
at org.eclipse.ui.console.IOConsoleOutputStream.notifyParitioner(IOConsoleOutputStream.java:245)
at org.eclipse.ui.console.IOConsoleOutputStream.encodedWrite(IOConsoleOutputStream.java:240)
at org.eclipse.ui.console.IOConsoleOutputStream.write(IOConsoleOutputStream.java:196)
at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:202)
at sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:272)
at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:276)
at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:122)
- locked <0x00007f852de143e8> (a org.strategoxt.imp.runtime.stratego.StrategoConsole$AutoFlushOutputStreamWriter)
at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:212)
at org.strategoxt.imp.runtime.stratego.StrategoConsole$AutoFlushOutputStreamWriter.write(StrategoConsole.java:142)
at java.io.Writer.write(Writer.java:140)
at org.spoofax.interpreter.library.ssl.SSL_fputs.call(SSL_fputs.java:38)
at org.strategoxt.lang.Context.invokePrimitive(Context.java:199)
at org.strategoxt.lang.Context.invokePrimitive(Context.java:190)
at org.strategoxt.stratego_lib.lifted750.invoke(lifted750.java:47)
at org.strategoxt.lang.SRTS_all.mapMaintainAnnos(SRTS_all.java:101)
at org.strategoxt.lang.SRTS_all.map(SRTS_all.java:66)
at org.strategoxt.lang.SRTS_all.invoke(SRTS_all.java:21)
at org.strategoxt.lang.compat.override.performance_tweaks.map_1_0_override.invoke(map_1_0_override.java:27)
at org.strategoxt.stratego_lib.fprint_0_0.invoke(fprint_0_0.java:37)
at org.strategoxt.stratego_lib.fprintnl_0_0.invoke(fprintnl_0_0.java:25)
at org.strategoxt.stratego_lib.debug_1_0.invoke(debug_1_0.java:33)
at org.strategoxt.lang.Strategy.invokeDynamic(Strategy.java:40)
at org.strategoxt.lang.InteropSDefT.evaluate(InteropSDefT.java:194)
at org.strategoxt.lang.InteropSDefT.evaluate(InteropSDefT.java:185)
at org.strategoxt.lang.InteropSDefT$StrategyBody.evaluate(InteropSDefT.java:247)
at org.strategoxt.lang.InteropSDefT$StrategyBody.eval(InteropSDefT.java:240)
at org.spoofax.interpreter.stratego.Strategy.evaluate(Strategy.java:96)
at org.spoofax.interpreter.stratego.SDefT.evaluate(SDefT.java:170)
at org.strategoxt.lang.InteropStrategy.invokeDynamic(InteropStrategy.java:55)
at org.strategoxt.lang.DynamicStrategy.invoke(DynamicStrategy.java:22)
at org.strategoxt.stratego_lib.dr_scope_1_1.invoke(dr_scope_1_1.java:56)
at org.strategoxt.lang.Strategy.invokeDynamic(Strategy.java:41)
at org.strategoxt.lang.InteropSDefT.evaluate(InteropSDefT.java:194)
at org.strategoxt.lang.InteropSDefT.evaluate(InteropSDefT.java:185)
at org.strategoxt.lang.InteropSDefT$StrategyBody.evaluate(InteropSDefT.java:247)
at org.strategoxt.lang.InteropSDefT$StrategyBody.eval(InteropSDefT.java:240)
at org.spoofax.interpreter.stratego.Strategy.evaluate(Strategy.java:96)
at org.spoofax.interpreter.stratego.SDefT.evaluate(SDefT.java:170)
at org.strategoxt.lang.InteropStrategy.invokeDynamic(InteropStrategy.java:55)
at org.strategoxt.lang.DynamicStrategy.invoke(DynamicStrategy.java:22)
at org.strategoxt.stratego_lib.m_135.invoke(m_135.java:25)
at org.strategoxt.lang.SRTS_all.mapMaintainAnnos(SRTS_all.java:101)
at org.strategoxt.lang.SRTS_all.mapMaintainAnnos(SRTS_all.java:108)
at org.strategoxt.stratego_lib.repeat_1_1.invoke(repeat_1_1.java:46)
[…repeats 1000+ times…]
at org.strategoxt.stratego_lib.repeat_1_1.invoke(repeat_1_1.java:46)
at org.strategoxt.stratego_lib.repeat_1_1.invoke(repeat_1_1.java:46)
at org.strategoxt.stratego_lib.repeat_1_1.invoke(repeat_1_1.java:46)

Locked ownable synchronizers:
- None

“main” prio=10 tid=0x0000000041d56000 nid=0xeb3 waiting for monitor entry [0x00007f85d66cd000]
java.lang.Thread.State: BLOCKED (on object monitor)
at org.strategoxt.imp.runtime.services.ContentProposer$1Runner.run(ContentProposer.java:212)
- waiting to lock <0x00007f8518172088> (a java.lang.Class for org.strategoxt.imp.runtime.Environment)
at org.strategoxt.imp.runtime.services.ContentProposer.invokeCompletionFunction(ContentProposer.java:227)
at org.strategoxt.imp.runtime.services.ContentProposer.getContentProposals(ContentProposer.java:129)
at org.strategoxt.imp.runtime.dynamicloading.DynamicContentProposer.getContentProposals(DynamicContentProposer.java:19)
at org.eclipse.imp.editor.internal.CompletionProcessor.computeCompletionProposals(CompletionProcessor.java:53)
at org.eclipse.jface.text.contentassist.ContentAssistant.computeCompletionProposals(ContentAssistant.java:1832)
at org.eclipse.jface.text.contentassist.CompletionProposalPopup.computeProposals(CompletionProposalPopup.java:556)
at org.eclipse.jface.text.contentassist.CompletionProposalPopup.access$16(CompletionProposalPopup.java:553)
at org.eclipse.jface.text.contentassist.CompletionProposalPopup$2.run(CompletionProposalPopup.java:488)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.jface.text.contentassist.CompletionProposalPopup.showProposals(CompletionProposalPopup.java:482)
at org.eclipse.jface.text.contentassist.ContentAssistant.showPossibleCompletions(ContentAssistant.java:1660)
at org.eclipse.jface.text.source.SourceViewer.doOperation(SourceViewer.java:835)
at org.eclipse.jface.text.source.projection.ProjectionViewer.doOperation(ProjectionViewer.java:1533)
at org.eclipse.imp.editor.StructuredSourceViewer.doOperation(StructuredSourceViewer.java:140)
at org.eclipse.ui.texteditor.ContentAssistAction$1.run(ContentAssistAction.java:82)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.texteditor.ContentAssistAction.run(ContentAssistAction.java:80)
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:470)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.press(WorkbenchKeyboard.java:824)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.processKeyEvent(WorkbenchKeyboard.java:880)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.filterKeySequenceBindings(WorkbenchKeyboard.java:569)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.access$3(WorkbenchKeyboard.java:510)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard$KeyDownFilter.handleEvent(WorkbenchKeyboard.java:125)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1467)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1175)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1200)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1185)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1212)
at org.eclipse.swt.widgets.Widget.gtk_key_press_event(Widget.java:706)
at org.eclipse.swt.widgets.Control.gtk_key_press_event(Control.java:2837)
at org.eclipse.swt.widgets.Composite.gtk_key_press_event(Composite.java:703)
at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:1570)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4594)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4191)
at org.eclipse.swt.internal.gtk.OS._gtk_main_do_event(Native Method)
at org.eclipse.swt.internal.gtk.OS.gtk_main_do_event(OS.java:7603)
at org.eclipse.swt.widgets.Display.eventProc(Display.java:1185)
at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Native Method)
at org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(OS.java:1860)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3110)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
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:368)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
at org.eclipse.equinox.launcher.Main.main(Main.java:1287)

Locked ownable synchronizers:
- None


On 29 March 2010 at 08:12 Lennart Kats commented:

Looks like this is not a deadlock but an infinite or very long loop in the type checker (I expect the CPU was running at 100% capacity!). Content completion just has to wait for the analysis to complete.

Relates to Spoofax/53. Closing this issue as ‘not a bug.’

Log in to post comments