usethesource / rascal

The implementation of the Rascal meta-programming language (including interpreter, type checker, parser generator, compiler and JVM based run-time system)
http://www.rascal-mpl.org
Other
406 stars 78 forks source link

Deadlock in Rascal console on resource import #589

Open mahills opened 10 years ago

mahills commented 10 years ago

Here is the stack trace from jstack showing where the deadlock is occurring. My guess -- without having looked into this extensively yet -- is that the following is occurring:

  1. When the command I'm running (just a function call) is processed, the run method in RascalScriptInterpreter calls the ModuleReloader to update the modules before actually evaluating the command. This is in Worker-195.
  2. The ModuleReloader locks the set of dirtyModules and then goes through to reload what has changed. One of the changes is with a generated resource module; reimporting this (within Worker-195) regenerates the module file.
  3. This regeneration (Worker-189) is a resource change, which triggers a call to the listener to say that a loaded module, the one we just generated, has changed. This call to moduleChanged in RascalModuleChangeListener wants to lock dirtyModules, but cannot.
  4. But, since it's stuck waiting for this, it never returns either. Hence, deadlock.

I'll take a look at this, but if anyone else wants to jump in be my guest :)

2014-06-12 13:25:34
Full thread dump Java HotSpot(TM) 64-Bit Server VM (23.25-b01 mixed mode):

"Attach Listener" daemon prio=5 tid=0x00007ffe0bace800 nid=0xd0f87 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Worker-197" prio=5 tid=0x00007ffe0c8f4000 nid=0xd1407 in Object.wait() [0x000000014861b000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x000000069b3d4950> (a org.eclipse.core.internal.jobs.WorkerPool)
    at org.eclipse.core.internal.jobs.WorkerPool.sleep(WorkerPool.java:188)
    - locked <0x000000069b3d4950> (a org.eclipse.core.internal.jobs.WorkerPool)
    at org.eclipse.core.internal.jobs.WorkerPool.startJob(WorkerPool.java:220)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:50)

"Thread-13" daemon prio=5 tid=0x00007ffe0bc45000 nid=0xd1b03 runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Worker-196" prio=5 tid=0x00007ffe0e839000 nid=0xd1a03 in Object.wait() [0x000000013e60c000]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x00000006a67d6c30> (a java.lang.Object)
    at java.lang.Object.wait(Object.java:503)
    at org.eclipse.core.internal.jobs.ThreadJob.waitForRun(ThreadJob.java:270)
    - locked <0x00000006a67d6c30> (a java.lang.Object)
    at org.eclipse.core.internal.jobs.ThreadJob.joinRun(ThreadJob.java:197)
    at org.eclipse.core.internal.jobs.ImplicitJobs.begin(ImplicitJobs.java:92)
    at org.eclipse.core.internal.jobs.JobManager.beginRule(JobManager.java:286)
    at org.eclipse.ui.internal.ide.ContentTypeDecorator.decorate(ContentTypeDecorator.java:57)
    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:53)

"Worker-195" prio=5 tid=0x00007ffe0b4c4800 nid=0xd190f in Object.wait() [0x000000013a30e000]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x00000006a67d6c30> (a java.lang.Object)
    at java.lang.Object.wait(Object.java:503)
    at org.eclipse.core.internal.jobs.ThreadJob.waitForRun(ThreadJob.java:270)
    - locked <0x00000006a67d6c30> (a java.lang.Object)
    at org.eclipse.core.internal.jobs.ThreadJob.joinRun(ThreadJob.java:197)
    at org.eclipse.core.internal.jobs.ImplicitJobs.begin(ImplicitJobs.java:92)
    at org.eclipse.core.internal.jobs.JobManager.beginRule(JobManager.java:286)
    at org.eclipse.core.internal.resources.WorkManager.checkIn(WorkManager.java:118)
    at org.eclipse.core.internal.resources.Workspace.prepareOperation(Workspace.java:2283)
    at org.eclipse.core.internal.resources.Resource.refreshLocal(Resource.java:1691)
    at org.eclipse.core.internal.resources.File.refreshLocal(File.java:333)
    at org.rascalmpl.eclipse.uri.ProjectURIResolver$1.close(ProjectURIResolver.java:123)
    at sun.nio.cs.StreamEncoder.implClose(StreamEncoder.java:320)
    at sun.nio.cs.StreamEncoder.close(StreamEncoder.java:149)
    - locked <0x00000005fb6cf0e8> (a java.io.OutputStreamWriter)
    at java.io.OutputStreamWriter.close(OutputStreamWriter.java:233)
    at java.io.BufferedWriter.close(BufferedWriter.java:266)
    - locked <0x00000005fb6cf0e8> (a java.io.OutputStreamWriter)
    at org.rascalmpl.semantics.dynamic.Import$External.interpret(Import.java:164)
    at org.rascalmpl.semantics.dynamic.Import.evalImport(Import.java:438)
    at org.rascalmpl.semantics.dynamic.Import.parseModule(Import.java:410)
    at org.rascalmpl.interpreter.Evaluator.parseModule(Evaluator.java:1452)
    at org.rascalmpl.interpreter.Evaluator.parseModule(Evaluator.java:1446)
    at org.rascalmpl.semantics.dynamic.Import.buildModule(Import.java:336)
    at org.rascalmpl.semantics.dynamic.Import.loadModule(Import.java:284)
    at org.rascalmpl.interpreter.Evaluator.reloadModule(Evaluator.java:1301)
    at org.rascalmpl.interpreter.Evaluator.reloadModules(Evaluator.java:1236)
    at org.rascalmpl.interpreter.Evaluator.reloadModules(Evaluator.java:1202)
    at org.rascalmpl.eclipse.nature.ModuleReloader$RascalModuleChangeListener.updateModules(ModuleReloader.java:145)
    - locked <0x00000006a5fadc48> (a org.rascalmpl.interpreter.Evaluator)
    - locked <0x00000006a66bb2e0> (a java.util.HashSet)
    at org.rascalmpl.eclipse.nature.ModuleReloader.updateModules(ModuleReloader.java:49)
    at org.rascalmpl.eclipse.console.RascalScriptInterpreter.run(RascalScriptInterpreter.java:237)
    - locked <0x00000006a5fadc48> (a org.rascalmpl.interpreter.Evaluator)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)

"Worker-194" prio=5 tid=0x00007ffe0e9fc000 nid=0xd1807 in Object.wait() [0x000000012fe56000]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x00000006a67d6c30> (a java.lang.Object)
    at java.lang.Object.wait(Object.java:503)
    at org.eclipse.core.internal.jobs.ThreadJob.waitForRun(ThreadJob.java:270)
    - locked <0x00000006a67d6c30> (a java.lang.Object)
    at org.eclipse.core.internal.jobs.ThreadJob.joinRun(ThreadJob.java:197)
    at org.eclipse.core.internal.jobs.ImplicitJobs.begin(ImplicitJobs.java:92)
    at org.eclipse.core.internal.jobs.JobManager.beginRule(JobManager.java:286)
    at org.eclipse.core.internal.utils.StringPoolJob.run(StringPoolJob.java:100)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)

"Worker-193" prio=5 tid=0x00007ffe0b4e1800 nid=0xd1703 in Object.wait() [0x00000001270b6000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x000000069b3d4950> (a org.eclipse.core.internal.jobs.WorkerPool)
    at org.eclipse.core.internal.jobs.WorkerPool.sleep(WorkerPool.java:188)
    - locked <0x000000069b3d4950> (a org.eclipse.core.internal.jobs.WorkerPool)
    at org.eclipse.core.internal.jobs.WorkerPool.startJob(WorkerPool.java:220)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:50)

