JDK-8009986 : SIGSEGV at os::free(void*,unsigned short) on solaris
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: hs25
  • Priority: P2
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris
  • Submitted: 2013-03-13
  • Updated: 2023-07-21
  • Resolved: 2023-07-21
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
hs25Resolved
Related Reports
Relates :  
Description
test java/util/NavigableMap/LockStep crash on solaris-amd64
vopts: -d64 -server -Xcomp -XX:TraceRedefineClasses=8192

## nof_mallocs = 211491, nof_frees = 67880
## memory stomp: byte at 0x00000000016b1670 in front of object 0x00000000016b1688
### previous object (not sure if correct): 0x00000000016b0c26 (1559269212160 bytes)
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0xffff80ffb9e78cb1, pid=12473, tid=10
#
# JRE version: Java(TM) SE Runtime Environment (8.0-b80) (build 1.8.0-ea-fastdebug-b80)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.0-b21-fastdebug compiled mode solaris-amd64 compressed oops)
# Problematic frame:
# V  [libjvm.so+0x1fd8cb1]  void os::free(void*,unsigned short)+0x269
#
# Core dump written. Default location: /var/tmp/iignatye/core or core.12473
#
# An error report file with more information is saved as:
# /var/tmp/iignatye/hs_err_pid12473.log
 Locks owned:
Mutex: [0x426ef8/0xf9ae01] CodeCache_lock - owner: 0xf9d000

Stack: [0xffff80ffbd2ff000,0xffff80ffbd3ff000],  sp=0xffff80ffbd3fe100,  free space=1020k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x1fd8cb1]  void os::free(void*,unsigned short)+0x269
V  [libjvm.so+0xd2c098]  void CodeBlob::flush()+0x34
V  [libjvm.so+0x1edd378]  void nmethod::flush()+0x1f0
V  [libjvm.so+0x23aa2c6]  void NMethodSweeper::release_nmethod(nmethod*)+0x616
V  [libjvm.so+0x23aab4d]  void NMethodSweeper::process_nmethod(nmethod*)+0x3c1
V  [libjvm.so+0x23a996b]  void NMethodSweeper::sweep_code_cache()+0x61b
V  [libjvm.so+0x23a92c8]  void NMethodSweeper::possibly_sweep()+0x1b4
V  [libjvm.so+0xdb6add]  CompileTask*CompileQueue::get()+0x19
V  [libjvm.so+0xdb9680]  void CompileBroker::compiler_thread_loop()+0x1fc
V  [libjvm.so+0x2454c77]  void JavaThread::thread_main_inner()+0x507
V  [libjvm.so+0x24543ec]  void JavaThread::run()+0x810
V  [libjvm.so+0x1fe3726]  java_start+0x1ce
C  [libc.so.1+0x121545]  _thrp_setup+0xa5
C  [libc.so.1+0x1217f0]  _lwp_start+0x0

Comments
Upon further investigation I determined (with the help of Vladimir Kozlov - Thanks, Vladimir!) that this failure is the same as https://jbs.oracle.com/bugs/browse/JDK-8003268
11-06-2013

Bharadwaj, I have checked, it also reproduced on slc05ghl(SunOS slc05ghl 5.11 11.1 i86pc i386 i86pc), but these two hosts are VM (Xen domU). $ /usr/sbin/prtdiag | head -n 2 System Configuration: Xen HVM domU BIOS Configuration: Xen 3.4.0 05/13/2011 I will try to find physical host w/ Solaris 11.1 and double check on it.
06-06-2013

Igor, can you please check if this failure can be reproduced on a Solaris x86_64 11.1 machine other than slc03suk? It appears that the failure is either due to memory stomp or cache coherence issue. I see the app crash at different places for different runs. I also see that it passes occasionally.
05-06-2013

