-
Bug
-
Resolution: Fixed
-
P3
-
5.0
-
b46
-
generic
-
generic
-
Verified
Name: ipR10196 Date: 03/04/2004
-----------------------------------------------------
Test : nsk/sajdi/ThreadReference/frames/frames002
VM : ClientVM, ServerVM
Mode : all
Platform : generic
OS : generic
JDK : 1.5.0-beta2-b40 and earlier
------------------------------------------------------
With legacy JDI connectors this test passes.
With SA-JDI connectors ThreadReference.frames() invoked for
threads running in a loop (THREAD_STATUS_RUNNING) either
throws RuntimeException:
thread #0
thread name: threadRunning
isSuspended: true
java.lang.RuntimeException: Couldn't deduce type of CodeBlob @0xf8892448 for PC=0xf8892480
at sun.jvm.hotspot.code.CodeCache.findBlobUnsafe(CodeCache.java:94)
at sun.jvm.hotspot.code.CodeCache.findBlob(CodeCache.java:60)
at sun.jvm.hotspot.runtime.Frame.isGlueFrame(Frame.java:137)
at sun.jvm.hotspot.runtime.Frame.realSender(Frame.java:190)
at sun.jvm.hotspot.runtime.VFrame.sender(VFrame.java:102)
at sun.jvm.hotspot.runtime.VFrame.javaSender(VFrame.java:129)
at sun.jvm.hotspot.jdi.ThreadReferenceImpl.privateFrames(ThreadReferenceImpl.java:188)
at sun.jvm.hotspot.jdi.ThreadReferenceImpl.frames(ThreadReferenceImpl.java:157)
at nsk.sajdi.ThreadReference.frames.frames002.checkThread(frames002.java:222)
at nsk.sajdi.ThreadReference.frames.frames002.runIt(frames002.java:182)
at nsk.sajdi.ThreadReference.frames.frames002.run(frames002.java:26)
at nsk.sajdi.ThreadReference.frames.frames002.main(frames002.java:21)
# ERROR: ThreadReference.frames() throws unexpected exception:
# ERROR: thread nom: 0
# ERROR: thread name: threadRunning
# ERROR: exception: java.lang.RuntimeException:
Couldn't deduce type of CodeBlob @0xf8892448 for PC=0xf8892480
or returns no stack frames:
thread #0
thread name: threadRunning
isSuspended: true
frames count: 0
# ERROR: ThreadReference.frames() returned too few frames for running threads:
# ERROR: thread nom: 0
# ERROR: thread name: threadRunning
# ERROR: frames count: 0
# ERROR: expected: 2
# ERROR: ThreadReference.frames() returned not all expected frames:
# ERROR: thread nom: 0
# ERROR: thread name: threadRunning
# ERROR: frames count: 0
# ERROR: found frames: 0
# ERROR: expected: 2
or returns wrong number of stack frames:
thread #0
thread name: threadRunning
isSuspended: true
Correcting for invalid interpreter frame
frames count: 1
# ERROR: ThreadReference.frames() returned too few frames for running threads:
# ERROR: thread nom: 0
# ERROR: thread name: threadRunning
# ERROR: frames count: 1
# ERROR: expected: 2
frame #0
method: run
signature: ()V
... found expected frame #0
# ERROR: ThreadReference.frames() returned not all expected frames:
# ERROR: thread nom: 0
# ERROR: thread name: threadRunning
# ERROR: frames count: 1
# ERROR: found frames: 1
# ERROR: expected: 2
Particular error depends of which VM (client or server) and
which mode (-Xint, -Xmixed, -Xcomp) are used.
For threads is other states frames() successfully returns list
of stack frames, though on Solaris/sparc for thread in state
THREAD_STATUS_WAITING invocation of frames() prints warning message:
thread #2
thread name: threadWaiting
isSuspended: true
WARNING: IsavedSP was null for frame sp: 0xf8681450, younger_sp: 0xf86813d0, fp: 0xf86814d0, pc: 0xf880bacc
frames count: 5
frame #0
method: wait
signature: (J)V
frame #1
method: wait
signature: (J)V
frame #2
method: wait
signature: ()V
frame #3
method: run2
signature: (CLjava/lang/String;)V
... found expected frame #1
frame #4
method: run
signature: ()V
... found expected frame #0
Steps to reproduce:
cd /net/jano.sfbay/export/disk20/GammaBase/Bugs/<this bug number>
sh build.sh $JAVA_HOME
sh run.sh [-pid | -core | -socket] [-g] [-v] $JAVA_HOME [JAVA_OPTS]
where:
-pid - run test with SA-JDI pid attaching connector (default)
-core - run test with SA-JDI core attaching connector
-socket - run test with JDI socket attaching connector
-g - run test with java_g binaries
-v - run test in verbose mode
This test will appear in the next r27 testbase release.
Running on Linux this test may fail due to known bug:
4996081 SA-JDI: SAPIDAttachingConnector.attach() throws IOEception on RH AS2.1
======================================================================
Name: ipR10196 Date: 03/05/2004
ThreadReference.farmeCount() similarly throws RuntimeException for
running threads, prints warning message for waiting thread, or
just returns wrong number of stack frames.
Here is example of throwing RuntimeException:
thread #0
thread name: threadRunning
isSuspended: true
java.lang.RuntimeException: Couldn't deduce type of CodeBlob @0xf8892288 for PC=0xf88922c0
at sun.jvm.hotspot.code.CodeCache.findBlobUnsafe(CodeCache.java:94)
at sun.jvm.hotspot.code.CodeCache.findBlob(CodeCache.java:60)
at sun.jvm.hotspot.runtime.Frame.isGlueFrame(Frame.java:137)
at sun.jvm.hotspot.runtime.Frame.realSender(Frame.java:190)
at sun.jvm.hotspot.runtime.VFrame.sender(VFrame.java:102)
at sun.jvm.hotspot.runtime.VFrame.javaSender(VFrame.java:129)
at sun.jvm.hotspot.jdi.ThreadReferenceImpl.privateFrames(ThreadReferenceImpl.java:188)
at sun.jvm.hotspot.jdi.ThreadReferenceImpl.frameCount(ThreadReferenceImpl.java:152)
at nsk.sajdi.ThreadReference.frames_ii.frames_ii002.checkThread(frames_ii002.java:201)
at nsk.sajdi.ThreadReference.frames_ii.frames_ii002.runIt(frames_ii002.java:147)
at nsk.sajdi.ThreadReference.frames_ii.frames_ii002.run(frames_ii002.java:26)
at nsk.sajdi.ThreadReference.frames_ii.frames_ii002.main(frames_ii002.java:21)
# ERROR: ThreadReference.frameCount() throws unexpected exception:
# ERROR: thread nom: 0
# ERROR: thread name: threadRunning
# ERROR: exception: java.lang.RuntimeException:
Couldn't deduce type of CodeBlob @0xf8892288 for PC=0xf88922c0
This affects the following SA-JDI tests:
nsk/sajdi/ThreadReference/frames/frames002
nsk/sajdi/ThreadReference/frames_ii/frames_ii002
======================================================================
Name: ipR10196 Date: 03/09/2004
This affects also the following SA-JDI test:
nsk/sajdi/ThreadReference/frame/frame002
======================================================================
- relates to
-
JDK-5030121 SA-JDI: Method.frameCount(), .frames(), .frames(int,int) return wrong frames num
- Resolved
-
JDK-5030139 SA-JDI: frames methods throw AssertionFailure on 64-bit ServerVM
- Closed