-
Bug
-
Resolution: Fixed
-
P3
-
hs24, hs25, 7u60
-
b30
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8013679 | 8 | Serguei Spitsyn | P3 | Resolved | Fixed | b88 |
JDK-8034014 | 7u80 | Serguei Spitsyn | P3 | Resolved | Fixed | b01 |
JDK-8060833 | 7u79 | Serguei Spitsyn | P3 | Resolved | Fixed | b01 |
JDK-8057267 | 7u76 | Serguei Spitsyn | P3 | Resolved | Fixed | b01 |
JDK-8035848 | 7u65 | Serguei Spitsyn | P3 | Resolved | Fixed | b01 |
JDK-8035454 | 7u60 | Serguei Spitsyn | P3 | Closed | Fixed | b08 |
vm/mlvm/indy/func/jvmti/redefineClassInBootstrap
vm/mlvm/indy/func/jvmti/redefineClassInTarget
with the following exception:
[2013-02-20T02:10:50.16] Original bootstrap(): Lookup vm.mlvm.indy.func.jvmti.redefineClassInBootstrap.INDIFY_Dummy0; method name = greet; method type = (Object,String,int)Boolean
[2013-02-20T02:10:50.16] Original bootstrap(): Lookup vm.mlvm.indy.func.jvmti.redefineClassInBootstrap.INDIFY_Dummy0; method name = greet; method type = (Object,String,int)Boolean
[2013-02-20T02:10:50.16] # ERROR: Test caught an exception:
[2013-02-20T02:10:50.16] # ERROR: java.lang.reflect.InvocationTargetException
[2013-02-20T02:10:50.16] # ERROR: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[2013-02-20T02:10:50.16] # ERROR: at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[2013-02-20T02:10:50.17] # ERROR: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[2013-02-20T02:10:50.17] # ERROR: at java.lang.reflect.Method.invoke(Method.java:487)
[2013-02-20T02:10:50.17] # ERROR: at vm.mlvm.indy.func.jvmti.share.IndyRedefineTest.run(IndyRedefineTest.java:30)
[2013-02-20T02:10:50.17] # ERROR: at vm.mlvm.share.MlvmTest.runMlvmTest(MlvmTest.java:195)
[2013-02-20T02:10:50.17] # ERROR: at vm.mlvm.share.MlvmTest.launch(MlvmTest.java:133)
[2013-02-20T02:10:50.17] # ERROR: at vm.mlvm.share.MlvmTest.launch(MlvmTest.java:107)
[2013-02-20T02:10:50.17] # ERROR: at vm.mlvm.indy.func.jvmti.share.IndyRedefineTest.main(IndyRedefineTest.java:44)
[2013-02-20T02:10:50.17] # ERROR: Caused by: java.lang.BootstrapMethodError: call site initialization exception
[2013-02-20T02:10:50.17] # ERROR: at java.lang.invoke.CallSite.makeSite(CallSite.java:298)
[2013-02-20T02:10:50.17] # ERROR: at java.lang.invoke.MethodHandleNatives.linkCallSite(MethodHandleNatives.java:294)
[2013-02-20T02:10:50.17] # ERROR: at vm.mlvm.indy.func.jvmti.redefineClassInBootstrap.INDIFY_Dummy0.bootstrap(Unknown Source)
[2013-02-20T02:10:50.17] # ERROR: ... 9 more
[2013-02-20T02:10:50.17] # ERROR: Caused by: java.lang.RuntimeException: Bootstrap method has not been redefined. Test failed.
[2013-02-20T02:10:50.19] # ERROR: at vm.mlvm.indy.func.jvmti.redefineClassInBootstrap.INDIFY_Dummy0.bootstrap(Unknown Source)
[2013-02-20T02:10:50.19] # ERROR: at java.lang.invoke.CallSite.makeSite(CallSite.java:270)
[2013-02-20T02:10:50.19] # ERROR: ... 11 more
[2013-02-20T02:10:50.19] ### TRACE 1: TEST FAILED
The problem is that the old version of the bootstrap method is re-invoked after a popframe from
the bootstrap method execution.
It is because the MemberName keeps a stale reference to the old method version.
This is the last issue which prevents the tests above to pass.
In fact, they pass with my prototype of the fix.
This is a log when the test test is passed with a temporary fix:
cat /net/sc11152596/export/home/sspitsyn/tst/nskx/.February19,.sparc/sspitsyn.SunOS.sparc/redefineClassInBootstrap/redefineClassInBootstrap.log
#
[2013-02-20T02:08:20.96] export TESTED_JAVA_HOME
[2013-02-20T02:08:20.96] export SYSTEMROOT
[2013-02-20T02:08:20.96] export HOME
[2013-02-20T02:08:20.96] export TEMP
[2013-02-20T02:08:20.96] export RAS_OPTIONS
[2013-02-20T02:08:20.96] export BASH_ENV
[2013-02-20T02:08:20.96] export SHELL
[2013-02-20T02:08:20.96] export TEST_CLEANUP
[2013-02-20T02:08:20.96] export LIBJSIG_PATH
[2013-02-20T02:08:20.96] export CLASSPATH
[2013-02-20T02:08:20.96] export ROOTDIR
[2013-02-20T02:08:20.96] export JAVA_OPTS
[2013-02-20T02:08:20.96] export DISPLAY
[2013-02-20T02:08:20.96] export WINDIR
[2013-02-20T02:08:20.96] export PATH
[2013-02-20T02:08:20.96] export JAVA_64_BITS
[2013-02-20T02:08:20.96] export LD_LIBRARY_PATH
[2013-02-20T02:08:20.96] export TESTBASE
[2013-02-20T02:08:20.96] TEST_DEST_DIR="redefineClassInBootstrap"
[2013-02-20T02:08:21.02] # Actual: TEST_DEST_DIR=redefineClassInBootstrap
[2013-02-20T02:08:21.02] TESTNAME="${test_case_name}"
[2013-02-20T02:08:21.02] # Actual: TESTNAME=redefineClassInBootstrap
[2013-02-20T02:08:21.02] testName="vm/mlvm/indy/func/jvmti//redefineClassInBootstrap"
[2013-02-20T02:08:21.02] # Actual: testName=vm/mlvm/indy/func/jvmti//redefineClassInBootstrap
[2013-02-20T02:08:21.02] TESTDIR="${test_work_dir}"
[2013-02-20T02:08:21.02] # Actual: TESTDIR=/net/sc11152596/export/home/sspitsyn/tst/nskx/.February19,.sparc/sspitsyn.SunOS.sparc/redefineClassInBootstrap
[2013-02-20T02:08:21.02] testWorkDir="${test_work_dir}/"
[2013-02-20T02:08:21.02] # Actual: testWorkDir=/net/sc11152596/export/home/sspitsyn/tst/nskx/.February19,.sparc/sspitsyn.SunOS.sparc/redefineClassInBootstrap/
[2013-02-20T02:08:21.02] export testWorkDir
[2013-02-20T02:08:21.02] tlogOutFile="${test_work_dir}/${test_name}.tlog"
[2013-02-20T02:08:21.02] # Actual: tlogOutFile=/net/sc11152596/export/home/sspitsyn/tst/nskx/.February19,.sparc/sspitsyn.SunOS.sparc/redefineClassInBootstrap/redefineClassInBootstrap.tlog
[2013-02-20T02:08:21.02] testErrFile="${test_work_dir}/${test_name}.err"
[2013-02-20T02:08:21.02] # Actual: testErrFile=/net/sc11152596/export/home/sspitsyn/tst/nskx/.February19,.sparc/sspitsyn.SunOS.sparc/redefineClassInBootstrap/redefineClassInBootstrap.err
[2013-02-20T02:08:21.02] EXECUTE_CLASS="${test_name}"
[2013-02-20T02:08:21.02] # Actual: EXECUTE_CLASS=redefineClassInBootstrap
[2013-02-20T02:08:21.02] EXECUTE_CLASS="vm.mlvm.indy.func.jvmti.share.IndyRedefineTest"
[2013-02-20T02:08:21.03] # Actual: EXECUTE_CLASS=vm.mlvm.indy.func.jvmti.share.IndyRedefineTest
[2013-02-20T02:08:21.03] TEST_ARGS="${TEST_ARGS} -dummyClassName=vm.mlvm.indy.func.jvmti.redefineClassInBootstrap.INDIFY_Dummy0 -popFrames true"
[2013-02-20T02:08:21.03] # Actual: TEST_ARGS=-dummyClassName=vm.mlvm.indy.func.jvmti.redefineClassInBootstrap.INDIFY_Dummy0 -popFrames true
[2013-02-20T02:08:21.03] LD_LIBRARY_PATH="${COMMON_LIBS_LOCATION}/lib/${ARCH}/vm/mlvm/indy/func/jvmti/share${SEPARATOR}${LD_LIBRARY_PATH}"
[2013-02-20T02:08:21.03] # Actual: LD_LIBRARY_PATH=/net/sc11152541/export/home/sspitsyn/utb7/vm/bin/lib/solaris-sparc/vm/mlvm/indy/func/jvmti/share:/net/sc11152541/export/home/sspitsyn/hs25/solaris-sparc/fastdebug/jre/lib/sparc/server
[2013-02-20T02:08:21.03] export LD_LIBRARY_PATH
[2013-02-20T02:08:21.03] JAVAC_OPTS="${JAVAC_OPTS} -g"
[2013-02-20T02:08:21.03] # Actual: JAVAC_OPTS=-g
[2013-02-20T02:08:21.03] AGENTS="-agentlib:IndyRedefineClass=verbose=~pathToNewByteCode=${COMMON_CLASSES_LOCATION}/newclass"
[2013-02-20T02:08:21.03] # Actual: AGENTS=-agentlib:IndyRedefineClass=verbose=~pathToNewByteCode=/net/sc11152541/export/home/sspitsyn/utb7/vm/bin/newclass
[2013-02-20T02:08:21.03] JAVA_OPTS="${JAVA_OPTS} ${AGENTS}"
[2013-02-20T02:08:21.04] # Actual: JAVA_OPTS=-server -verbose=1 -agentlib:IndyRedefineClass=verbose=~pathToNewByteCode=/net/sc11152541/export/home/sspitsyn/utb7/vm/bin/newclass
[2013-02-20T02:08:21.04] APPLICATION_TIMEOUT="${TIMEOUT}"
[2013-02-20T02:08:21.04] # Actual: APPLICATION_TIMEOUT=15
[2013-02-20T02:08:21.04] CLASSPATH="${test_work_dir}${PS}${CLASSPATH}"
[2013-02-20T02:08:21.04] # Actual: CLASSPATH=/net/sc11152596/export/home/sspitsyn/tst/nskx/.February19,.sparc/sspitsyn.SunOS.sparc/redefineClassInBootstrap:/net/sc11152541/export/home/sspitsyn/utb7/vm/bin/classes:/net/sc11152541/export/home/sspitsyn/hs25/solaris-sparc/fastdebug/lib/tools.jar
[2013-02-20T02:08:21.04] export CLASSPATH
[2013-02-20T02:08:21.04] ${JAVA} ${JAVA_OPTS} ${EXECUTE_CLASS} ${TEST_ARGS}
[2013-02-20T02:08:21.05] # Actual: /net/sc11152541/export/home/sspitsyn/hs25/solaris-sparc/fastdebug/bin/java -server -verbose=1 -agentlib:IndyRedefineClass=verbose=~pathToNewByteCode=/net/sc11152541/export/home/sspitsyn/utb7/vm/bin/newclass vm.mlvm.indy.func.jvmti.share.IndyRedefineTest -dummyClassName=vm.mlvm.indy.func.jvmti.redefineClassInBootstrap.INDIFY_Dummy0 -popFrames true
[2013-02-20T02:08:21.05] - IndyRedefineClass.c, 37: Setting redefined class name to vm/mlvm/indy/func/jvmti/redefineClassInBootstrap/INDIFY_Dummy0
[2013-02-20T02:08:25.57] - IndyRedefineClass.c, 31: Setting redefine trigger method name to redefineNow
[2013-02-20T02:08:25.57] - IndyRedefineClass.c, 109: Entering redefine tigger method: Lvm/mlvm/indy/func/jvmti/redefineClassInBootstrap/INDIFY_Dummy0;.redefineNow
[2013-02-20T02:08:25.57] - IndyRedefineClass.c, 117: Redefining class vm/mlvm/indy/func/jvmti/redefineClassInBootstrap/INDIFY_Dummy0
[2013-02-20T02:08:25.57] # info :: File = /net/sc11152541/export/home/sspitsyn/utb7/vm/bin/newclass/vm/mlvm/indy/func/jvmti/redefineClassInBootstrap/INDIFY_Dummy0.class
[2013-02-20T02:08:25.57] # info **Agent:: opening file /net/sc11152541/export/home/sspitsyn/utb7/vm/bin/newclass/vm/mlvm/indy/func/jvmti/redefineClassInBootstrap/INDIFY_Dummy0.class
[2013-02-20T02:08:25.57] # info file size= 2860
[2013-02-20T02:08:25.57] File red completely
[2013-02-20T02:08:25.57] - IndyRedefineClass.c, 71: Enabling single step
[2013-02-20T02:08:25.57] - IndyRedefineClass.c, 80: Forcing early return
[2013-02-20T02:08:25.57] - IndyRedefineClass.c, 145: Single step event: Lvm/mlvm/indy/func/jvmti/redefineClassInBootstrap/INDIFY_Dummy0; .bootstrap :2e
[2013-02-20T02:08:25.67] - IndyRedefineClass.c, 71: Enabling single step
[2013-02-20T02:08:25.67] - IndyRedefineClass.c, 76: Popping a frame
[2013-02-20T02:08:25.67] - IndyRedefineClass.c, 145: Single step event: Ljava/lang/invoke/LambdaForm$DMH; .invokeStatic_LLL_L :e
[2013-02-20T02:08:25.67] - IndyRedefineClass.c, 65: Disabling single step
[2013-02-20T02:08:25.67] - IndyRedefineClass.c, 48: The following values should be non-zero for test to pass:
[2013-02-20T02:08:25.67] - IndyRedefineClass.c, 49: Method entry event fired? 1
[2013-02-20T02:08:25.67] - IndyRedefineClass.c, 50: Single step event fired? 1
[2013-02-20T02:08:25.67] - IndyRedefineClass.c, 51: The following value should be zero for test to pass:
[2013-02-20T02:08:25.67] - IndyRedefineClass.c, 52: Any other error occured? 0
[2013-02-20T02:08:25.67] ### TRACE 1: TEST PASSED
[2013-02-20T02:08:25.67] # Test level exit status: 95
- backported by
-
JDK-8013679 JSR 292: MemberName vmtarget refs to methods must be updated at class redefinition
- Resolved
-
JDK-8034014 JSR 292: MemberName vmtarget refs to methods must be updated at class redefinition
- Resolved
-
JDK-8035848 JSR 292: MemberName vmtarget refs to methods must be updated at class redefinition
- Resolved
-
JDK-8057267 JSR 292: MemberName vmtarget refs to methods must be updated at class redefinition
- Resolved
-
JDK-8060833 JSR 292: MemberName vmtarget refs to methods must be updated at class redefinition
- Resolved
-
JDK-8035454 JSR 292: MemberName vmtarget refs to methods must be updated at class redefinition
- Closed
- duplicates
-
JDK-7192043 JSR292: giving class format error on retransform of classes with invokedynamic
- Closed
-
JDK-6929027 Bootstrap and target methods handles are not invalidated when class is redefined via JVMTI
- Closed
- relates to
-
JDK-8042235 redefining method used by multiple MethodHandles crashes VM
- Closed
-
JDK-8013267 move MemberNameTable from native code to Java heap, use to intern MemberNames
- Open
-
JDK-7187554 JSR 292: JVMTI PopFrame needs to handle appendix arguments
- Resolved
-
JDK-8013945 CMS fatal error: must own lock MemberNameTable_lock
- Resolved
-
JDK-8014288 perf regression in nashorn JDK-8008448.js test after 8008511 changes
- Resolved
-
JDK-8004815 NPG: Using raw Method* is unsafe when the method_holder has been redefined
- Closed