{"action":"closed","issue":{"url":"https://api.github.com/repos/ensime/ensime-server/issues/1463","repository_url":"https://api.github.com/repos/ensime/ensime-server","labels_url":"https://api.github.com/repos/ensime/ensime-server/issues/1463/labels{/name}","comments_url":"https://api.github.com/repos/ensime/ensime-server/issues/1463/comments","events_url":"https://api.github.com/repos/ensime/ensime-server/issues/1463/events","html_url":"https://github.com/ensime/ensime-server/issues/1463","id":155059855,"number":1463,"title":"Race condition inside presentation compiler triggered by ensime-server","user":{"login":"jix","id":128138,"avatar_url":"https://avatars.githubusercontent.com/u/128138?v=3","gravatar_id":"","url":"https://api.github.com/users/jix","html_url":"https://github.com/jix","followers_url":"https://api.github.com/users/jix/followers","following_url":"https://api.github.com/users/jix/following{/other_user}","gists_url":"https://api.github.com/users/jix/gists{/gist_id}","starred_url":"https://api.github.com/users/jix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jix/subscriptions","organizations_url":"https://api.github.com/users/jix/orgs","repos_url":"https://api.github.com/users/jix/repos","events_url":"https://api.github.com/users/jix/events{/privacy}","received_events_url":"https://api.github.com/users/jix/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-16T15:55:05Z","updated_at":"2016-05-16T16:05:16Z","closed_at":"2016-05-16T16:05:16Z","body":"While working on some code using the chisel3 library, the ensime-server dropped the connections to ensime-atom. A look into the server log revealed the following exception:\r\n\r\n```\r\n17:40:48.791 ERROR LocalActorRefProvider(akka://ENSIME) LocalActorRefProvider(akka://ENSIME) - guardian failed, shutting down system\r\njava.lang.AssertionError: assertion failed: Race condition detected: You are running a presentation compiler method outside the PC thread.[phase: <no phase>] Please file a ticket with the current stack trace at https://www.assembla.com/spaces/scala-ide/support/tickets\r\n\tat scala.tools.nsc.interactive.Global.assertCorrectThread(Global.scala:535)\r\n\tat scala.reflect.internal.Symbols$Symbol.rawInfo(Symbols.scala:1565)\r\n\tat scala.reflect.internal.Symbols$Symbol.hasCompleteInfo(Symbols.scala:1543)\r\n\tat scala.reflect.internal.Symbols$Symbol.symbolKind(Symbols.scala:2555)\r\n\tat scala.reflect.internal.Symbols$Symbol.sanitizedKindString(Symbols.scala:2570)\r\n\tat scala.reflect.internal.Symbols$Symbol.kindString(Symbols.scala:2578)\r\n\tat scala.reflect.internal.Symbols$Symbol.toString(Symbols.scala:2631)\r\n\tat java.lang.String.valueOf(String.java:2994)\r\n\tat scala.collection.mutable.StringBuilder.append(StringBuilder.scala:200)\r\n\tat scala.reflect.internal.Trees$TreeContextApiImpl.summaryString(Trees.scala:228)\r\n\tat scala.reflect.internal.Trees$TreeContextApiImpl.summaryString(Trees.scala:224)\r\n\tat org.ensime.core.CompletionControl$class.completionsAt(Completion.scala:127)\r\n\tat org.ensime.core.RichPresentationCompiler.completionsAt(RichPresentationCompiler.scala:252)\r\n\tat org.ensime.core.RichCompilerControl$class.askCompletionsAt(RichPresentationCompiler.scala:183)\r\n\tat org.ensime.core.RichPresentationCompiler.askCompletionsAt(RichPresentationCompiler.scala:252)\r\n\tat org.ensime.core.Analyzer$$anonfun$allTheThings$1$$anonfun$applyOrElse$4.apply(Analyzer.scala:202)\r\n\tat org.ensime.core.Analyzer$$anonfun$allTheThings$1$$anonfun$applyOrElse$4.apply(Analyzer.scala:200)\r\n\tat org.ensime.core.Analyzer.withExisting(Analyzer.scala:307)\r\n\tat org.ensime.core.Analyzer$$anonfun$allTheThings$1.applyOrElse(Analyzer.scala:200)\r\n\tat org.ensime.core.Analyzer$$anonfun$allTheThings$1.applyOrElse(Analyzer.scala:159)\r\n\tat scala.runtime.AbstractPartialFunction.apply(AbstractPartialFunction.scala:36)\r\n\tat org.ensime.core.Analyzer$$anonfun$ready$1.applyOrElse(Analyzer.scala:156)\r\n\tat scala.runtime.AbstractPartialFunction.apply(AbstractPartialFunction.scala:36)\r\n\tat akka.event.LoggingReceive.apply(LoggingReceive.scala:62)\r\n\tat akka.event.LoggingReceive.apply(LoggingReceive.scala:50)\r\n\tat scala.PartialFunction$class.applyOrElse(PartialFunction.scala:123)\r\n\tat akka.event.LoggingReceive.applyOrElse(LoggingReceive.scala:50)\r\n\tat akka.actor.Actor$class.aroundReceive(Actor.scala:467)\r\n\tat org.ensime.core.Analyzer.aroundReceive(Analyzer.scala:47)\r\n\tat akka.actor.ActorCell.receiveMessage(ActorCell.scala:516)\r\n\tat akka.actor.ActorCell.invoke(ActorCell.scala:487)\r\n\tat akka.dispatch.Mailbox.processMailbox(Mailbox.scala:238)\r\n\tat akka.dispatch.Mailbox.run(Mailbox.scala:220)\r\n\tat akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:397)\r\n\tat scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)\r\n\tat scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)\r\n\tat scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)\r\n\tat scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)\r\n```\r\n\r\nI didn't manage to create a small project to reproduce this bug, but looking at Completion.scala:127, the call causing the exception is just issued to create some debug message. Commenting out that debug message resolved this issue for me."}}