{"action":"created","issue":{"url":"https://api.github.com/repos/sbt/sbt/issues/1962","labels_url":"https://api.github.com/repos/sbt/sbt/issues/1962/labels{/name}","comments_url":"https://api.github.com/repos/sbt/sbt/issues/1962/comments","events_url":"https://api.github.com/repos/sbt/sbt/issues/1962/events","html_url":"https://github.com/sbt/sbt/issues/1962","id":67325317,"number":1962,"title":"thrashing (hangs in \"Reapplying settings...\") on `~ + testQuick`","user":{"login":"wookietreiber","id":827088,"avatar_url":"https://avatars.githubusercontent.com/u/827088?v=3","gravatar_id":"","url":"https://api.github.com/users/wookietreiber","html_url":"https://github.com/wookietreiber","followers_url":"https://api.github.com/users/wookietreiber/followers","following_url":"https://api.github.com/users/wookietreiber/following{/other_user}","gists_url":"https://api.github.com/users/wookietreiber/gists{/gist_id}","starred_url":"https://api.github.com/users/wookietreiber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wookietreiber/subscriptions","organizations_url":"https://api.github.com/users/wookietreiber/orgs","repos_url":"https://api.github.com/users/wookietreiber/repos","events_url":"https://api.github.com/users/wookietreiber/events{/privacy}","received_events_url":"https://api.github.com/users/wookietreiber/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/sbt/sbt/labels/Bug","name":"Bug","color":"e10c02"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-04-09T09:57:36Z","updated_at":"2015-04-09T21:44:15Z","closed_at":null,"body":"I am using `~ + testQuick` and sbt starts to hang / get stuck with the last output being `Reapplying settings...`. Here's the threaddump (visualvm, hope this helps):\r\n\r\n```\r\n2015-04-09 11:40:23\r\nFull thread dump OpenJDK 64-Bit Server VM (24.75-b04 mixed mode):\r\n\r\n\"RMI TCP Accept-0\" daemon prio=10 tid=0x00007f08ac266800 nid=0x5516 runnable [0x00007f08efcfb000]\r\n   java.lang.Thread.State: RUNNABLE\r\n\tat java.net.PlainSocketImpl.socketAccept(Native Method)\r\n\tat java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:398)\r\n\tat java.net.ServerSocket.implAccept(ServerSocket.java:530)\r\n\tat java.net.ServerSocket.accept(ServerSocket.java:498)\r\n\tat sun.management.jmxremote.LocalRMIServerSocketFactory$1.accept(LocalRMIServerSocketFactory.java:52)\r\n\tat sun.rmi.transport.tcp.TCPTransport$AcceptLoop.executeAcceptLoop(TCPTransport.java:399)\r\n\tat sun.rmi.transport.tcp.TCPTransport$AcceptLoop.run(TCPTransport.java:371)\r\n\tat java.lang.Thread.run(Thread.java:745)\r\n\r\n   Locked ownable synchronizers:\r\n\t- None\r\n\r\n\"Attach Listener\" daemon prio=10 tid=0x00007f08d0002000 nid=0x5514 waiting on condition [0x0000000000000000]\r\n   java.lang.Thread.State: RUNNABLE\r\n\r\n   Locked ownable synchronizers:\r\n\t- None\r\n\r\n\"AWT-XAWT\" daemon prio=10 tid=0x00007f087c0cc800 nid=0x519a runnable [0x00007f089664c000]\r\n   java.lang.Thread.State: RUNNABLE\r\n\tat sun.awt.X11.XToolkit.waitForEvents(Native Method)\r\n\tat sun.awt.X11.XToolkit.run(XToolkit.java:541)\r\n\tat sun.awt.X11.XToolkit.run(XToolkit.java:505)\r\n\tat java.lang.Thread.run(Thread.java:745)\r\n\r\n   Locked ownable synchronizers:\r\n\t- None\r\n\r\n\"Java2D Disposer\" daemon prio=10 tid=0x00007f087c0b0000 nid=0x5199 in Object.wait() [0x00007f08ec1d9000]\r\n   java.lang.Thread.State: WAITING (on object monitor)\r\n\tat java.lang.Object.wait(Native Method)\r\n\t- waiting on <0x00000000a1ea8998> (a java.lang.ref.ReferenceQueue$Lock)\r\n\tat java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:135)\r\n\t- locked <0x00000000a1ea8998> (a java.lang.ref.ReferenceQueue$Lock)\r\n\tat java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:151)\r\n\tat sun.java2d.Disposer.run(Disposer.java:145)\r\n\tat java.lang.Thread.run(Thread.java:745)\r\n\r\n   Locked ownable synchronizers:\r\n\t- None\r\n\r\n\"Service Thread\" daemon prio=10 tid=0x00007f0904174000 nid=0x510f runnable [0x0000000000000000]\r\n   java.lang.Thread.State: RUNNABLE\r\n\r\n   Locked ownable synchronizers:\r\n\t- None\r\n\r\n\"C2 CompilerThread1\" daemon prio=10 tid=0x00007f0904171800 nid=0x510e waiting on condition [0x0000000000000000]\r\n   java.lang.Thread.State: RUNNABLE\r\n\r\n   Locked ownable synchronizers:\r\n\t- None\r\n\r\n\"C2 CompilerThread0\" daemon prio=10 tid=0x00007f090416e800 nid=0x510d waiting on condition [0x0000000000000000]\r\n   java.lang.Thread.State: RUNNABLE\r\n\r\n   Locked ownable synchronizers:\r\n\t- None\r\n\r\n\"Signal Dispatcher\" daemon prio=10 tid=0x00007f090416c800 nid=0x510c runnable [0x0000000000000000]\r\n   java.lang.Thread.State: RUNNABLE\r\n\r\n   Locked ownable synchronizers:\r\n\t- None\r\n\r\n\"Finalizer\" daemon prio=10 tid=0x00007f0904141800 nid=0x510b in Object.wait() [0x00007f08fb0ef000]\r\n   java.lang.Thread.State: WAITING (on object monitor)\r\n\tat java.lang.Object.wait(Native Method)\r\n\t- waiting on <0x00000000a05dc058> (a java.lang.ref.ReferenceQueue$Lock)\r\n\tat java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:135)\r\n\t- locked <0x00000000a05dc058> (a java.lang.ref.ReferenceQueue$Lock)\r\n\tat java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:151)\r\n\tat java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:209)\r\n\r\n   Locked ownable synchronizers:\r\n\t- None\r\n\r\n\"Reference Handler\" daemon prio=10 tid=0x00007f090413f800 nid=0x510a in Object.wait() [0x00007f08fb1f0000]\r\n   java.lang.Thread.State: WAITING (on object monitor)\r\n\tat java.lang.Object.wait(Native Method)\r\n\t- waiting on <0x00000000a05dbcd0> (a java.lang.ref.Reference$Lock)\r\n\tat java.lang.Object.wait(Object.java:503)\r\n\tat java.lang.ref.Reference$ReferenceHandler.run(Reference.java:133)\r\n\t- locked <0x00000000a05dbcd0> (a java.lang.ref.Reference$Lock)\r\n\r\n   Locked ownable synchronizers:\r\n\t- None\r\n\r\n\"main\" prio=10 tid=0x00007f0904008800 nid=0x5104 runnable [0x00007f090b1b2000]\r\n   java.lang.Thread.State: RUNNABLE\r\n\tat scala.collection.immutable.List.foreach(List.scala:318)\r\n\tat scala.collection.generic.Growable$class.$plus$plus$eq(Growable.scala:48)\r\n\tat scala.collection.mutable.ListBuffer.$plus$plus$eq(ListBuffer.scala:176)\r\n\tat scala.collection.mutable.ListBuffer.$plus$plus$eq(ListBuffer.scala:45)\r\n\tat scala.collection.SeqLike$class.$colon$plus(SeqLike.scala:529)\r\n\tat scala.collection.AbstractSeq.$colon$plus(Seq.scala:40)\r\n\tat sbt.Init$class.append(Settings.scala:168)\r\n\tat sbt.Def$.append(Def.scala:10)\r\n\tat sbt.Init$$anonfun$add$1.apply(Settings.scala:165)\r\n\tat sbt.Init$$anonfun$add$1.apply(Settings.scala:165)\r\n\tat sbt.IMap$IMap0.mapValue(PMap.scala:52)\r\n\tat sbt.IMap$IMap0.mapValue(PMap.scala:46)\r\n\tat sbt.Init$class.add(Settings.scala:165)\r\n\tat sbt.Def$.add(Def.scala:10)\r\n\tat sbt.Init$$anonfun$grouped$1.apply(Settings.scala:162)\r\n\tat sbt.Init$$anonfun$grouped$1.apply(Settings.scala:162)\r\n\tat scala.collection.LinearSeqOptimized$class.foldLeft(LinearSeqOptimized.scala:111)\r\n\tat scala.collection.immutable.List.foldLeft(List.scala:84)\r\n\tat scala.collection.TraversableOnce$class.$div$colon(TraversableOnce.scala:138)\r\n\tat scala.collection.AbstractTraversable.$div$colon(Traversable.scala:105)\r\n\tat sbt.Init$class.grouped(Settings.scala:162)\r\n\tat sbt.Def$.grouped(Def.scala:10)\r\n\tat sbt.Init$class.compiled(Settings.scala:136)\r\n\tat sbt.Def$.compiled(Def.scala:10)\r\n\tat sbt.Init$class.make(Settings.scala:144)\r\n\tat sbt.Def$.make(Def.scala:10)\r\n\tat sbt.Project$.makeSettings(Project.scala:350)\r\n\tat sbt.Load$.reapply(Load.scala:187)\r\n\tat sbt.BuiltinCommands$.reapply(Main.scala:233)\r\n\tat sbt.Cross$$anonfun$switchVersion$2.apply(Cross.scala:77)\r\n\tat sbt.Cross$$anonfun$switchVersion$2.apply(Cross.scala:34)\r\n\tat sbt.Command$$anonfun$applyEffect$1$$anonfun$apply$2.apply(Command.scala:58)\r\n\tat sbt.Command$$anonfun$applyEffect$1$$anonfun$apply$2.apply(Command.scala:58)\r\n\tat sbt.Command$$anonfun$applyEffect$2$$anonfun$apply$3.apply(Command.scala:60)\r\n\tat sbt.Command$$anonfun$applyEffect$2$$anonfun$apply$3.apply(Command.scala:60)\r\n\tat sbt.Command$.process(Command.scala:92)\r\n\tat sbt.MainLoop$$anonfun$1$$anonfun$apply$1.apply(MainLoop.scala:98)\r\n\tat sbt.MainLoop$$anonfun$1$$anonfun$apply$1.apply(MainLoop.scala:98)\r\n\tat sbt.State$$anon$1.process(State.scala:184)\r\n\tat sbt.MainLoop$$anonfun$1.apply(MainLoop.scala:98)\r\n\tat sbt.MainLoop$$anonfun$1.apply(MainLoop.scala:98)\r\n\tat sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)\r\n\tat sbt.MainLoop$.next(MainLoop.scala:98)\r\n\tat sbt.MainLoop$.run(MainLoop.scala:91)\r\n\tat sbt.MainLoop$$anonfun$runWithNewLog$1.apply(MainLoop.scala:70)\r\n\tat sbt.MainLoop$$anonfun$runWithNewLog$1.apply(MainLoop.scala:65)\r\n\tat sbt.Using.apply(Using.scala:24)\r\n\tat sbt.MainLoop$.runWithNewLog(MainLoop.scala:65)\r\n\tat sbt.MainLoop$.runAndClearLast(MainLoop.scala:48)\r\n\tat sbt.MainLoop$.runLoggedLoop(MainLoop.scala:32)\r\n\tat sbt.MainLoop$.runLogged(MainLoop.scala:24)\r\n\tat sbt.StandardMain$.runManaged(Main.scala:53)\r\n\tat sbt.xMain.run(Main.scala:28)\r\n\tat xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:109)\r\n\tat xsbt.boot.Launch$.withContextLoader(Launch.scala:128)\r\n\tat xsbt.boot.Launch$.run(Launch.scala:109)\r\n\tat xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:35)\r\n\tat xsbt.boot.Launch$.launch(Launch.scala:117)\r\n\tat xsbt.boot.Launch$.apply(Launch.scala:18)\r\n\tat xsbt.boot.Boot$.runImpl(Boot.scala:41)\r\n\tat xsbt.boot.Boot$.main(Boot.scala:17)\r\n\tat xsbt.boot.Boot.main(Boot.scala)\r\n\r\n   Locked ownable synchronizers:\r\n\t- None\r\n\r\n\"VM Thread\" prio=10 tid=0x00007f090413b000 nid=0x5109 runnable \r\n\r\n\"GC task thread#0 (ParallelGC)\" prio=10 tid=0x00007f090401e000 nid=0x5105 runnable \r\n\r\n\"GC task thread#1 (ParallelGC)\" prio=10 tid=0x00007f0904020000 nid=0x5106 runnable \r\n\r\n\"GC task thread#2 (ParallelGC)\" prio=10 tid=0x00007f0904022000 nid=0x5107 runnable \r\n\r\n\"GC task thread#3 (ParallelGC)\" prio=10 tid=0x00007f0904023800 nid=0x5108 runnable \r\n\r\n\"VM Periodic Task Thread\" prio=10 tid=0x00007f090417e800 nid=0x5110 waiting on condition \r\n\r\nJNI global references: 448\r\n```\r\n\r\nAt one point, one of the threads is running at 100% CPU, while some others are on low CPU, busy wait, I guess. Strike that: now I have four sbt threads running at almost 100% (I have four cores).\r\n\r\nThis is reproducible, although it needs a few runs, i.e. add a space in the editor and save, add another space and save, etc. until at some point it will get stuck.\r\n\r\nLet me know if you need anything else."},"comment":{"url":"https://api.github.com/repos/sbt/sbt/issues/comments/91364414","html_url":"https://github.com/sbt/sbt/issues/1962#issuecomment-91364414","issue_url":"https://api.github.com/repos/sbt/sbt/issues/1962","id":91364414,"user":{"login":"eed3si9n","id":184683,"avatar_url":"https://avatars.githubusercontent.com/u/184683?v=3","gravatar_id":"","url":"https://api.github.com/users/eed3si9n","html_url":"https://github.com/eed3si9n","followers_url":"https://api.github.com/users/eed3si9n/followers","following_url":"https://api.github.com/users/eed3si9n/following{/other_user}","gists_url":"https://api.github.com/users/eed3si9n/gists{/gist_id}","starred_url":"https://api.github.com/users/eed3si9n/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eed3si9n/subscriptions","organizations_url":"https://api.github.com/users/eed3si9n/orgs","repos_url":"https://api.github.com/users/eed3si9n/repos","events_url":"https://api.github.com/users/eed3si9n/events{/privacy}","received_events_url":"https://api.github.com/users/eed3si9n/received_events","type":"User","site_admin":false},"created_at":"2015-04-09T21:44:15Z","updated_at":"2015-04-09T21:44:15Z","body":"The workaround probably is to not do `+` when you are doing continuous.\r\n"}}