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.

Thanks,
0
8 comments
Avatar
Permanently deleted user

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(Class.java:-1)

                  at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)

                  at java.lang.Class.getDeclaredConstructors(Class.java:1836)

                  at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.determineCandidateConstructors(AutowiredAnnotationBeanPostProcessor.java:229)

0

As you described it's Spring plugin issue. You can create it here: http://youtrack.jetbrains.com/issues/IDEA
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.

0
Avatar
Permanently deleted user

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!

0
Avatar
Permanently deleted user

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

I've attached the CPU snapshot.

Thanks!



Attachment(s):
IU-117.418_epederso_06.07.2012_19.36.37.zip
0
Avatar
Permanently deleted user

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

0

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.

0
Avatar
Permanently deleted user

Ok - thanks!

0
Avatar
Permanently deleted user

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

0

Please sign in to leave a comment.