The test fails rather consistently on 11.1 - while occasionally running without the crash. When it crashes, it appears to be while releasing memory for nmethod of com.oracle.security.ucrypto.NativeDigest$DigestContextRef::<init>. Running the test with additional option -XX:CompileOnly=com/oracle/security/ucrypto results in a crash with the following stack trace. Stack: [0xffff80ffbc6fb000,0xffff80ffbc7fb000], sp=0xffff80ffbc7f75d0, free space=1009k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) V [libjvm.so+0x1c0062c] void VMError::report(outputStream*)+0x143c V [libjvm.so+0x1c01f54] void VMError::report_and_die()+0x764 V [libjvm.so+0x1343dfa] void report_vm_error(const char*,int,const char*,const char*)+0x9a V [libjvm.so+0x1343e32] void report_fatal(const char*,int,const char*)+0x32 V [libjvm.so+0x1ab8cec] void SignatureIterator::expect(char)+0x8c V [libjvm.so+0x1ab94ce] void SignatureIterator::iterate_parameters()+0x3e V [libjvm.so+0x136e54f] void SignatureInfo::lazy_iterate_parameters()+0x2f V [libjvm.so+0x136c88a] int ArgumentSizeComputer::size()+0x1a V [libjvm.so+0x144d280] oopDesc**frame::interpreter_callee_receiver_addr(Symbol*)+0x30 V [libjvm.so+0x15da9e2] oopDesc*frame::interpreter_callee_receiver(Symbol*)+0x22 V [libjvm.so+0x15d3af4] void InterpreterRuntime::resolve_invoke(JavaThread*,Bytecodes::Code)+0x354
24-05-2013

OK. Thanks. I'll debug it on the Solaris 11.1 machine you provided.
22-05-2013

Thanks for the commands, Igor. I do not see the failure using the commands you provided either. Wondering if it is a Solaris version 5.11.0 vs 5.11.1 issue. I do not have access to a amd64 machine running 5.11.1. Can you check? $ uname -a SunOS hsdev-7 5.11 11.0 i86pc i386 i86pc $ echo $JAVA_HOME /net/sqenfs-1/export1/jdk/re/8/promoted/latest/binaries/solaris-amd64/ $ echo $JTREG_HOME /net/sqenfs-1/export1/comp/vm/tool/jtreg/execution $ $JAVA_HOME/bin/java -XinternalversionJava HotSpot(TM) Server VM (25.0-b32) for solaris-x86 JRE (1.8.0-ea-b90), built on May 16 2013 15:19:25 by "" with Sun Studio 12u1 $ hostname hsdev-7 $ /net/sqenfs-1/export1/comp/vm/gtee.aurora/bin/ute -jdk $JAVA_HOME -component javase -testbase /net/sqenfs-1/export1/comp/vm/testbase/jtreg/8/JT_JDK/ -test java/util/NavigableMap -vmopts "-d64 -server -Xcomp -XX:TraceRedefineClasses=8192" INFO STABLE_VMOPTS is set, use user suplied value -XX:+UseSerialGC -Xmx256M WARN sudo is not found, will not use it WARN Unable to find a way to execute command as superuser INFO Creating exclude list INFO Creating known failure list INFO JTR_IF_PASSED is set, use user suplied value true Directory "/net/hsdev-8/export/home/byadaval/8009986/report" not found: creating Directory "/net/hsdev-8/export/home/byadaval/8009986/workDir/scratch" not found: creating Passed: java/util/NavigableMap/LockStep.java Test results: passed: 1 Report written to /net/hsdev-8/export/home/byadaval/8009986/report/html/report.html Results written to /net/hsdev-8/export/home/byadaval/8009986/workDir real 1m1.689s user 0m49.372s sys 0m4.677s INFO Harness finished with exit code 0 INFO Generating COF file... INFO Cleaning up result directory: *.class files INFO Cleaning up result directory: misc files INFO Cleaning up result directory: empty subdirectories INFO Cleaning up result directory: html report INFO Gathering information for Aurora. INFO Aurora collect: /net/hsdev-8/export/home/byadaval/8009986 INFO Launching system (host) info gatherer INFO Launching jre info gatherer $
22-05-2013

