Java's JDB (and Eclipse) hang when connecting to remote JVMs with many threads (i.e. transmitting thread debug information via TCPIP) -
problem description
hi everyone,
i having problems remote debugging new server today , appeared if eclipse taking long time connect remote jvm. however, after investigation realized jdb having similar problem. digging turned this...
connecting remote jvm not problem. both debuggers establish socket connection within few seconds. jdb processes commands. however, after remote debugger has connected successfully, sun java 1.7.0_60-b19 jvm appears hanging (or transmitting extremely slowly) when sending thread debugging information (jvmti/jdwp) across network via tcpip.
listing remote jvm's threads appears problem. jdb's threads command either hangs or executes extremely slowly. load on remote jvm reasonable, , there aren't breakpoints set. there many threads executing on jvm concurrently (~2005 threads), , there may wan latency, there still needs way use remote debugger it!
observation. i'm guessing related inefficient transmission of thread information via tcpip jvm's java debug wire protocol (jdwp) implementation, machine is on other side of planet on wan. -- windows remote desktop connection same machine acceptably fast , performant. given that, seems having wait 45 minutes eclipse or jdb list thread information on jvm unacceptable , bug (or poorly implemented feature).
possibly related to?
- http://bugs.java.com/bugdatabase/view_bug.do?bug_id=6401245 - looks fixed , shouldn't issue anymore. plus jvm running on windows datacenter not linux.
- http://www.eclipsecon.org/2013/comment/reply/1153.html - possible solution requires sap jvm?
- https://github.com/vpotapev/jbreakpoint - open source jdb interface doesn't fix issue eclipse.
question. have ideas how make thread data transmission more efficient jvm can remote debugged effectively? bug in jvm's java debugging wire protocol (jdwp)?
problem details
java version:
c:\users\administrator>"c:\program files\java\jdk1.7.0_60\bin\java" -version java version "1.7.0_60" java(tm) se runtime environment (build 1.7.0_60-b19) java hotspot(tm) 64-bit server vm (build 24.60-b09, mixed mode) application server. happens weblogic 10g. happens ibm websphere 8.5
eclipse. eclipse remote debugging hangs indefinitely when trying populate debug view thread information.
jdb - remote. java's jdb remote debugger hangs upwards of 10 minutes when listing threads thread command. lists them (1 thread per second, take 33 minutes list them all).
"c:\program files\java\jdk1.7.0_60\bin\jdb.exe -connect com.sun.jdi.socketattach:hostname=xxx.yyy.com,port=7777 set uncaught java.lang.throwable set deferred uncaught java.lang.throwable initializing jdb ... > threads group system: <<jdb hangs here trying thread information>> jdb - local. java's jdb remote debugger executes threads command in 3 seconds when run on jvm's local machine.
"c:\program files\java\jdk1.7.0_60\bin\jdb.exe -connect com.sun.jdi.socketattach:hostname=xxx.yyy.com,port=7777 set uncaught java.lang.throwable set deferred uncaught java.lang.throwable initializing jdb ... > threads group system: > threads group system: (java.lang.ref.reference$referencehandler)0x7484 reference handler (java.lang.ref.finalizer$finalizerthread)0x7485 finalizer (java.lang.thread)0x7486 ... gc daemon (java.lang.thread)0x748b rmi renewclean- ... >
Comments
Post a Comment