"Worker-189" prio=5 tid=0x00007ffe0e89e800 nid=0xd0303 waiting for monitor entry [0x000000014060e000]
   java.lang.Thread.State: BLOCKED (on object monitor)
    at org.rascalmpl.eclipse.nature.ModuleReloader$RascalModuleChangeListener.moduleChanged(ModuleReloader.java:137)
    - waiting to lock <0x00000006a66bb2e0> (a java.util.HashSet)
    at org.rascalmpl.eclipse.nature.ModuleReloader$RascalModuleUpdateListener$1.notify(ModuleReloader.java:112)
    at org.rascalmpl.eclipse.nature.ModuleReloader$RascalModuleUpdateListener$1.visit(ModuleReloader.java:95)
    at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:69)
    at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:80)
    at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:80)
    at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:49)
    at org.rascalmpl.eclipse.nature.ModuleReloader$RascalModuleUpdateListener.resourceChanged(ModuleReloader.java:78)
    at org.eclipse.core.internal.events.NotificationManager$1.run(NotificationManager.java:291)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:285)
    at org.eclipse.core.internal.events.NotificationManager.broadcastChanges(NotificationManager.java:149)
    at org.eclipse.core.internal.resources.Workspace.broadcastPostChange(Workspace.java:396)
    at org.eclipse.core.internal.resources.Workspace.endOperation(Workspace.java:1531)
    at org.eclipse.core.internal.resources.Resource.refreshLocal(Resource.java:1712)
    at org.eclipse.core.internal.resources.File.refreshLocal(File.java:333)
    at org.rascalmpl.eclipse.uri.ProjectURIResolver$1.close(ProjectURIResolver.java:123)
    at sun.nio.cs.StreamEncoder.implClose(StreamEncoder.java:320)
    at sun.nio.cs.StreamEncoder.close(StreamEncoder.java:149)
    - locked <0x00000006c9e151d0> (a java.io.OutputStreamWriter)
    at java.io.OutputStreamWriter.close(OutputStreamWriter.java:233)
    at java.io.BufferedWriter.close(BufferedWriter.java:266)
    - locked <0x00000006c9e151d0> (a java.io.OutputStreamWriter)
    at org.rascalmpl.semantics.dynamic.Import$External.interpret(Import.java:164)
    at org.rascalmpl.semantics.dynamic.Import.evalImport(Import.java:438)
    at org.rascalmpl.semantics.dynamic.Import.parseModule(Import.java:410)
    at org.rascalmpl.interpreter.Evaluator.parseModule(Evaluator.java:1452)
    at org.rascalmpl.eclipse.editor.ParseController$ParseJob.run(ParseController.java:190)
    - locked <0x00000006ba9d3580> (a org.rascalmpl.interpreter.Evaluator)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)

"Worker-187" prio=5 tid=0x00007ffe0cff4000 nid=0xcfb47 in Object.wait() [0x0000000129cce000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x00000006baa048e8> (a org.eclipse.core.internal.jobs.Semaphore)
    at org.eclipse.core.internal.jobs.Semaphore.acquire(Semaphore.java:39)
    - locked <0x00000006baa048e8> (a org.eclipse.core.internal.jobs.Semaphore)
    at org.eclipse.core.internal.jobs.JobManager.join(JobManager.java:847)
    at org.eclipse.core.internal.jobs.InternalJob.join(InternalJob.java:380)
    at org.eclipse.core.runtime.jobs.Job.join(Job.java:385)
    at org.rascalmpl.eclipse.editor.ParseController.parse(ParseController.java:253)
    at org.rascalmpl.eclipse.editor.ParseController.parse(ParseController.java:143)
    at org.eclipse.imp.editor.ParserScheduler.run(ParserScheduler.java:92)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)

"Thread-12" daemon prio=5 tid=0x00007ffe0f677800 nid=0xccb17 runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Thread-11" daemon prio=5 tid=0x00007ffe101eb800 nid=0xcc90f runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Thread-10" daemon prio=5 tid=0x00007ffe0dc14000 nid=0xcc10f runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Thread-9" daemon prio=5 tid=0x00007ffe0c3cc800 nid=0xc9737 runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Thread-8" daemon prio=5 tid=0x00007ffe0ea43000 nid=0xc9107 runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Console Command Executor" daemon prio=5 tid=0x00007ffe0f466800 nid=0xe103 in Object.wait() [0x0000000144615000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x00000006c4b71ad0> (a org.eclipse.core.internal.jobs.Semaphore)
    at org.eclipse.core.internal.jobs.Semaphore.acquire(Semaphore.java:39)
    - locked <0x00000006c4b71ad0> (a org.eclipse.core.internal.jobs.Semaphore)
    at org.eclipse.core.internal.jobs.JobManager.join(JobManager.java:847)
    at org.eclipse.core.internal.jobs.InternalJob.join(InternalJob.java:380)
    at org.eclipse.core.runtime.jobs.Job.join(Job.java:385)
    at org.rascalmpl.eclipse.console.RascalScriptInterpreter.execute(RascalScriptInterpreter.java:334)
    - locked <0x00000006a5fadce8> (a org.rascalmpl.eclipse.console.RascalScriptInterpreter)
    at org.rascalmpl.eclipse.console.internal.InteractiveInterpreterConsole$CommandExecutor.run(InteractiveInterpreterConsole.java:852)
    at java.lang.Thread.run(Thread.java:724)