I tried once again several times but am unable to reproduce it. The command line I used and results I get are as I noted in my earlier comment. Can you look at the command line I used? Can you provide the command line that you used - if different - to reproduce this failure?
21-05-2013

test triggers another assert with b90. i'm not sure that it's the same problem, but test failed only with added '-XX:TraceRedefineClasses' #section:main ----------messages:(3/104)---------- command: main LockStep reason: User specified action: run main LockStep elapsed time (seconds): 50.753 ----------System.out:(18/781)---------- # # A fatal error has been detected by the Java Runtime Environment: # # SIGSEGV (0xb) at pc=0xffff80ffbc59bb5e, pid=17288, tid=13 # # JRE version: Java(TM) SE Runtime Environment (8.0-b90) (build 1.8.0-ea-b90) # Java VM: Java HotSpot(TM) 64-Bit Server VM (25.0-b32 compiled mode solaris-amd64 compressed oops) # Problematic frame: # V [libjvm.so+0x112bb5e] oopDesc*StringTable::intern(Symbol*,Thread*)+0x1d6 # # Core dump written. Default location: /var/tmp/iignatye/workDir/java/util/NavigableMap/LockStep/core or core.17288 # # An error report file with more information is saved as: # /var/tmp/iignatye/workDir/java/util/NavigableMap/LockStep/hs_err_pid17288.log # # If you would like to submit a bug report, please visit: # http://bugreport.sun.com/bugreport/crash.jsp # Stack: [0xffff80ffbcb9f000,0xffff80ffbcc9f000], sp=0xffff80ffbcc9c0b0, free space=1012k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) V [libjvm.so+0x112bb5e] oopDesc*StringTable::intern(Symbol*,Thread*)+0x1d6 V [libjvm.so+0x8c48f1] void ConstantPool::resolve_string_constants_impl(constantPoolHandle,Thread*)+0x3b9 V [libjvm.so+0x865a96] void ConstantPool::resolve_string_constants(Thread*)+0x246 V [libjvm.so+0x85fc4b] nmethod*CompileBroker::compile_method(methodHandle,int,int,methodHandle,int,const char*,Thread*)+0x75f V [libjvm.so+0xb3cffd] void JavaCalls::call_helper(JavaValue*,methodHandle*,JavaCallArguments*,Thread*)+0x471 V [libjvm.so+0xb3cb81] void JavaCalls::call(JavaValue*,methodHandle,JavaCallArguments*,Thread*)+0x25 V [libjvm.so+0xa8cb9b] void InstanceKlass::call_class_initializer_impl(instanceKlassHandle,Thread*)+0x3c7 V [libjvm.so+0xa886cb] void InstanceKlass::initialize(Thread*)+0x85b V [libjvm.so+0xa882fc] void InstanceKlass::initialize(Thread*)+0x48c V [libjvm.so+0xdd342b] void LinkResolver::resolve_static_call(CallInfo&,KlassHandle&,Symbol*,Symbol*,KlassHandle,bool,bool,Thread*)+0x137 V [libjvm.so+0xddc23b] void LinkResolver::resolve_invokestatic(CallInfo&,constantPoolHandle,int,Thread*)+0x41f V [libjvm.so+0xddb735] void LinkResolver::resolve_invoke(CallInfo&,Handle,constantPoolHandle,int,Bytecodes::Code,Thread*)+0x399 V [libjvm.so+0xb2b091] void InterpreterRuntime::resolve_invoke(JavaThread*,Bytecodes::Code)+0xe05 j sun.util.resources.LocaleData$1.run()Ljava/util/ResourceBundle;+8 J sun.util.resources.LocaleData$1.run()Ljava/lang/Object; V [libjvm.so+0xb3d5b2] void JavaCalls::call_helper(JavaValue*,methodHandle*,JavaCallArguments*,Thread*)+0xa26 V [libjvm.so+0xb3cb81] void JavaCalls::call(JavaValue*,methodHandle,JavaCallArguments*,Thread*)+0x25 V [libjvm.so+0xc34b76] JVM_DoPrivileged+0xa16 C [libjava.so+0xffcf] Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2+0xf J java.security.AccessController.doPrivileged(Ljava/security/PrivilegedAction;)Ljava/lang/Object; j sun.util.resources.LocaleData.getBundle(Ljava/lang/String;Ljava/util/Locale;)Ljava/util/ResourceBundle;+9 j sun.util.resources.LocaleData.getNumberFormatData(Ljava/util/Locale;)Ljava/util/ResourceBundle;+26
21-05-2013

