Thread hangs when running under debugger

Hey guys:

I'm running into an issue where threads will stop responding to breakpoints and will eventually get stuck, making no further progress in "RUNNING" mode, when running under the Intellij debugger.

Memory (heap/permgen) look fine, CPU is fine.

Technologies involved are Windows XP, JDK 1.6/1.7, Intellij 11.1.2, Scala Plugin 0.5.808, Scala 2.9.1, Spring 3.0.7, Hibernate 3.6.5 (JPA/Entity Manager).

Another symptom is that another thread (that runs on a timer task) which runs fine will hang when a breakpoint is set on the code that it runs.   The thread dump then says "breakpoint" instead of running, but the debugger UI does not show the app stopped at a breakpoint.


It doesn't appear to be a deadlock (though I may be wrong).  The thread is not waiting on a monitor, etc.    It is in RUNNABLE (sorry, not running) mode.  JConsole reports "No deadlock detected".    

Here is the top of the stack dump for the stuck thread:

"main@1" prio=5 tid=0x1 nid=NA runnable

  java.lang.Thread.State: RUNNABLE

                  at java.lang.Class.getDeclaredConstructors0(

                  at java.lang.Class.privateGetDeclaredConstructors(

                  at java.lang.Class.getDeclaredConstructors(

                  at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.determineCandidateConstructors(


As you described it's Spring plugin issue. You can create it here:
You also can attach CPU snapshot, possibly we will see some infinite loop or something else on it (possibly even from Scala plugin).

Best regards,
Alexander Podkhalyuzin.


Another data point re: running the app - when I run the app from the command line (ie. not in Idea) it runs fine.  However if I attach the debugger to the app externally after it starts running it has the same problem.

Also, the place where the main thread gets stuck in "runnable" mode varies depending on when the debugger is attached and also how many breakpoints are set in the code.   For example, when the app is started from the command up line it can fully initialize (past the Spring initialization) and run in a steady state until the debugger is attached.

I will try it with the Spring plugin disabled.  And will provide CPU snapshot.  Thanks!


I tried with the Spring plugin disabled but the problem is still there.

I've attached the CPU snapshot.



Hi - did you find anything interesting in the CPU snaphot?


Hi, currently I'm on vacation for 2-3 weeks, I'll probably take a look to this snapshot this week, but I can't promise it.

Best regards,
Alexander Podkhalyuzin.


Last week I did a big refactoring and the problem went away :)


Please sign in to leave a comment.