United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7181986 NMT ON: Assertion failure when running jdi ExpiredRequestDeletionTest
JDK-7181986 : NMT ON: Assertion failure when running jdi ExpiredRequestDeletionTest

Details
Type:
Bug
Submit Date:
2012-07-05
Status:
Closed
Updated Date:
2013-06-28
Project Name:
JDK
Resolved Date:
2012-07-24
Component:
hotspot
OS:
linux
Sub-Component:
runtime
CPU:
x86
Priority:
P2
Resolution:
Fixed
Affected Versions:
hs24
Fixed Versions:
hs24 (b17)

Related Reports
Backport:
Backport:
Backport:
Backport:
Backport:

Sub Tasks

Description
07/03/2012 nightly test reported assertion failure when running jdi ExpiredRequestDeletionTest test:

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/tmp/jprt/P1/060514.daholme/s/src/share/vm/runtime/mutex.cpp:1181), pid=27311, tid=4149733056
#  assert((UNS(_owner)|UNS(_LockWord.FullWord)|UNS(_EntryList)|UNS(_WaitSet)|UNS(_OnDeck)) == 0) failed: 
#
# JRE version: Java(TM) SE Runtime Environment (7.0_06-b16)
# Java VM: Java HotSpot(TM) Server VM (24.0-b16-internal-201207030605.daholme.hotspot-rt-fastdebug compiled mode linux-x86 )
# Core dump written. Default location: /export/local/76220.JAVASE.NIGHTLY.VM.RT_Baseline.2012-07-03.linux-i586_javase__server_compd_JT_JDK_com_sun_jdi.runTests/results/workDir/com/sun/jdi/ExpiredRequestDeletionTest/core or core.27311
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.sun.com/bugreport/crash.jsp
#

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

Current thread is native thread

Stack: [0xff9d2000,0xffa22000],  sp=0xffa20600,  free space=313k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0xb5d1be]  VMError::report_and_die()+0x1ae;;  VMError::report_and_die()+0x1ae
V  [libjvm.so+0x5073e8]  report_vm_error(char const*, int, char const*, char const*)+0x68;;  report_vm_error(char const*, int, char const*, char const*)+0x68
V  [libjvm.so+0x92446f]  Mutex::~Mutex()+0xaf;;  Mutex::~Mutex()+0xaf
C  [libc.so.6+0x2dbe1]  __run_exit_handlers+0xc1
C  [libc.so.6+0x2dc3f]  __GI_exit+0x2f
C  [libc.so.6+0x16bed]  __libc_start_main+0xed

                                    

Comments
EVALUATION

This appears to be racing condition:
  - NMT worker thread is calling final_shutdown, which takes _query_lock to cleanup baseline and snapshot
  - C runtime is running exit handler to cleanup static variables, and _query_lock is a static variable


The solution is to make _query_lock a heap object. The drawback is that, NMT may not be able to delete this lock during normal NMT shutdown.
                                     
2012-07-05
EVALUATION

http://hg.openjdk.java.net/hsx/hotspot-rt/hotspot/rev/f1f45dddb0bd
                                     
2012-07-19
EVALUATION

http://hg.openjdk.java.net/hsx/hotspot-emb/hotspot/rev/f1f45dddb0bd
                                     
2012-07-24
JDK: jdk7 build 29
OS/ENV: mseledtsov-VirtualBox 3.2.0-29-generic #46-Ubuntu SMP Fri Jul 27 17:03:23 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
CMD: ~/home-shared/jdk/jdk7u40_b29/bin/java -jar ~/test/jtreg/lib/jtreg.jar -XX:NativeMemoryTracking=summary ~/home-shared/hg-reposit/jdk7u_t2_clean/test/com/sun/jdi/ExpiredRequestDeletionTest.java
RUNS: 3 
RESULT: PASS

                                     
2013-06-28



Hardware and Software, Engineered to Work Together