"Console Sync ThreadRascal console output syncer [PHPAnalysis]" prio=5 tid=0x00007ffe0c754000 nid=0xd333 waiting on condition [0x0000000142612000]
   java.lang.Thread.State: TIMED_WAITING (parking)
    at sun.misc.Unsafe.park(Native Method)
    - parking to wait for  <0x00000006a5fadc28> (a java.util.concurrent.Semaphore$NonfairSync)
    at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:226)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedNanos(AbstractQueuedSynchronizer.java:1033)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer.tryAcquireSharedNanos(AbstractQueuedSynchronizer.java:1326)
    at java.util.concurrent.Semaphore.tryAcquire(Semaphore.java:414)
    at org.rascalmpl.eclipse.console.internal.TimedBufferedPipe$SyncThread.run(TimedBufferedPipe.java:38)

"Thread-5" daemon prio=5 tid=0x00007ffe0f005000 nid=0xcb0f runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"[ThreadPool Manager] - Idle Thread" daemon prio=5 tid=0x00007ffe0e93a000 nid=0x681b in Object.wait() [0x0000000146618000]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x00000006a11b09b0> (a org.eclipse.equinox.internal.util.impl.tpt.threadpool.Executor)
    at java.lang.Object.wait(Object.java:503)
    at org.eclipse.equinox.internal.util.impl.tpt.threadpool.Executor.run(Executor.java:106)
    - locked <0x00000006a11b09b0> (a org.eclipse.equinox.internal.util.impl.tpt.threadpool.Executor)

"DLTK indexing" daemon prio=5 tid=0x00007ffe0ca73000 nid=0xc103 in Object.wait() [0x000000013c609000]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x000000069eb89380> (a org.eclipse.dltk.core.search.indexing.IndexManager)
    at java.lang.Object.wait(Object.java:503)
    at org.eclipse.dltk.internal.core.search.processing.JobManager.run(JobManager.java:445)
    - locked <0x000000069eb89380> (a org.eclipse.dltk.core.search.indexing.IndexManager)
    at java.lang.Thread.run(Thread.java:724)

"Console Sync ThreadConsole Pipe stdErr" prio=5 tid=0x00007ffe0cc8f000 nid=0xb503 waiting on condition [0x0000000137e62000]
   java.lang.Thread.State: TIMED_WAITING (parking)
    at sun.misc.Unsafe.park(Native Method)
    - parking to wait for  <0x000000069e3cd6c0> (a java.util.concurrent.Semaphore$NonfairSync)
    at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:226)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedNanos(AbstractQueuedSynchronizer.java:1033)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer.tryAcquireSharedNanos(AbstractQueuedSynchronizer.java:1326)
    at java.util.concurrent.Semaphore.tryAcquire(Semaphore.java:414)
    at org.rascalmpl.eclipse.console.internal.TimedBufferedPipe$SyncThread.run(TimedBufferedPipe.java:38)

"Console Sync ThreadUI Pipe stdErr" prio=5 tid=0x00007ffe0c87d000 nid=0xb407 waiting on condition [0x0000000135e5f000]
   java.lang.Thread.State: TIMED_WAITING (parking)
    at sun.misc.Unsafe.park(Native Method)
    - parking to wait for  <0x000000069e3cd7a8> (a java.util.concurrent.Semaphore$NonfairSync)
    at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:226)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedNanos(AbstractQueuedSynchronizer.java:1033)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer.tryAcquireSharedNanos(AbstractQueuedSynchronizer.java:1326)
    at java.util.concurrent.Semaphore.tryAcquire(Semaphore.java:414)
    at org.rascalmpl.eclipse.console.internal.TimedBufferedPipe$SyncThread.run(TimedBufferedPipe.java:38)

