jueves, 20 de abril de 2017

Oracle Blogs: Demangling Java symbols on Solaris 11.3

By Jeff Taylor-Oracle on Apr 20, 2017

I was investigating a Java application problem on a SPARC server running Oracle Solaris 11.3 SRU 18 and was having trouble understanding the Java stack traces.

The symbols in a Java stack trace are not necessarily human readable:

$ pstack 17510/3
17510:    /weblogic/jdk1.8.0_121/bin/java -server -d64 -Xms32m -Xmx200m -XX:MaxP
------------  lwp# 3 / thread# 3  ---------------
 ffffffff6d04e3c4 lwp_cond_wait (10026fa48, 10026fa30, 0, 0)
 ffffffff432846e8 __1cCosNPlatformEventEpark6M_v_ (10026fa00, 233d40, 233c00, 10026fa30, ffffffff437cd708, 10026fa20) + 100
 ffffffff432165ec __1cHMonitorFIWait6MpnGThread_l_i_ (100272670, 10026e800, 0, 8, 0, 0) + a4
 ffffffff432174e0 __1cHMonitorEwait6Mblb_b_ (100272670, 10026e800, 0, 0, 1, 5b659c) + 378
 ffffffff42d34080 __1cNGCTaskManagerIget_task6MI_pnGGCTask__ (1002725f0, 0, 100278328, ffffffff435de094, ffffffff437cd708, 100278240) + a8
 ffffffff42d3675c __1cMGCTaskThreadDrun6M_v_ (10026e800, 0, 10040a360, ffffffff436554a0, ffffffff438dd6cd, 3d8) + e4
 ffffffff43275f50 java_start (10026e800, 228000, 228344, 194800, ffffffff437cd708, ffffffff42be6558) + 388
 ffffffff6d04931c _lwp_start (0, 0, 0, 0, 0, 0)


It is expected that c++filt can demangle the Java symbols, but I found two versions and wasn't sure which to use.

# pkg search -l c++filt 
INDEX      ACTION VALUE                               PACKAGE
basename   file   opt/developerstudio12.5/bin/c++filt pkg:/developer/developerstudio-125/c++@12.5-1.0.0.0
basename   file   usr/gnu/bin/c++filt                 pkg:/developer/gnu-binutils@2.23.1-0.175.3.0.0.30.0


The version of c++filt that comes with pkg:/developer/gnu-binutils@2.23.1-0.175.3.0.0.30.0 did NOT help:

$ pstack 17510/3 | /usr/gnu/bin/c++filt
17510:    /weblogic/jdk1.8.0_121/bin/java -server -d64 -Xms32m -Xmx200m -XX:MaxP
------------  lwp# 3 / thread# 3  ---------------
 ffffffff6d04e3c4 lwp_cond_wait (10026fa48, 10026fa30, 0, 0)
 ffffffff432846e8 __1cCosNPlatformEventEpark6M_v_ (10026fa00, 233d40, 233c00, 10026fa30, ffffffff437cd708, 10026fa20) + 100
 ffffffff432165ec __1cHMonitorFIWait6MpnGThread_l_i_ (100272670, 10026e800, 0, 8, 0, 0) + a4
 ffffffff432174e0 __1cHMonitorEwait6Mblb_b_ (100272670, 10026e800, 0, 0, 1, 5b659c) + 378
 ffffffff42d34080 __1cNGCTaskManagerIget_task6MI_pnGGCTask__ (1002725f0, 0, 100278328, ffffffff435de094, ffffffff437cd708, 100278240) + a8
 ffffffff42d3675c __1cMGCTaskThreadDrun6M_v_ (10026e800, 0, 10040a360, ffffffff436554a0, ffffffff438dd6cd, 3d8) + e4
 ffffffff43275f50 java_start (10026e800, 228000, 228344, 194800, ffffffff437cd708, ffffffff42be6558) + 388
 ffffffff6d04931c _lwp_start (0, 0, 0, 0, 0, 0)

The version of c++filt that comes with Oracle Developer Studio successfully demangled the symbols:

$ pstack 17510/3 | /opt/developerstudio12.5/bin/c++filt
17510:    /weblogic/jdk1.8.0_121/bin/java -server -d64 -Xms32m -Xmx200m -XX:MaxP
------------  lwp# 3 / thread# 3  ---------------
 ffffffff6d04e3c4 lwp_cond_wait (10026fa48, 10026fa30, 0, 0)
 ffffffff432846e8 void os::PlatformEvent::park() (10026fa00, 233d40, 233c00, 10026fa30, ffffffff437cd708, 10026fa20) + 100
 ffffffff432165ec int Monitor::IWait(Thread*,long) (100272670, 10026e800, 0, 8, 0, 0) + a4
 ffffffff432174e0 bool Monitor::wait(bool,long,bool) (100272670, 10026e800, 0, 0, 1, 5b659c) + 378
 ffffffff42d34080 GCTask*GCTaskManager::get_task(unsigned) (1002725f0, 0, 100278328, ffffffff435de094, ffffffff437cd708, 100278240) + a8
 ffffffff42d3675c void GCTaskThread::run() (10026e800, 0, 10040a360, ffffffff436554a0, ffffffff438dd6cd, 3d8) + e4
 ffffffff43275f50 java_start (10026e800, 228000, 228344, 194800, ffffffff437cd708, ffffffff42be6558) + 388
 ffffffff6d04931c _lwp_start (0, 0, 0, 0, 0, 0)


Now, back to solving the actual problem that I was investigating...

No hay comentarios:

Publicar un comentario

Te agradezco tus comentarios. Te esperamos de vuelta.

Todos los Sábados a las 8:00PM

Optimismo para una vida Mejor

Optimismo para una vida Mejor
Noticias buenas que comentar