JDK-8005873 : JRuby test_respond_to.rb asserts with: MT-unsafe modification of inline cache
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: hs25,8,8u20
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2013-01-08
  • Updated: 2014-12-11
  • Resolved: 2014-06-03
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.
JDK 8 JDK 9
8u20Fixed 9 b17Fixed
Related Reports
Duplicate :  
Duplicate :  
Relates :  
Relates :  
Description
Running test_respond_to.rb in a loop with a fastdebug build can results in the following assert:

terminus:~/jruby$ while [ $? -eq 0 ]; do jruby -J-showversion -J-d64 --server -J-XX:+UseCompressedOops -J-Xcomp -J-XX:+DeoptimizeRandom test/test_respond_to.rb ; done
...
java version "1.8.0-ea"
Java(TM) SE Runtime Environment (build 1.8.0-ea-b71)
Java HotSpot(TM) 64-Bit Server VM (build 25.0-b15-internal-fastdebug, compiled mode)

Run options: 

# Running tests:

.# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc:  SuppressErrorAt=/compiledIC.cpp:567
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/home/cthaling/8005418/src/share/vm/code/compiledIC.cpp:567), pid=13735, tid=93
#  assert(method_holder->data() == 0 || method_holder->data() == (intptr_t)callee()) failed: a) MT-unsafe modification of inline cache
#
# JRE version: Java(TM) SE Runtime Environment (8.0-b71) (build 1.8.0-ea-b71)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.0-b15-internal-fastdebug compiled mode solaris-sparc compressed oops)
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /home/cthaling/jruby/hs_err_pid13735.log
 Locks owned:
Mutex: [0x10017a218/0x1] Patching_lock - owner: 0x105cc1800
Mutex: [0x10017bf58/0x101f75e01] CompiledIC_lock - owner: 0x105cc1800
 Locks owned:
Mutex: [0x10017a218/0x1] Patching_lock - owner: 0x105cc1800
Mutex: [0x10017bf58/0x101f75e01] CompiledIC_lock - owner: 0x105cc1800
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.sun.com/bugreport/crash.jsp
#
Current thread is 93
Dumping core ...
Abort

Comments
The following test: vm/mlvm/meth/stress/jni/nativeAndMH The test failed in the JDK 8 nightly tests. Test URL: http://aurora.ru.oracle.com/functional/faces/RunDetails.xhtml?names=344623.JAVASE.NIGHTLY.VM.Main_Baseline_jdk8.2014-01-10-79&show-limit=0&filter= [2014-01-11T14:11:41.59] # A fatal error has been detected by the Java Runtime Environment: [2014-01-11T14:11:41.59] # [2014-01-11T14:11:41.59] # Internal Error (/opt/jprt/T/P1/171759.hseigel/s/src/cpu/x86/vm/compiledIC_x86.cpp:134), pid=7462, tid=139717808641792 [2014-01-11T14:11:41.59] # assert(method_holder->data() == 0 || method_holder->data() == (intptr_t)callee()) failed: a) MT-unsafe modification of inline cache [2014-01-11T14:11:41.59] # [2014-01-11T14:11:41.59] # JRE version: Java(TM) SE Runtime Environment (8.0-b122) (build 1.8.0-ea-fastdebug-b122) [2014-01-11T14:11:41.59] # Java VM: Java HotSpot(TM) 64-Bit Server VM (25.0-b66-internal-201401101717.hseigel.bug_8031059_main-fastdebug compiled mode linux-amd64 compressed oops) [2014-01-11T14:11:41.59] # Core dump written. Default location: /export/local/aurora/sandbox/results/ResultDir/nativeAndMH/core or core.7462 See attached hs_err file attached JDK-803200.
22-01-2014

RULE vm/mlvm/meth/stress/compiler/i2c_c2i Crash Internal Error ...compiledIC_x86.cpp...assert(method_holder->data() == ... || method_holder->data() == (intptr_t)callee()) failed: a) MT-unsafe modification of inline cache RULE vm/mlvm/meth/stress/compiler/i2c_c2i ExitCode 134
10-10-2013

