JDK-8269633 : vmTestbase/nsk/jvmti/RedefineClasses/StressRedefine/TestDescription.java crashed with oopDesc::size_given_klass+0x6
  • Type: Bug
  • Component: hotspot
  • Sub-Component: jvmti
  • Affected Version: 17
  • Priority: P4
  • Status: Closed
  • Resolution: Cannot Reproduce
  • Submitted: 2021-06-29
  • Updated: 2024-07-16
  • Resolved: 2024-07-16
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdResolved
Related Reports
Relates :  
Relates :  
Relates :  
Description
Test vmTestbase/nsk/jvmti/RedefineClasses/StressRedefine/TestDescription.java crashed with product build ant following VM options "-XX:+CreateCoredumpOnCrash -XX:+IgnoreUnrecognizedVMOptions -XX:+UseParallelGC -Xmixed -XX:+TieredCompilation"

Log also contains:
" Failed to call RedefineClasses():
	the function returned error 62: JVMTI_ERROR_FAILS_VERIFICATION"



hs_err:
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ffa557bc7b6, pid=38916, tid=26608
#
# JRE version: Java(TM) SE Runtime Environment (17.0+26) (build 17-ea+26-LTS-2439)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (17-ea+26-LTS-2439, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, parallel gc, windows-amd64)
# Problematic frame:
# V  [jvm.dll+0x1ac7b6]  oopDesc::size_given_klass+0x6
#
# Core dump will be written. Default location: T:\testoutput\test-support\jtreg_open_test_hotspot_jtreg_vmTestbase_nsk_jvmti\scratch\2\hs_err_pid38916.mdmp
#
# If you would like to submit a bug report, please visit:
#   https://bugreport.java.com/bugreport/crash.jsp
#

---------------  S U M M A R Y ------------

Command Line: -XX:MaxRAMPercentage=4.16667 -Djava.io.tmpdir=t:\testoutput\test-support\jtreg_open_test_hotspot_jtreg_vmTestbase_nsk_jvmti\tmp -XX:+CreateCoredumpOnCrash -XX:+IgnoreUnrecognizedVMOptions -XX:+UseParallelGC -Xmixed -XX:+TieredCompilation -Djava.library.path=c:\ade\mesos\work_dir\jib-master\install\jdk-17+26-2439\windows-x64.test\hotspot\jtreg\native -agentlib:stressRedefine nsk.jvmti.RedefineClasses.StressRedefine ./bin

Host: AMD EPYC 7J13 64-Core Processor                , 12 cores, 47G,  Windows Server 2016 , 64 bit Build 14393 (10.0.14393.4350)
Time: Sun Jun 13 23:46:34 2021 /GM elapsed time: 7.536980 seconds (0d 0h 0m 7s)

---------------  T H R E A D  ---------------

Current thread (0x000001e5ff6fad60):  GCTaskThread "GC Thread#6" [stack: 0x000000a817500000,0x000000a817600000] [id=26608]

Stack: [0x000000a817500000,0x000000a817600000],  sp=0x000000a8175ff558,  free space=1021k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [jvm.dll+0x1ac7b6]  oopDesc::size_given_klass+0x6  (oop.inline.hpp:149)


siginfo: EXCEPTION_ACCESS_VIOLATION (0xc0000005), reading address 0x000000081f00b26b


Register to memory mapping:

RIP=0x00007ffa557bc7b6 jvm.dll::oopDesc::size_given_klass + 0x6
RAX=0x00000000ff710ae0 points into unknown readable memory: 0x872b00b62d63871c | 1c 87 63 2d b6 00 2b 87
RBX=0x872b00b62d63871c is an unknown value
RCX=0x00000000ff710ae0 points into unknown readable memory: 0x872b00b62d63871c | 1c 87 63 2d b6 00 2b 87
RDX=0x00000000ff710ae0 points into unknown readable memory: 0x872b00b62d63871c | 1c 87 63 2d b6 00 2b 87
RSP=0x000000a8175ff558 points into unknown readable memory: 0x00007ffa55cba741 | 41 a7 cb 55 fa 7f 00 00
RBP=0x000000a8175ff700 points into unknown readable memory: 0x00000000000003d8 | d8 03 00 00 00 00 00 00
RSI=0x0000000080d8b108 is pointing into object: java.lang.Class 
{0x0000000080d8b0c8} - klass: 'java/lang/Class'
 - ---- fields (total size 16 words):
 - private volatile transient 'classRedefinedCount' 'I' @12  0
 - private volatile transient 'cachedConstructor' 'Ljava/lang/reflect/Constructor;' @40  NULL (0)
 - private transient 'name' 'Ljava/lang/String;' @44  NULL (0)
 - private transient 'module' 'Ljava/lang/Module;' @48  a 'java/lang/Module'{0x0000000080a2fe38} (80a2fe38)
 - private final 'classLoader' 'Ljava/lang/ClassLoader;' @52  a 'nsk/jvmti/RedefineClasses/StressRedefine$DefiningClassLoader'{0x0000000080a040a0} (80a040a0)
 - private transient 'classData' 'Ljava/lang/Object;' @56  NULL (0)
 - private transient 'packageName' 'Ljava/lang/String;' @60  NULL (0)
 - private final 'componentType' 'Ljava/lang/Class;' @64  
[error occurred during error reporting (printing register info), id 0xc0000005, EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ffa55c6a3e3]

Registers:
RAX=0x00000000ff710ae0, RBX=0x872b00b62d63871c, RCX=0x00000000ff710ae0, RDX=0x00000000ff710ae0
RSP=0x000000a8175ff558, RBP=0x000000a8175ff700, RSI=0x0000000080d8b108, RDI=0x000001e5dff06c80
R8 =0x872b00b62d63871c, R9 =0x000000081f00b263, R10=0x0000000800000000, R11=0x000001e5dff06c80
R12=0x0000000000000000, R13=0x0000000000000010, R14=0x00000000ff710ae0, R15=0x000001e5dff06c80
RIP=0x00007ffa557bc7b6, EFLAGS=0x0000000000010206

Top of Stack: (sp=0x000000a8175ff558)
0x000000a8175ff558:   00007ffa55cba741 0000000000000000
0x000000a8175ff568:   0000000000000000 0000000000000000
0x000000a8175ff578:   000000a8175ff700 000000a8175ff620
0x000000a8175ff588:   00007ffa55d908cf 000001e5ff6fad60
0x000000a8175ff598:   0000000000000000 000085eb27b085a9
0x000000a8175ff5a8:   00007ffa55d906ce 0000000000000010
0x000000a8175ff5b8:   0000000000000000 000000000000000c
0x000000a8175ff5c8:   0000000000000000 0000000080d8b108
0x000000a8175ff5d8:   000000a8175ff729 872b00b62d63871c
0x000000a8175ff5e8:   00007ffa55cbb6dc 000001e5dff06c80
0x000000a8175ff5f8:   00007ffa55cbcf20 872b00b62d63871c
0x000000a8175ff608:   000001e5ff330b00 000000a8175ff718
0x000000a8175ff618:   000000a8133ff598 0000000000000000
0x000000a8175ff628:   000001e5ff6fa580 0000000000000005
0x000000a8175ff638:   0000000000000000 000000a8133ff5f0
0x000000a8175ff648:   000000a8175ff729 000001e5dff06c80 

Instructions: (pc=0x00007ffa557bc7b6)
0x00007ffa557bc6b6:   40 48 8b 74 24 48 48 83 c4 30 5f c3 48 8b 07 48
0x00007ffa557bc6c6:   8d 54 24 20 48 89 4c 24 28 48 8b cf 48 89 5c 24
0x00007ffa557bc6d6:   20 ff 50 38 48 8b 5c 24 40 48 8b 74 24 48 48 83
0x00007ffa557bc6e6:   c4 30 5f c3 cc cc cc cc cc cc 48 89 5c 24 08 57
0x00007ffa557bc6f6:   48 83 ec 30 48 8b 02 48 8b f9 48 8b ca 48 8b da
0x00007ffa557bc706:   ff 50 38 84 c0 74 48 0f 10 83 f0 02 00 00 66 0f
0x00007ffa557bc716:   73 d8 08 66 48 0f 7e c0 48 85 c0 74 32 0f 10 83
0x00007ffa557bc726:   f0 02 00 00 48 8b 07 48 8d 54 24 20 48 8b cf 0f
0x00007ffa557bc736:   29 44 24 20 ff 50 40 33 c0 48 89 44 24 20 48 89
0x00007ffa557bc746:   44 24 28 0f 10 44 24 20 0f 11 83 f0 02 00 00 48
0x00007ffa557bc756:   8b 5c 24 40 48 83 c4 30 5f c3 48 8b 49 40 48 8b
0x00007ffa557bc766:   01 48 ff 60 28 cc cc cc cc cc 80 3d 43 91 93 00
0x00007ffa557bc776:   00 48 8b c1 74 1b 8b 51 08 8b 0d 03 1b 8d 00 48
0x00007ffa557bc786:   d3 e2 48 8b c8 48 03 15 ee 1a 8d 00 e9 19 00 00
0x00007ffa557bc796:   00 48 8b 51 08 48 8b c8 e9 0d 00 00 00 cc cc cc
0x00007ffa557bc7a6:   cc cc cc cc cc cc cc cc cc cc 4c 8b ca 48 8b d1
0x00007ffa557bc7b6:   45 8b 41 08 45 85 c0 7e 0e 41 f6 c0 01 75 56 41
0x00007ffa557bc7c6:   c1 f8 03 41 8b c0 c3 79 4c 80 3d e4 90 93 00 00
0x00007ffa557bc7d6:   b8 0c 00 00 00 b9 10 00 00 00 0f 45 c8 8b 05 ab
0x00007ffa557bc7e6:   29 8d 00 ff c8 4c 63 c8 48 63 14 11 41 8b c8 83
0x00007ffa557bc7f6:   e1 3f 48 d3 e2 41 8b c8 48 c1 f9 10 0f b6 c1 49
0x00007ffa557bc806:   8d 0c 11 49 f7 d1 48 03 c1 49 c1 e9 03 48 c1 e8
0x00007ffa557bc816:   03 41 23 c1 c3 49 8b 01 49 8b c9 48 ff a0 00 01
0x00007ffa557bc826:   00 00 cc cc cc cc cc cc cc cc 48 83 ec 38 0f 10
0x00007ffa557bc836:   02 48 8b 49 40 48 8d 54 24 20 0f 29 44 24 20 e8
0x00007ffa557bc846:   56 f2 ff ff 48 83 c4 38 c3 cc 48 83 ec 38 0f 10
0x00007ffa557bc856:   02 48 8b 01 48 8d 54 24 20 0f 29 44 24 20 ff 50
0x00007ffa557bc866:   38 48 83 c4 38 c3 cc cc cc cc 48 89 5c 24 08 55
0x00007ffa557bc876:   56 57 41 54 41 55 41 56 41 57 48 8d 6c 24 e0 48
0x00007ffa557bc886:   81 ec 20 01 00 00 48 8b 05 85 16 90 00 48 33 c4
0x00007ffa557bc896:   48 89 45 10 48 8b 05 af 88 92 00 45 33 ed 4c 8b
0x00007ffa557bc8a6:   b5 80 00 00 00 4c 8b fa 48 8b bd 88 00 00 00 4d 