"Console Sync ThreadConsole Pipe stdOut" prio=5 tid=0x00007ffe0c3c8000 nid=0xae23 waiting on condition [0x0000000133e5c000]
   java.lang.Thread.State: TIMED_WAITING (parking)
    at sun.misc.Unsafe.park(Native Method)
    - parking to wait for  <0x000000069cacb6f0> (a java.util.concurrent.Semaphore$NonfairSync)
    at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:226)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedNanos(AbstractQueuedSynchronizer.java:1033)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer.tryAcquireSharedNanos(AbstractQueuedSynchronizer.java:1326)
    at java.util.concurrent.Semaphore.tryAcquire(Semaphore.java:414)
    at org.rascalmpl.eclipse.console.internal.TimedBufferedPipe$SyncThread.run(TimedBufferedPipe.java:38)

"Console Sync ThreadUI Pipe stdOut" prio=5 tid=0x00007ffe0b82a000 nid=0xad27 waiting on condition [0x0000000131e59000]
   java.lang.Thread.State: TIMED_WAITING (parking)
    at sun.misc.Unsafe.park(Native Method)
    - parking to wait for  <0x000000069cacb7a0> (a java.util.concurrent.Semaphore$NonfairSync)
    at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:226)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedNanos(AbstractQueuedSynchronizer.java:1033)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer.tryAcquireSharedNanos(AbstractQueuedSynchronizer.java:1326)
    at java.util.concurrent.Semaphore.tryAcquire(Semaphore.java:414)
    at org.rascalmpl.eclipse.console.internal.TimedBufferedPipe$SyncThread.run(TimedBufferedPipe.java:38)

"Java indexing" daemon prio=5 tid=0x00007ffe0caaf000 nid=0xab03 in Object.wait() [0x000000012de53000]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x000000069bea2f30> (a org.eclipse.jdt.internal.core.search.indexing.IndexManager)
    at java.lang.Object.wait(Object.java:503)
    at org.eclipse.jdt.internal.core.search.processing.JobManager.run(JobManager.java:382)
    - locked <0x000000069bea2f30> (a org.eclipse.jdt.internal.core.search.indexing.IndexManager)
    at java.lang.Thread.run(Thread.java:724)

"EMF Reference Cleaner" daemon prio=5 tid=0x00007ffe0b21b000 nid=0x7a03 in Object.wait() [0x00000001221f2000]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x000000069b3d49e8> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:135)
    - locked <0x000000069b3d49e8> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:151)
    at org.eclipse.emf.common.util.CommonUtil$1ReferenceClearingQueuePollingThread.run(CommonUtil.java:70)

"Worker-JM" prio=5 tid=0x00007ffe0b93c000 nid=0x7903 in Object.wait() [0x000000011e0e7000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x000000069b3d4a88> (a java.util.ArrayList)
    at org.eclipse.core.internal.jobs.InternalWorker.run(InternalWorker.java:58)
    - locked <0x000000069b3d4a88> (a java.util.ArrayList)

"[Timer] - Main Queue Handler" daemon prio=5 tid=0x00007ffe0b9ad800 nid=0x7803 in Object.wait() [0x00000001200ea000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x000000069ae993f8> (a java.lang.Object)
    at org.eclipse.equinox.internal.util.impl.tpt.timer.TimerImpl.run(TimerImpl.java:141)
    - locked <0x000000069ae993f8> (a java.lang.Object)
    at java.lang.Thread.run(Thread.java:724)

"Framework Event Dispatcher" daemon prio=5 tid=0x00007ffe0b308800 nid=0x7707 in Object.wait() [0x000000011c0e4000]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x000000069ae994b0> (a org.eclipse.osgi.framework.eventmgr.EventManager$EventThread)
    at java.lang.Object.wait(Object.java:503)
    at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.getNextEvent(EventManager.java:400)
    - locked <0x000000069ae994b0> (a org.eclipse.osgi.framework.eventmgr.EventManager$EventThread)
    at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:336)

"Start Level Event Dispatcher" daemon prio=5 tid=0x00007ffe0c1ae800 nid=0x7403 in Object.wait() [0x000000011a0e1000]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x000000069ae99528> (a org.eclipse.osgi.framework.eventmgr.EventManager$EventThread)
    at java.lang.Object.wait(Object.java:503)
    at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.getNextEvent(EventManager.java:400)
    - locked <0x000000069ae99528> (a org.eclipse.osgi.framework.eventmgr.EventManager$EventThread)
    at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:336)