One odd thing about both attached hs_err files is the metadata and code cache section: Heap PSYoungGen total 121280K, used 111273K [0x00000007f5800000, 0x00000007fd800000, 0x0000000800000000) eden space 115520K, 92% used [0x00000007f5800000,0x00000007fbfca798,0x00000007fc8d0000) from space 5760K, 86% used [0x00000007fce60000,0x00000007fd340000,0x00000007fd400000) to space 5696K, 0% used [0x00000007fc8d0000,0x00000007fc8d0000,0x00000007fce60000) ParOldGen total 73728K, used 5642K [0x00000007e0c00000, 0x00000007e5400000, 0x00000007f5800000) object space 73728K, 7% used [0x00000007e0c00000,0x00000007e11829c8,0x00000007e5400000) [error occurred during error reporting (printing heap information), id 0xe0000000] Code Cache [0xffffffff70000000, 0xffffffff71c30000, 0xffffffff76000000) [error occurred during error reporting (printing code cache information), id 0xe0000000] It should look something like: Heap PSYoungGen total 78848K, used 43705K [0x00000007f5800000, 0x00000007fb000000, 0x0000000800000000) eden space 67584K, 64% used [0x00000007f5800000,0x00000007f82ae5e8,0x00000007f9a00000) from space 11264K, 0% used [0x00000007f9a00000,0x00000007f9a00000,0x00000007fa500000) to space 11264K, 0% used [0x00000007fa500000,0x00000007fa500000,0x00000007fb000000) ParOldGen total 73728K, used 5626K [0x00000007e0c00000, 0x00000007e5400000, 0x00000007f5800000) object space 73728K, 7% used [0x00000007e0c00000,0x00000007e117e8f0,0x00000007e5400000) Metaspace total 35752K, used 31523K, reserved 135168K data space 29268K, used 26959K, reserved 32768K class space 6484K, used 4564K, reserved 102400K Card table byte_map: [0xffffffff77200000,0xffffffff772fc000] byte_map_base: 0xffffffff732fa000 Polling page: 0xffffffff7d400000 Code Cache [0xffffffff70000000, 0xffffffff71ac0000, 0xffffffff76000000) total_blobs=12922 nmethods=12482 adapters=343 free_code_cache=71760Kb largest_free_block=72676544
10-01-2013

I augmented the assert message: java version "1.8.0-ea" Java(TM) SE Runtime Environment (build 1.8.0-ea-b71) Java HotSpot(TM) 64-Bit Server VM (build 25.0-b15-internal-fastdebug, compiled mode) Run options: # Running tests: .# To suppress the following error report, specify this argument # after -XX: or in .hotspotrc: SuppressErrorAt=/compiledIC.cpp:569 # # A fatal error has been detected by the Java Runtime Environment: # # Internal Error (/home/cthaling/hotspot/src/share/vm/code/compiledIC.cpp:569), pid=29403, tid=100 # assert(method_holder->data() == 0 || method_holder->data() == (intptr_t)callee()) failed: a) MT-unsafe modification of inline cache: method_holder=0xffffffff71879ee0, method_holder->data()=0xffffffff664ba230, callee=0xffffffff6ba01230 # # JRE version: Java(TM) SE Runtime Environment (8.0-b71) (build 1.8.0-ea-b71) # Java VM: Java HotSpot(TM) 64-Bit Server VM (25.0-b15-internal-fastdebug compiled mode solaris-sparc compressed oops) # Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again # # An error report file with more information is saved as: # /home/cthaling/jruby/hs_err_pid29403.log Locks owned: Mutex: [0x10017a388/0x101f7d501] Patching_lock - owner: 0x10590e800 Mutex: [0x10017c0c8/0x106777401] CompiledIC_lock - owner: 0x10590e800 Locks owned: Mutex: [0x10017a388/0x101f7d501] Patching_lock - owner: 0x10590e800 Mutex: [0x10017c0c8/0x106777401] CompiledIC_lock - owner: 0x10590e800 # # If you would like to submit a bug report, please visit: # http://bugreport.sun.com/bugreport/crash.jsp # Current thread is 100 Dumping core ... Abort
10-01-2013

I've seen this behavior with 7u4 on Linux as well so it's probably not related to the JSR 292 implementation (comment copied from 7103468): A test run with 7u4-ea on linux-x64 triggered this assert: sc14ia06:~/mlvm/jruby$ jruby -J-showversion -J-d64 --server -J-XX:+UseCompressedOops -J-Xcomp -J-XX:+DeoptimizeRandom test/test_respond_to.rb java version "1.7.0_04-ea-fastdebug" Java(TM) SE Runtime Environment (build 1.7.0_04-ea-fastdebug-b13) Java HotSpot(TM) 64-Bit Server VM (build 23.0-b16-fastdebug, compiled mode) Loaded suite test/test_respond_to Started .# To suppress the following error report, specify this argument # after -XX: or in .hotspotrc: SuppressErrorAt=/compiledIC.cpp:530 # # A fatal error has been detected by the Java Runtime Environment: # # Internal Error (/HUDSON/workspace/jdk7u4-2-build-linux-amd64-product/jdk7u4/hotspot/src/share/vm/code/compiledIC.cpp:530), pid=7225, tid=140017361913616 # assert(method_holder->data() == 0 || method_holder->data() == (intptr_t)callee()) failed: a) MT-unsafe modification of inline cache # # JRE version: 7.0_04-b13 # Java VM: Java HotSpot(TM) 64-Bit Server VM (23.0-b16-fastdebug compiled mode linux-amd64 compressed oops) # Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again # # An error report file with more information is saved as: # /home/cthaling/mlvm/jruby/hs_err_pid7225.log
08-01-2013