[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-serviceability-dev
Subject:    Re: "8046282: SA update" seems to break the SA/jstack in OpenJDK
From:       Poonam Bajaj <poonam.bajaj () oracle ! com>
Date:       2014-07-12 1:35:25
Message-ID: 53C08E0D.9050606 () oracle ! com
[Download RAW message or body]

Hi Volker,

Thanks. There is a bug filed for this issue: 
https://bugs.openjdk.java.net/browse/JDK-8049881

I am working on this bug.

Thanks,
Poonam

On 7/10/2014 4:00 PM, Volker Simonis wrote:
> Hi,
>
> the change "8046282: SA update" introduced the following new code in
> agent/src/share/classes/sun/jvm/hotspot/oops/Klass.java
>
> +    traceIDField  = type.getField("_trace_id");
>
> But I can not find the corresponding field in
> src/share/vm/oops/klass.hpp. The Klass class only contains the macro
> TRACE_DEFINE_KLASS_TRACE_ID which is defined to "typedef int
> ___IGNORED_hs_trace_type2" in traceMacros.hpp.
>
> This leads to an error when calling for example jstack on a core file:
>
> $ images/j2sdk-image/bin/jstack ./images/j2sdk-image/bin/java core
> Attaching to core core from executable ./images/j2sdk-image/bin/java,
> please wait...
> Debugger attached successfully.
> Server compiler detected.
> JVM version is 1.9.0-internal-d046063_2014_07_10_11_16-b00
> Deadlock Detection:
>
> Exception in thread "main" java.lang.reflect.InvocationTargetException
>      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>      at java.lang.reflect.Method.invoke(Method.java:484)
>      at sun.tools.jstack.JStack.runJStackTool(JStack.java:140)
>      at sun.tools.jstack.JStack.main(JStack.java:106)
> Caused by: java.lang.ExceptionInInitializerError
>      at sun.jvm.hotspot.oops.ObjectHeap.initialize(ObjectHeap.java:74)
>      at sun.jvm.hotspot.oops.ObjectHeap.<init>(ObjectHeap.java:110)
>      at sun.jvm.hotspot.runtime.VM.getObjectHeap(VM.java:582)
>      at sun.jvm.hotspot.runtime.DeadlockDetector.print(DeadlockDetector.java:55)
>      at sun.jvm.hotspot.runtime.DeadlockDetector.print(DeadlockDetector.java:39)
>      at sun.jvm.hotspot.tools.StackTrace.run(StackTrace.java:62)
>      at sun.jvm.hotspot.tools.StackTrace.run(StackTrace.java:45)
>      at sun.jvm.hotspot.tools.JStack.run(JStack.java:66)
>      at sun.jvm.hotspot.tools.Tool.startInternal(Tool.java:260)
>      at sun.jvm.hotspot.tools.Tool.start(Tool.java:223)
>      at sun.jvm.hotspot.tools.Tool.execute(Tool.java:118)
>      at sun.jvm.hotspot.tools.JStack.main(JStack.java:92)
>      ... 6 more
> Caused by: java.lang.RuntimeException: field "_trace_id" not found in type Klass
>      at sun.jvm.hotspot.types.basic.BasicType.getField(BasicType.java:183)
>      at sun.jvm.hotspot.types.basic.BasicType.getField(BasicType.java:190)
>      at sun.jvm.hotspot.types.basic.BasicType.getField(BasicType.java:194)
>      at sun.jvm.hotspot.oops.Klass.initialize(Klass.java:58)
>      at sun.jvm.hotspot.oops.Klass.access$000(Klass.java:33)
>      at sun.jvm.hotspot.oops.Klass$1.update(Klass.java:37)
>      at sun.jvm.hotspot.runtime.VM.registerVMInitializedObserver(VM.java:394)
>      at sun.jvm.hotspot.oops.Klass.<clinit>(Klass.java:35)
>      ... 18 more
>
> Is this a problem with OpenJDK only (i.e. is '_trace_id' defined in
> Oracle proprietary builds) ?. Or is this another problem?
>
> Thank you and best regards,
> Volker
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic