JDK-8237485 : assert(!is_null(v)) failed: narrow klass value can never be zero
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 15
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2020-01-17
  • Updated: 2020-09-25
  • Resolved: 2020-09-25
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
Stress test hit following assertion:

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (open/src/hotspot/share/oops/compressedOops.inline.hpp:84), pid=7075, tid=7175
#  assert(!is_null(v)) failed: narrow klass value can never be zero
#
# JRE version: Java(TM) SE Runtime Environment (15.0+7) (fastdebug build 15-ea+7-127)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 15-ea+7-127, compiled mode, sharing, compressed oops, g1 gc, linux-amd64)
# Problematic frame:
# V  [libjvm.so+0x578b04]  CompressedKlassPointers::decode_not_null(unsigned int)+0x54
#
# Core dump will be written. Default location: Core dumps may be processed with "/opt/core.sh %p" (or dumping to /opt/mach5/mesos/work_dir/slaves/6e54f4af-e606-43b0-80ce-0a482a5988b6-S253/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/c6c3eba5-a29d-4b42-88e0-76de9c0f6ad5/runs/213c59ad-9897-47a7-8c39-83deda2311fd/testoutput/test-support/jtreg_closed_test_hotspot_jtreg_applications_kitchensink_Kitchensink_java/scratch/0/core.7075)
#
# 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: -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:MaxRAMPercentage=6 -Xcomp -XX:+CreateCoredumpOnCrash -ea -esa -XX:CompileThreshold=100 -XX:+UnlockExperimentalVMOptions -XX:-TieredCompilation -XX:MaxRAMPercentage=50 -XX:MaxMetaspaceSize=256m -XX:+HeapDumpOnOutOfMemoryError -XX:+CrashOnOutOfMemoryError -Djava.net.preferIPv6Addresses=false -XX:+DisplayVMOutputToStderr -Xlog:gc*,gc+heap=debug:gc.log:uptime,timemillis,level,tags -XX:+DisableExplicitGC -XX:+StartAttachListener --add-exports=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-exports=java.xml/com.sun.org.apache.xerces.internal.parsers=ALL-UNNAMED --add-exports=java.xml/com.sun.org.apache.xerces.internal.util=ALL-UNNAMED -Djava.io.tmpdir=/opt/mach5/mesos/work_dir/slaves/6e54f4af-e606-43b0-80ce-0a482a5988b6-S253/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/c6c3eba5-a29d-4b42-88e0-76de9c0f6ad5/runs/213c59ad-9897-47a7-8c39-83deda2311fd/testoutput/test-support/jtreg_closed_test_hotspot_jtreg_applications_kitchensink_Kitchensink_java/scratch/0/java.io.tmpdir -Duser.home=/opt/mach5/mesos/work_dir/slaves/6e54f4af-e606-43b0-80ce-0a482a5988b6-S253/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/c6c3eba5-a29d-4b42-88e0-76de9c0f6ad5/runs/213c59ad-9897-47a7-8c39-83deda2311fd/testoutput/test-support/jtreg_closed_test_hotspot_jtreg_applications_kitchensink_Kitchensink_java/scratch/0/user.home -agentpath:/opt/mach5/mesos/work_dir/jib-master/install/jdk-15+7-127/linux-x64-debug.test/hotspot/jtreg/native/libJvmtiStressModule.so -XX:NativeMemoryTracking=detail applications.kitchensink.process.stress.Main /opt/mach5/mesos/work_dir/slaves/6e54f4af-e606-43b0-80ce-0a482a5988b6-S253/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/c6c3eba5-a29d-4b42-88e0-76de9c0f6ad5/runs/213c59ad-9897-47a7-8c39-83deda2311fd/testoutput/test-support/jtreg_closed_test_hotspot_jtreg_applications_kitchensink_Kitchensink_java/scratch/0/kitchensink.final.properties

Host: Intel(R) Xeon(R) Platinum 8167M CPU @ 2.00GHz, 8 cores, 58G, Oracle Linux Server release 7.6
Time: Thu Jan 16 21:26:40 2020 UTC elapsed time: 1365 seconds (0d 0h 22m 45s)

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

Current thread (0x00007f845800c000):  GCTaskThread "GC Thread#6" [stack: 0x00007f83cbbfa000,0x00007f83cbcfa000] [id=7175]

Stack: [0x00007f83cbbfa000,0x00007f83cbcfa000],  sp=0x00007f83cbcf88b0,  free space=1018k
Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x578b04]  CompressedKlassPointers::decode_not_null(unsigned int)+0x54
V  [libjvm.so+0xac512a]  G1ParScanThreadState::copy_to_survivor_space(G1HeapRegionAttr, oop, markWord)+0x3ea
V  [libjvm.so+0xaf54d0]  void G1ParCopyClosure<(G1Barrier)0, (G1Mark)0>::do_oop_work<oop>(oop*)+0x100
V  [libjvm.so+0xac1342]  unsigned long G1OopStarChunkedList::chunks_do<oop>(ChunkedList<oop*, (MemoryType)5>*, OopClosure*) [clone .isra.7]+0x52
V  [libjvm.so+0xac14d0]  G1OopStarChunkedList::oops_do(OopClosure*, OopClosure*)+0x20
V  [libjvm.so+0xae5560]  G1ScanCollectionSetRegionClosure::do_heap_region(HeapRegion*)+0x220
V  [libjvm.so+0xa59770]  G1CollectionSet::iterate_part_from(HeapRegionClosure*, HeapRegionClaimer*, unsigned long, unsigned long, unsigned int, unsigned int) const [clone .part.26]+0x100
V  [libjvm.so+0xa5ad57]  G1CollectionSet::iterate_incremental_part_from(HeapRegionClosure*, HeapRegionClaimer*, unsigned int, unsigned int) const+0x97
V  [libjvm.so+0xad3419]  G1RemSet::scan_collection_set_regions(G1ParScanThreadState*, unsigned int, G1GCPhaseTimes::GCParPhases, G1GCPhaseTimes::GCParPhases, G1GCPhaseTimes::GCParPhases)+0x89
V  [libjvm.so+0xa4db13]  G1EvacuateRegionsBaseTask::work(unsigned int)+0x83
V  [libjvm.so+0x1667284]  GangWorker::run_task(WorkData)+0x84
V  [libjvm.so+0x16673c8]  GangWorker::loop()+0x48
V  [libjvm.so+0x153f5d6]  Thread::call_run()+0xf6
V  [libjvm.so+0x126d76e]  thread_native_entry(Thread*)+0x10e

Register to memory mapping:

RAX=0x00007f84cace7000 points into unknown readable memory: 58 00 00 00 00 00 00 00
RBX=0x0 is NULL
RCX=0x00007f84c9b04588: <offset 0x00000000016fa588> in /opt/mach5/mesos/work_dir/jib-master/install/jdk-15+7-127/linux-x64-debug.jdk/jdk-15/fastdebug/lib/server/libjvm.so at 0x00007f84c840a000
RDX=0x00007f84c9c57351: <offset 0x000000000184d351> in /opt/mach5/mesos/work_dir/jib-master/install/jdk-15+7-127/linux-x64-debug.jdk/jdk-15/fastdebug/lib/server/libjvm.so at 0x00007f84c840a000
RSP=0x00007f83cbcf88b0 points into unknown readable memory: 00 00 40 a9 00 00 00 00
RBP=0x00007f83cbcf88c0 points into unknown readable memory: 60 89 cf cb 83 7f 00 00
RSI=0x0000000000000054 is an unknown value
RDI=0x00007f84c9b045b0: <offset 0x00000000016fa5b0> in /opt/mach5/mesos/work_dir/jib-master/install/jdk-15+7-127/linux-x64-debug.jdk/jdk-15/fastdebug/lib/server/libjvm.so at 0x00007f84c840a000
R8 =0x0 is NULL
R9 =0x000000000000c3e0 is an unknown value
R10=0x000000006c63925c is an unknown value
R11=0x000df65e7a7d8411 is an unknown value
R12=0x00000001bf592e40 points into unknown readable memory: 00 00 00 00 00 00 00 00
R13=0x00007f83cbcf89b8 points into unknown readable memory: 40 2e 59 bf 01 00 00 00
R14=0x00007f84b97abf3e is at entry_point+6622 in (nmethod*)0x00007f84b97a9690
R15=0x00007f83cbcf8998 points into unknown readable memory: 40 2e 59 bf 01 00 00 00


Registers:
RAX=0x00007f84cace7000, RBX=0x0000000000000000, RCX=0x00007f84c9b04588, RDX=0x00007f84c9c57351
RSP=0x00007f83cbcf88b0, RBP=0x00007f83cbcf88c0, RSI=0x0000000000000054, RDI=0x00007f84c9b045b0
R8 =0x0000000000000000, R9 =0x000000000000c3e0, R10=0x000000006c63925c, R11=0x000df65e7a7d8411
R12=0x00000001bf592e40, R13=0x00007f83cbcf89b8, R14=0x00007f84b97abf3e, R15=0x00007f83cbcf8998
RIP=0x00007f84c8982b04, EFLAGS=0x0000000000010246, CSGSFS=0x002b000000000033, ERR=0x0000000000000006
  TRAPNO=0x000000000000000e

Top of Stack: (sp=0x00007f83cbcf88b0)
0x00007f83cbcf88b0:   00000000a9400000 00007f846c056750
0x00007f83cbcf88c0:   00007f83cbcf8960 00007f84c8ecf12a
0x00007f83cbcf88d0:   0000000000000040 00007f84c4094fa0
0x00007f83cbcf88e0:   00007f83cbcf8960 00007f83cbcf89b0 

Instructions: (pc=0x00007f84c8982b04)
0x00007f84c8982a04:   53 ff ff ff 0f 1f 84 00 00 00 00 00 48 89 df e8
0x00007f84c8982a14:   48 f0 e1 00 e9 1e ff ff ff 0f 1f 00 48 39 f2 0f
0x00007f84c8982a24:   84 48 ff ff ff 48 8d 05 28 dc 63 01 48 8d 3d 81
0x00007f84c8982a34:   11 18 01 48 8d 0d 3c 46 2d 01 be 8b 00 00 00 48
0x00007f84c8982a44:   8d 15 d6 11 18 01 48 8b 00 c6 00 58 31 c0 e8 09
0x00007f84c8982a54:   3b 36 00 e8 94 c6 ce 00 48 8b 7b 08 48 8b 43 10
0x00007f84c8982a64:   e9 08 ff ff ff 0f 1f 80 00 00 00 00 48 8d 05 e1
0x00007f84c8982a74:   db 63 01 48 8d 15 12 11 18 01 48 8d 0d dd 45 2d
0x00007f84c8982a84:   01 be 96 00 00 00 48 8d 3d 27 11 18 01 48 8b 00
0x00007f84c8982a94:   c6 00 58 31 c0 e8 c2 3a 36 00 e8 4d c6 ce 00 48
0x00007f84c8982aa4:   8b 53 08 8b 42 38 e9 76 fe ff ff 90 55 48 89 e5
0x00007f84c8982ab4:   53 89 fb 48 83 ec 08 85 db 74 21 48 8d 05 6a db
0x00007f84c8982ac4:   63 01 8b 48 08 48 d3 e3 48 03 18 f6 c3 07 75 44
0x00007f84c8982ad4:   48 83 c4 08 48 89 d8 5b 5d c3 66 90 48 8d 05 71
0x00007f84c8982ae4:   db 63 01 48 8d 0d 9a 1a 18 01 48 8d 15 5c 48 2d
0x00007f84c8982af4:   01 be 54 00 00 00 48 8d 3d af 1a 18 01 48 8b 00
0x00007f84c8982b04:   c6 00 58 31 c0 e8 52 3a 36 00 e8 dd c5 ce 00 eb
0x00007f84c8982b14:   aa 0f 1f 00 48 8d 05 39 db 63 01 49 89 d8 48 8d
0x00007f84c8982b24:   0d 43 48 2d 01 48 8d 15 b8 1a 18 01 be 56 00 00
0x00007f84c8982b34:   00 48 8d 3d 74 1a 18 01 48 8b 00 c6 00 58 31 c0
0x00007f84c8982b44:   e8 17 3a 36 00 e8 a2 c5 ce 00 48 83 c4 08 48 89
0x00007f84c8982b54:   d8 5b 5d c3 0f 1f 84 00 00 00 00 00 55 48 89 e5
0x00007f84c8982b64:   41 57 41 56 41 55 41 54 53 48 83 ec 78 48 8d 1d
0x00007f84c8982b74:   52 3d 6e 01 48 89 7d 88 80 3b 00 75 67 48 8b 45
0x00007f84c8982b84:   88 48 89 45 a8 48 8d 05 18 e0 5e 01 48 89 45 b0
0x00007f84c8982b94:   48 8b 45 a8 48 89 45 b8 48 c7 45 c0 00 00 00 00
0x00007f84c8982ba4:   48 8b 45 b8 45 31 e4 48 89 45 90 48 8b 45 90 48
0x00007f84c8982bb4:   89 45 98 48 8b 45 98 48 89 45 a0 48 8b 45 a0 48
0x00007f84c8982bc4:   89 45 a8 48 8b 45 a8 49 01 c4 4d 8b 24 24 48 83
0x00007f84c8982bd4:   c4 78 4c 89 e0 5b 41 5c 41 5d 41 5e 41 5f 5d c3
0x00007f84c8982be4:   0f 1f 40 00 48 8d 45 88 48 89 c7 48 89 85 70 ff
0x00007f84c8982bf4:   ff ff e8 e5 ff cd 00 48 8b 45 88 80 3b 00 48 89 
Comments
Sorry about that, created JDK-8253671
25-09-2020

[~gziemski] Don't reopen a bug just because it has the same stack trace. There are numerous ways the same stack trace can be caused by different bugs. Please, open a new bug instead, and alternatively add a "relates to" link.
25-09-2020

Most likely a duplicate of JDK-8235305 due to similar stack trace: #5 0x00007f84c8ce6675 in report_vm_error (file=file@entry=0x7f84c9b045b0 "open/src/hotspot/share/oops/compressedOops.inline.hpp", line=line@entry=84, error_msg=error_msg@entry=0x7f84c9c57351 "assert(!is_null(v)) failed", detail_fmt=detail_fmt@entry=0x7f84c9b04588 "narrow klass value can never be zero") at open/src/hotspot/share/runtime/thread.hpp:831 #6 0x00007f84c8982b0e in CompressedKlassPointers::decode_not_null (v=0) at open/src/hotspot/share/oops/compressedOops.inline.hpp:84 #7 0x00007f84c8ecf12a in klass (this=0x1bf592e40) at open/src/hotspot/share/oops/oop.inline.hpp:93 #8 size (this=0x1bf592e40) at open/src/hotspot/share/oops/oop.inline.hpp:186 #9 G1ParScanThreadState::copy_to_survivor_space (this=0x7f846c056750, region_attr=..., old=..., old_mark=...) at open/src/hotspot/share/gc/g1/g1ParScanThreadState.cpp:232 #10 0x00007f84c8eff4d0 in G1ParCopyClosure<(G1Barrier)0, (G1Mark)0>::do_oop_work<oop> (this=0x7f846c0b8c28, p=0x7f84b97abf3e) at open/src/hotspot/share/oops/oopsHierarchy.hpp:87 #11 0x00007f84c8ecb342 in G1OopStarChunkedList::chunks_do<oop> (head=<optimized out>, cl=cl@entry=0x7f846c0b8c28, this=0x7f846c061e88) at open/src/hotspot/share/utilities/globalDefinitions.hpp:395 #12 0x00007f84c8ecb4d0 in G1OopStarChunkedList::oops_do (this=this@entry=0x7f846c061e88, obj_cl=obj_cl@entry=0x7f83cbcf8aa0, root_cl=0x7f846c0b8c28) at open/src/hotspot/share/gc/g1/g1OopStarChunkedList.cpp:37 #13 0x00007f84c8eef560 in scan_opt_rem_set_roots (r=0x7f845847a120, this=0x7f83cbcf8c90) at open/src/hotspot/share/gc/g1/g1ParScanThreadState.hpp:150 #14 G1ScanCollectionSetRegionClosure::do_heap_region (this=0x7f83cbcf8c90, r=0x7f845847a120) at open/src/hotspot/share/gc/g1/g1RemSet.cpp:845 #15 0x00007f84c8e63770 in G1CollectionSet::iterate_part_from (this=this@entry=0x7f84c407a4e8, cl=cl@entry=0x7f83cbcf8c90, hr_claimer=hr_claimer@entry=0x0, offset=offset@entry=578, length=length@entry=5, worker_id=<optimized out>, total_workers=8) at open/src/hotspot/share/gc/g1/g1CollectionSet.cpp:246 #16 0x00007f84c8e64d57 in iterate_part_from (total_workers=<optimized out>, worker_id=0, length=5, offset=578, hr_claimer=0x0, cl=0x7f83cbcf8c90, this=0x7f84c407a4e8) at open/src/hotspot/share/gc/g1/g1CollectionSet.cpp:235 #17 G1CollectionSet::iterate_incremental_part_from (this=0x7f84c407a4e8, cl=cl@entry=0x7f83cbcf8c90, hr_claimer=hr_claimer@entry=0x0, worker_id=worker_id@entry=0, total_workers=<optimized out>) at open/src/hotspot/share/gc/g1/g1CollectionSet.cpp:225 #18 0x00007f84c8e491a1 in G1CollectedHeap::collection_set_iterate_increment_from (this=<optimized out>, cl=cl@entry=0x7f83cbcf8c90, hr_claimer=hr_claimer@entry=0x0, worker_id=worker_id@entry=0) at open/src/hotspot/share/gc/g1/g1CollectedHeap.hpp:549 #19 0x00007f84c8edd419 in collection_set_iterate_increment_from (worker_id=<optimized out>, blk=0x7f83cbcf8c90, this=<optimized out>) at open/src/hotspot/share/gc/g1/g1CollectedHeap.hpp:1215 #20 G1RemSet::scan_collection_set_regions (this=0x7f84c40b4bd0, pss=<optimized out>, worker_id=0, scan_phase=G1GCPhaseTimes::OptScanHR, coderoots_phase=G1GCPhaseTimes::OptCodeRoots, objcopy_phase=G1GCPhaseTimes::OptObjCopy) at open/src/hotspot/share/gc/g1/g1RemSet.cpp:877 #21 0x00007f84c8e57b13 in G1EvacuateRegionsBaseTask::work (this=0x7f8470219230, worker_id=0) at open/src/hotspot/share/gc/g1/g1CollectedHeap.cpp:3862 #22 0x00007f84c9a71284 in GangWorker::run_task (this=this@entry=0x7f845800c000, data=...) at open/src/hotspot/share/gc/shared/workgroup.cpp:332 #23 0x00007f84c9a713c8 in GangWorker::loop (this=0x7f845800c000) at open/src/hotspot/share/gc/shared/workgroup.cpp:342 #24 0x00007f84c99495d6 in Thread::call_run (this=this@entry=0x7f845800c000) at open/src/hotspot/share/runtime/thread.cpp:399 #25 0x00007f84c967776e in thread_native_entry (thread=0x7f845800c000) at open/src/hotspot/os/linux/os_linux.cpp:789 #26 0x00007f84ca69dea5 in start_thread () from .../lib64/libpthread.so.0 #27 0x00007f84ca1c28cd in clone () from .../lib64/libc.so.6 Note that we are in optional evacuation (OptObjCopy argument in #20), iterating over the chunk lists. The oop* we are iterating on is at p=0x7f84b97abf3e, i.e. not 64 bit word aligned. This is, apart from the actual assert (which can be a bit random), unaligned. Only code roots should be unaligned in the chunk list. Closing as dup.
20-01-2020