Can not reproduce with b90 as noted in earlier comment. Test passes.
20-05-2013

I am unable to reproduce the crash with b90. $ uname -a SunOS hsdev-8 5.10 Generic_127128-11 i86pc i386 i86pc $ /export/home/byadaval/jdk-builds/b90/bin/java -Xinternalversion Java HotSpot(TM) Server VM (25.0-b32) for solaris-x86 JRE (1.8.0-ea-b90), built on May 16 2013 15:19:25 by "" with Sun Studio 12u1 /export/home/byadaval/jtreg/4.1-b06/solaris/bin/jtreg -jdk:/export/home/byadaval/jdk-builds/b90 -va -vmoptions:'-d64 -server -Xcomp -XX:TraceRedefineClasses=8192' -agentvm -timeout:10 java/util/NavigableMap/LockStep.java TEST: java/util/NavigableMap/LockStep.java JDK under test: (/export/home/byadaval/jdk-builds/b90) java version "1.8.0-ea" Java(TM) SE Runtime Environment (build 1.8.0-ea-b90) Java HotSpot(TM) 64-Bit Server VM (build 25.0-b32, compiled mode) ACTION: build -- Passed. Build successful REASON: Named class compiled on demand TIME: 30.051 seconds messages: command: build LockStep reason: Named class compiled on demand elapsed time (seconds): 30.051 ACTION: compile -- Passed. Compilation successful REASON: .class file out of date or does not exist TIME: 30.03 seconds messages: command: compile -XDignore.symbol.file=true /export/home/byadaval/jdk8-tl/jdk/test/java/util/NavigableMap/LockStep.java reason: .class file out of date or does not exist elapsed time (seconds): 30.03 ACTION: main -- Passed. Execution successful REASON: User specified action: run main LockStep TIME: 9.715 seconds messages: command: main LockStep reason: User specified action: run main LockStep elapsed time (seconds): 9.715 STDOUT: Passed = 285836, failed = 0 STDERR: JavaTest Message: Test complete. ACTION: build -- Passed. All files up to date REASON: Named class compiled on demand TIME: 0.0 seconds messages: command: build LockStep reason: Named class compiled on demand elapsed time (seconds): 0.0 ACTION: main -- Passed. Execution successful REASON: User specified action: run main/othervm -XX:+AggressiveOpts LockStep TIME: 14.633 seconds messages: command: main -XX:+AggressiveOpts LockStep reason: User specified action: run main/othervm -XX:+AggressiveOpts LockStep elapsed time (seconds): 14.633 STDOUT: Passed = 389040, failed = 0 STDERR: STATUS:Passed. ACTION: build -- Passed. All files up to date REASON: Named class compiled on demand TIME: 0.0 seconds messages: command: build LockStep reason: Named class compiled on demand elapsed time (seconds): 0.0 ACTION: main -- Passed. Execution successful REASON: User specified action: run main/othervm -XX:+AggressiveOpts -Dthorough=true LockStep TIME: 16.06 seconds messages: command: main -XX:+AggressiveOpts -Dthorough=true LockStep reason: User specified action: run main/othervm -XX:+AggressiveOpts -Dthorough=true LockStep elapsed time (seconds): 16.06 STDOUT: Passed = 1143325, failed = 0 STDERR: STATUS:Passed. TEST RESULT: Passed. Execution successful -------------------------------------------------- Test results: passed: 1
17-05-2013

crash reproduced both with -XX:TraceRedefineClasses=8192 and with -XX:TraceRedefineClasses=-8193
13-03-2013