-
Bug
-
Resolution: Fixed
-
P4
-
5.0
-
b42
-
generic
-
generic
-
Verified
Summary:
The JVMTI specs says that any needed capabilities must be possessed in order to get events, but does not indicate the error code returned in this case.
See Suggested Fix.
###@###.### 2004-02-27
---------------------------------
Name: vpR10197 Date: 02/05/2004
--------------------------------------
Test : nsk/jvmti/scenarios/events/EM07/em07t001
VM : ClientVM, ServerVM
Mode : all
Platform : all
OS : all
JDK : 1.5.0-b36 and earlier
----------------------------------------
The test doesn't set any capabilities and checks that no events of optional
functionality will be sent.
The test reveals that current implementation of JVMTI generates events even
if corresponded capability is not added. It conflicts with Events/HandlingEvents
section of JVMTI specification which says "...to receive any event the following
three steps must be done:
- if the event requires a capability, that capability must be added.
- callback for the event must be set.
- event must be enabled."
Please note that at the same time such behaviour could be interpreted as legal
according to EventManagement/SetEventCallbacks section which says:
"...An event must be enabled and have a callback in order to be sent..."
To reproduce the failure:
cd /net/jano.sfbay/export/disk20/GammaBase/Bugs/<this bug number>
sh build.sh $JAVA_HOME [-g]
sh run.sh $JAVA_HOME [-g] [-v] [JAVA_OPTS]
where
-g - run test with java_g binaries
-v - run test in verbose mode
Here is test output:
- jvmti_events.c, 122:
- jvmti_events.c, 123: Possessed capabilities:
- jvmti_events.c, 124: -----------------------
- jvmti_events.c, 190:
- em07t001.c, 219: Enable events
debuggee> Timeout = 120000 msc.
- em07t001.c, 322: Wait for debuggee to become ready
# ERROR: em07t001.c, 258: Unexpected amount of events 366804 for
JVMTI_EVENT_SINGLE_STEP
expected value is 0
# ERROR: em07t001.c, 258: Unexpected amount of events 201 for
JVMTI_EVENT_NATIVE_METHOD_BIND
expected value is 0
# ERROR: em07t001.c, 258: Unexpected amount of events 13 for
JVMTI_EVENT_COMPILED_METHOD_LOAD
expected value is 0
# ERROR: em07t001.c, 258: Unexpected amount of events 47 for
JVMTI_EVENT_VM_OBJECT_ALLOC
expected value is 0
- em07t001.c, 33:
- em07t001.c, 34: Event statistics
- em07t001.c, 35: ----------------
- em07t001.c, 40: JVMTI_EVENT_SINGLE_STEP 366804
- em07t001.c, 40: JVMTI_EVENT_NATIVE_METHOD_BIND 201
- em07t001.c, 40: JVMTI_EVENT_COMPILED_METHOD_LOAD 13
- em07t001.c, 40: JVMTI_EVENT_VM_OBJECT_ALLOC 47
- em07t001.c, 329: Let debuggee to finish
# ERROR: debuggee> Test FAILED
======================================================================
Name: vpR10197 Date: 02/29/2004
The bug also affects the following tests:
nsk/jvmti/scenarios/events/EM02/em02t001
nsk/jvmti/scenarios/events/EM02/em02t002
nsk/jvmti/scenarios/events/EM02/em02t003
nsk/jvmti/scenarios/events/EM02/em02t004
These tests will appear in the next r27 testbase release.
======================================================================
Name: vpR10197 Date: 03/09/2004
The bug also affects the following tests:
nsk/jvmti/scenarios/events/EM02/em02t005
nsk/jvmti/scenarios/events/EM02/em02t006
nsk/jvmti/scenarios/events/EM02/em02t007
nsk/jvmti/scenarios/events/EM02/em02t008
nsk/jvmti/scenarios/events/EM02/em02t009
nsk/jvmti/scenarios/events/EM02/em02t010
nsk/jvmti/scenarios/events/EM02/em02t011
nsk/jvmti/scenarios/events/EM02/em02t012
These tests will appear in the next r27 testbase release.
======================================================================
The JVMTI specs says that any needed capabilities must be possessed in order to get events, but does not indicate the error code returned in this case.
See Suggested Fix.
###@###.### 2004-02-27
---------------------------------
Name: vpR10197 Date: 02/05/2004
--------------------------------------
Test : nsk/jvmti/scenarios/events/EM07/em07t001
VM : ClientVM, ServerVM
Mode : all
Platform : all
OS : all
JDK : 1.5.0-b36 and earlier
----------------------------------------
The test doesn't set any capabilities and checks that no events of optional
functionality will be sent.
The test reveals that current implementation of JVMTI generates events even
if corresponded capability is not added. It conflicts with Events/HandlingEvents
section of JVMTI specification which says "...to receive any event the following
three steps must be done:
- if the event requires a capability, that capability must be added.
- callback for the event must be set.
- event must be enabled."
Please note that at the same time such behaviour could be interpreted as legal
according to EventManagement/SetEventCallbacks section which says:
"...An event must be enabled and have a callback in order to be sent..."
To reproduce the failure:
cd /net/jano.sfbay/export/disk20/GammaBase/Bugs/<this bug number>
sh build.sh $JAVA_HOME [-g]
sh run.sh $JAVA_HOME [-g] [-v] [JAVA_OPTS]
where
-g - run test with java_g binaries
-v - run test in verbose mode
Here is test output:
- jvmti_events.c, 122:
- jvmti_events.c, 123: Possessed capabilities:
- jvmti_events.c, 124: -----------------------
- jvmti_events.c, 190:
- em07t001.c, 219: Enable events
debuggee> Timeout = 120000 msc.
- em07t001.c, 322: Wait for debuggee to become ready
# ERROR: em07t001.c, 258: Unexpected amount of events 366804 for
JVMTI_EVENT_SINGLE_STEP
expected value is 0
# ERROR: em07t001.c, 258: Unexpected amount of events 201 for
JVMTI_EVENT_NATIVE_METHOD_BIND
expected value is 0
# ERROR: em07t001.c, 258: Unexpected amount of events 13 for
JVMTI_EVENT_COMPILED_METHOD_LOAD
expected value is 0
# ERROR: em07t001.c, 258: Unexpected amount of events 47 for
JVMTI_EVENT_VM_OBJECT_ALLOC
expected value is 0
- em07t001.c, 33:
- em07t001.c, 34: Event statistics
- em07t001.c, 35: ----------------
- em07t001.c, 40: JVMTI_EVENT_SINGLE_STEP 366804
- em07t001.c, 40: JVMTI_EVENT_NATIVE_METHOD_BIND 201
- em07t001.c, 40: JVMTI_EVENT_COMPILED_METHOD_LOAD 13
- em07t001.c, 40: JVMTI_EVENT_VM_OBJECT_ALLOC 47
- em07t001.c, 329: Let debuggee to finish
# ERROR: debuggee> Test FAILED
======================================================================
Name: vpR10197 Date: 02/29/2004
The bug also affects the following tests:
nsk/jvmti/scenarios/events/EM02/em02t001
nsk/jvmti/scenarios/events/EM02/em02t002
nsk/jvmti/scenarios/events/EM02/em02t003
nsk/jvmti/scenarios/events/EM02/em02t004
These tests will appear in the next r27 testbase release.
======================================================================
Name: vpR10197 Date: 03/09/2004
The bug also affects the following tests:
nsk/jvmti/scenarios/events/EM02/em02t005
nsk/jvmti/scenarios/events/EM02/em02t006
nsk/jvmti/scenarios/events/EM02/em02t007
nsk/jvmti/scenarios/events/EM02/em02t008
nsk/jvmti/scenarios/events/EM02/em02t009
nsk/jvmti/scenarios/events/EM02/em02t010
nsk/jvmti/scenarios/events/EM02/em02t011
nsk/jvmti/scenarios/events/EM02/em02t012
These tests will appear in the next r27 testbase release.
======================================================================
- relates to
-
JDK-5005202 NEWHPROF: must set can_generate_exception_events if doing CPU timing
-
- Resolved
-
-
JDK-5005207 Remove work-around to hprof bug: can_generate_exception_events not checked
-
- Resolved
-