"Bundle File Closer" daemon prio=5 tid=0x00007ffe0c8e2000 nid=0x7303 in Object.wait() [0x000000011782d000]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x000000069ac80908> (a org.eclipse.osgi.framework.eventmgr.EventManager$EventThread)
    at java.lang.Object.wait(Object.java:503)
    at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.getNextEvent(EventManager.java:400)
    - locked <0x000000069ac80908> (a org.eclipse.osgi.framework.eventmgr.EventManager$EventThread)
    at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:336)

"Framework Active Thread" prio=5 tid=0x00007ffe0b0a4000 nid=0x7207 in Object.wait() [0x00000001153ae000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x000000069abc6ef8> (a org.eclipse.osgi.framework.internal.core.Framework)
    at org.eclipse.osgi.framework.internal.core.Framework.run(Framework.java:1862)
    - locked <0x000000069abc6ef8> (a org.eclipse.osgi.framework.internal.core.Framework)
    at java.lang.Thread.run(Thread.java:724)

"Service Thread" daemon prio=5 tid=0x00007ffe0b052000 nid=0x3b03 runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C2 CompilerThread1" daemon prio=5 tid=0x00007ffe0b051800 nid=0x3a03 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C2 CompilerThread0" daemon prio=5 tid=0x00007ffe0b050800 nid=0x3903 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Signal Dispatcher" daemon prio=5 tid=0x00007ffe0b050000 nid=0x3803 runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Finalizer" daemon prio=5 tid=0x00007ffe0b805800 nid=0x2403 in Object.wait() [0x000000010be60000]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x000000069aaccc08> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:135)
    - locked <0x000000069aaccc08> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:151)
    at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:189)

"Reference Handler" daemon prio=5 tid=0x00007ffe0b805000 nid=0x2303 in Object.wait() [0x0000000109e5d000]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x000000069aaccca0> (a java.lang.ref.Reference$Lock)
    at java.lang.Object.wait(Object.java:503)
    at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:133)
    - locked <0x000000069aaccca0> (a java.lang.ref.Reference$Lock)

"main" prio=5 tid=0x00007ffe0c001800 nid=0x507 runnable [0x00007fff5e1b4000]
   java.lang.Thread.State: RUNNABLE
    at org.eclipse.swt.internal.cocoa.OS.objc_msgSend_bool(Native Method)
    at org.eclipse.swt.internal.cocoa.NSRunLoop.runMode(NSRunLoop.java:42)
    at org.eclipse.swt.widgets.Display.sleep(Display.java:4610)
    at org.eclipse.ui.application.WorkbenchAdvisor.eventLoopIdle(WorkbenchAdvisor.java:364)
    at org.eclipse.ui.internal.ide.application.IDEWorkbenchAdvisor.eventLoopIdle(IDEWorkbenchAdvisor.java:917)
    at org.eclipse.ui.internal.Workbench$3.eventLoopIdle(Workbench.java:487)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1117)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:138)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:610)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
    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:354)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1426)

"VM Thread" prio=5 tid=0x00007ffe0b044000 nid=0x2203 runnable 

"VM Periodic Task Thread" prio=5 tid=0x00007ffe0b064000 nid=0x3c03 waiting on condition 

JNI global references: 1691
mahills commented 10 years ago

One idea may be to just not automatically re-import resource modules, that would at least prevent this problem. Can anyone see any problems with that?

swatbot commented 10 years ago

Hmmm.. Otherwise it could be fixed by cloning the todo list quickly under lock, and then reloading, then generated modules would become dirty and get loaded again... I believe you are right and we can forget about automatic reload of generated modules, as long as they are always loaded from scratch right after regeneration. — Jurgen J. Vinju CWI SWAT INRIA Lille UvA master software engineering http://jurgen.vinju.org

On Thu, Jun 12, 2014 at 8:03 PM, mahills notifications@github.com wrote:

One idea may be to just not automatically re-import resource modules, that would at least prevent this problem. Can anyone see any problems with that?

Reply to this email directly or view it on GitHub: https://github.com/cwi-swat/rascal/issues/589#issuecomment-45926572