Stack slot to memory mapping:
stack at sp + 0 slots: 0x00007ffa55cba741 jvm.dll::PSPromotionManager::copy_unmarked_to_survivor_space<0> + 0x21
stack at sp + 1 slots: 0x0 is NULL
stack at sp + 2 slots: 0x0 is NULL
stack at sp + 3 slots: 0x0 is NULL
stack at sp + 4 slots: 0x000000a8175ff700 points into unknown readable memory: 0x00000000000003d8 | d8 03 00 00 00 00 00 00
stack at sp + 5 slots: 0x000000a8175ff620 points into unknown readable memory: 0x0000000000000000 | 00 00 00 00 00 00 00 00
stack at sp + 6 slots: 0x00007ffa55d908cf jvm.dll::JavaThread::oops_do_no_frames + 0xff
stack at sp + 7 slots: 0x000001e5ff6fad60 points into unknown readable memory: 0x00007ffa55f8f830 | 30 f8 f8 55 fa 7f 00 00


---------------  P R O C E S S  ---------------

Threads class SMR info:
_java_thread_list=0x000001e5ff62c000, length=74, elements={
0x000001e5dff61240, 0x000001e5e003a000, 0x000001e5e003bcb0, 0x000001e5dff19750,
0x000001e5dff1a4d0, 0x000001e5dff1cf10, 0x000001e5fdc01090, 0x000001e5fdc03640,
0x000001e5fdc0c330, 0x000001e5fdc0da20, 0x000001e5fdd40100, 0x000001e5fdd40aa0,
0x000001e5fdd405d0, 0x000001e5fdd42c50, 0x000001e5fdd41910, 0x000001e5fdd422b0,
0x000001e5fdd42780, 0x000001e5fdd3f290, 0x000001e5fdd3f760, 0x000001e5fdd3fc30,
0x000001e5ff56b920, 0x000001e5ff56e470, 0x000001e5ff569c40, 0x000001e5ff56ee10,
0x000001e5ff56a5e0, 0x000001e5ff56e940, 0x000001e5ff570620, 0x000001e5ff56f2e0,
0x000001e5ff569770, 0x000001e5ff56a110, 0x000001e5ff570af0, 0x000001e5ff56bdf0,
0x000001e5ff570150, 0x000001e5ff56aab0, 0x000001e5ff5692a0, 0x000001e5ff56af80,
0x000001e5ff56c2c0, 0x000001e5ff56b450, 0x000001e5ff56c790, 0x000001e5ff56cc60,
0x000001e5ff6921b0, 0x000001e5ff6939c0, 0x000001e5ff690000, 0x000001e5ff693e90,
0x000001e5ff6956a0, 0x000001e5ff692680, 0x000001e5ff693020, 0x000001e5ff68f660,
0x000001e5ff694360, 0x000001e5ff692b50, 0x000001e5ff691340, 0x000001e5ff6951d0,
0x000001e5ff6909a0, 0x000001e5ff694830, 0x000001e5ff691810, 0x000001e5ff6904d0,
0x000001e5ff68e320, 0x000001e5ff695b70, 0x000001e5ff690e70, 0x000001e5ff68e7f0,
0x000001e5ff6934f0, 0x000001e5ff691ce0, 0x000001e5ff68ecc0, 0x000001e5ff694d00,
0x000001e5ff68f190, 0x000001e5ff68fb30, 0x000001e5ff56f7b0, 0x000001e5ff56d130,
0x000001e5ff56fc80, 0x000001e5ff56d600, 0x000001e5ff56dad0, 0x000001e5ff56dfa0,
0x000001e5fe22c940, 0x000001e5804ef820
}


Comments
Will investigate this in 18 time frame.
24-08-2021

This log message stands that RedefineClasses was not called because of of verification error: " Failed to call RedefineClasses(): the function returned error 62: JVMTI_ERROR_FAILS_VERIFICATION" So, there is a good chance it is a test problem. It is interesting what kind of verification error it is though. There is a lack of information about it, so this issue will need to be reproduced again to get more details for analysis. Targeting to TBD for now.
07-07-2021

The incorrect jvmti class redefinition might cause any type of crashes. So it is needed to analyze logs and verify that it is not test/jvmti problem before moving this into GC.
29-06-2021