Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 438120 - dev-java/icedtea-7.2.3.2: jstack does not work
Summary: dev-java/icedtea-7.2.3.2: jstack does not work
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-12 14:20 UTC by Miroslav Šulc
Modified: 2012-12-06 13:22 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Miroslav Šulc gentoo-dev 2012-10-12 14:20:46 UTC
when trying to use jstack, it fails:

# jstack -l -F -m 13492
Attaching to process ID 13492, please wait...
sun.jvm.hotspot.debugger.NoSuchSymbolException: Could not find symbol "gHotSpotVMTypes" in any of the known library names (libjvm.so, libjvm_g.so, gamma_g)
        at sun.jvm.hotspot.HotSpotTypeDataBase.lookupInProcess(HotSpotTypeDataBase.java:585)
        at sun.jvm.hotspot.HotSpotTypeDataBase.readVMTypes(HotSpotTypeDataBase.java:150)
        at sun.jvm.hotspot.HotSpotTypeDataBase.<init>(HotSpotTypeDataBase.java:85)
        at sun.jvm.hotspot.bugspot.BugSpotAgent.setupVM(BugSpotAgent.java:569)
        at sun.jvm.hotspot.bugspot.BugSpotAgent.go(BugSpotAgent.java:493)
        at sun.jvm.hotspot.bugspot.BugSpotAgent.attach(BugSpotAgent.java:331)
        at sun.jvm.hotspot.tools.Tool.start(Tool.java:163)
        at sun.jvm.hotspot.tools.JStack.main(JStack.java:86)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at sun.tools.jstack.JStack.runJStackTool(JStack.java:136)
        at sun.tools.jstack.JStack.main(JStack.java:102)
Debugger attached successfully.
jstack requires a java VM process/core!


# java -version
java version "1.7.0_07"
OpenJDK Runtime Environment (IcedTea7 2.3.2) (Gentoo build 1.7.0_07-b30)
OpenJDK 64-Bit Server VM (build 23.2-b09, mixed mode)
Comment 1 Miroslav Šulc gentoo-dev 2012-10-13 08:25:47 UTC
today i got different error (i did not try on the same application yesterday):

$ ps ax | grep java
20867 ?        Sl     0:36 /usr/lib/jvm/icedtea-7/bin/java -classpath /usr/share/josm/lib/josm.jar -Djava.library.path=/lib:/usr/lib -jar /usr/share/josm/lib/josm.jar

$ jstack -l -F -m 20867
Attaching to process ID 20867, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 23.2-b09
Exception in thread "main" java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at sun.tools.jstack.JStack.runJStackTool(JStack.java:136)
        at sun.tools.jstack.JStack.main(JStack.java:102)
Caused by: java.lang.RuntimeException: Unable to deduce type of thread from address 0x00007f69580ca800 (expected type JavaThread, CompilerThread, ServiceThread, JvmtiAgentThread, or SurrogateLockerThread)
        at sun.jvm.hotspot.runtime.Threads.createJavaThreadWrapper(Threads.java:152)
        at sun.jvm.hotspot.runtime.Threads.first(Threads.java:140)
        at sun.jvm.hotspot.tools.PStack.initJFrameCache(PStack.java:205)
        at sun.jvm.hotspot.tools.PStack.run(PStack.java:66)
        at sun.jvm.hotspot.tools.PStack.run(PStack.java:53)
        at sun.jvm.hotspot.tools.PStack.run(PStack.java:48)
        at sun.jvm.hotspot.tools.JStack.run(JStack.java:60)
        at sun.jvm.hotspot.tools.Tool.start(Tool.java:221)
        at sun.jvm.hotspot.tools.JStack.main(JStack.java:86)
        ... 6 more
Caused by: sun.jvm.hotspot.types.WrongTypeException: No suitable match for type of address 0x00007f69580ca800
        at sun.jvm.hotspot.runtime.InstanceConstructor.newWrongTypeException(InstanceConstructor.java:62)
        at sun.jvm.hotspot.runtime.VirtualConstructor.instantiateWrapperFor(VirtualConstructor.java:80)
        at sun.jvm.hotspot.runtime.Threads.createJavaThreadWrapper(Threads.java:148)
        ... 14 more

jstack from oracle-jdk-bin works fine.
Comment 2 Miroslav Šulc gentoo-dev 2012-10-13 19:14:21 UTC
i just found out that the original report is invalid. i used wrong process id. anyway, the report in comment #1 is still valid.
Comment 3 Ralph Sennhauser (RETIRED) gentoo-dev 2012-10-14 13:57:42 UTC
Even if you get the pid wrong the output is not what one would expect. I can't reproduce the issue though. May I ask you to add your emerge --info for icedtea in the hope it helps someone to track the issue down?
Comment 4 Miroslav Šulc gentoo-dev 2012-12-06 13:22:39 UTC
just checked again today and works fine so i was probably doing something wrong before