jmap -heap not working after jvm upgrade

Hello,

Our production linux server was running jdk1.5.0_06 for several months (tomcat 55 servlet applications). We run jmap -heap on each jvm from a cron job throught the day to capture statistics.

Last night we upgraded to jdk1.5.0_11 and everything works fine except jmap. It sometimes attaches to the jvms, but about 80% of the time it just sits there after givin the "Attaching to process ID xxx, please wait..." message. It is using no CPU and just seems to sit there forever. Control-C will not stop it -- in fact, I have to do a kill -9 on the process.

I still have jdk1.5.0_06 on the box -- so I tried running the jmap exe from that version against my jvms that are running with 1.5.0_11 -- and it works every time.

Is anyone else having this kind of issue or know what could be causing it? Is there any kind of logging I can turn up or debugging that can be done on jmap itself? I went through the release notes for the versions between 06 and 11 -- and while the 10 build did do some things with jmap, it didn't seem relevant.

Thanks in advance,

Steve

[1107 byte] By [ssyretta] at [2007-11-26 21:04:14]
# 1
jmap uses ptraces to attach to process and waits for the process to stop. If the process does not stop it waits there. I think that is whatyou are seeing here.Can you attach gdb to running jmap and get the stack trace of all threads and post it here.
swamyva at 2007-7-10 2:37:13 > top of Java-index,Core,Monitoring & Management...
# 2

Hey -- thanks for the reply. I've never used gdb before, but I gave it a shot. I started gdb used bt and got:

Attaching to program: /usr/java/jdk1.5.0_11/bin/jmap, process 20652

Reading symbols from /lib/libcwait.so...(no debugging symbols found)...done.

Loaded symbols for /lib/libcwait.so

Reading symbols from /lib/tls/libpthread.so.0...(no debugging symbols found)...done.

[Thread debugging using libthread_db enabled]

[New Thread -1208031552 (LWP 20652)]

[New Thread -1316586576 (LWP 20660)]

[New Thread -1306219600 (LWP 20659)]

[New Thread -1305691216 (LWP 20658)]

[New Thread -1305162832 (LWP 20657)]

[New Thread -1304634448 (LWP 20656)]

[New Thread -1302008912 (LWP 20655)]

[New Thread -1301480528 (LWP 20654)]

[New Thread -1300952144 (LWP 20653)]

Loaded symbols for /lib/tls/libpthread.so.0

Reading symbols from /lib/libdl.so.2...(no debugging symbols found)...done.

Loaded symbols for /lib/libdl.so.2

Reading symbols from /lib/tls/libc.so.6...

(no debugging symbols found)...done.

Loaded symbols for /lib/tls/libc.so.6

Reading symbols from /lib/ld-linux.so.2...(no debugging symbols found)...done.

Loaded symbols for /lib/ld-linux.so.2

Reading symbols from /usr/java/jdk1.5.0_11/jre/lib/i386/client/libjvm.so...(no debugging symbols found)...done.

Loaded symbols for /usr/java/jdk1.5.0_11/jre/lib/i386/client/libjvm.so

Reading symbols from /lib/tls/libm.so.6...

(no debugging symbols found)...done.

Loaded symbols for /lib/tls/libm.so.6

Reading symbols from /usr/java/jdk1.5.0_11/jre/lib/i386/native_threads/libhpi.so...(no debugging symbols found)...done.

Loaded symbols for /usr/java/jdk1.5.0_11/jre/lib/i386/native_threads/libhpi.so

Reading symbols from /lib/libnsl.so.1...(no debugging symbols found)...done.

Loaded symbols for /lib/libnsl.so.1

Reading symbols from /lib/libnss_files.so.2...

(no debugging symbols found)...done.

Loaded symbols for /lib/libnss_files.so.2

Reading symbols from /usr/java/jdk1.5.0_11/jre/lib/i386/libverify.so...(no debugging symbols found)...done.

Loaded symbols for /usr/java/jdk1.5.0_11/jre/lib/i386/libverify.so

Reading symbols from /usr/java/jdk1.5.0_11/jre/lib/i386/libjava.so...(no debugging symbols found)...done.

Loaded symbols for /usr/java/jdk1.5.0_11/jre/lib/i386/libjava.so

Reading symbols from /usr/java/jdk1.5.0_11/jre/lib/i386/libzip.so...

(no debugging symbols found)...done.

Loaded symbols for /usr/java/jdk1.5.0_11/jre/lib/i386/libzip.so

Reading symbols from /usr/java/jdk1.5.0_11/jre/lib/i386/libsaproc.so...(no debugging symbols found)...done.

Loaded symbols for /usr/java/jdk1.5.0_11/jre/lib/i386/libsaproc.so

Reading symbols from /lib/tls/libthread_db.so.1...(no debugging symbols found)...done.

Loaded symbols for /lib/tls/libthread_db.so.1

0x006637a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2

(gdb) bt

#0 0x006637a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2

#1 0x007edb26 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/tls/libpthread.so.0

#2 0x007ee16e in pthread_cond_wait@GLIBC_2.0 () from /lib/tls/libpthread.so.0

#3 0xb7ad7cee in os::Linux::safe_cond_wait () from /usr/java/jdk1.5.0_11/jre/lib/i386/client/libjvm.so

#4 0xb7acdbbf in ObjectMonitor::wait () from /usr/java/jdk1.5.0_11/jre/lib/i386/client/libjvm.so

#5 0xb7b243b6 in ObjectSynchronizer::wait () from /usr/java/jdk1.5.0_11/jre/lib/i386/client/libjvm.so

#6 0xb7a1d143 in JVM_MonitorWait () from /usr/java/jdk1.5.0_11/jre/lib/i386/client/libjvm.so

#7 0xb286f4db in ? ()

#8 0x0805bb68 in ? ()

#9 0xbfffd220 in ? ()

#10 0x00000000 in ? ()

ssyretta at 2007-7-10 2:37:13 > top of Java-index,Core,Monitoring & Management...