JDK-7181986 : NMT ON: Assertion failure when running jdi ExpiredRequestDeletionTest
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: hs24
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: linux
  • CPU: x86
  • Submitted: 2012-07-05
  • Updated: 2013-06-28
  • Resolved: 2012-07-24
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 7 JDK 8 Other
7u40Fixed 8Fixed hs24Fixed
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
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
28-06-2013

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

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

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.
05-07-2012