JDK-7181989 : NMT ON: Assertion failure when NMT checks thread's native stack base address
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: hs24,hs25
  • 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 (NMT is on for RT baseline)

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/tmp/jprt/P1/060514.daholme/s/src/share/vm/runtime/thread.hpp:532), pid=32295, tid=139860333405952
#  assert(_stack_base != NULL) failed: Sanity check
#
# JRE version: Java(TM) SE Runtime Environment (7.0_06-b16)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (24.0-b16-internal-201207030605.daholme.hotspot-rt-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
#
# 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 (0x00007f34200fc800):  JavaThread "rawmonitor-956" [_thread_in_vm, id=1207, stack(0x00007f33c56da000,0x00007f33c57db000)]

Stack: [0x00007f33c56da000,0x00007f33c57db000],  sp=0x00007f33c57d9000,  free space=1020k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0xcbc8b2]  VMError::report_and_die()+0x302
V  [libjvm.so+0x5f9444]  report_vm_error(char const*, int, char const*, char const*)+0x84
V  [libjvm.so+0x9de26f]  MemTracker::create_memory_record(unsigned char*, unsigned short, unsigned long, unsigned char*, Thread*)+0x32f
V  [libjvm.so+0xc55c47]  Thread::~Thread()+0x57
V  [libjvm.so+0xc5609c]  JavaThread::~JavaThread()+0x26c
V  [libjvm.so+0x859159]  JVM_StartThread+0x349
J  java.lang.Thread.start0()V

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
J  java.lang.Thread.start0()V
J  java.lang.Thread.start()V
J  nsk.jvmti.unit.functions.rawmonitor$TestThread.run()V
v  ~StubRoutines::call_stub

Comments
NOTE: Also ran with NMT ON (summary) CMD: ute -jdk /home/mseledtsov/home-shared/jdk/jdk7u40_b29/ -testbase /net/backpack/sqe/testbase/sqe/vm/7/build/execution/vm -test runtime/threads/ThreadsCreator -component vm -vmopts '-XX:NativeMemoryTracking=summary' RESULT: PASS
28-06-2013

Based on my past 2 comments, moving this bug to a verified state
27-06-2013

runtime/threads/ThreadsCreator ran 3 times, all pass Also ran nsk/jvmti/unit/functions/rawmonitor JDK: jdk7_u40 build 29 OS/ENV: Linux 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: /java/east/sqe/gtee/bin/ute -jdk ~/home-shared/jdk/jdk7u40_b29/ -test nsk/jvmti/unit/functions/rawmonitor -component vm -env EXCLUDE_LIST=my_exclude.list -bits d64 -jdkarch linux-amd64 RUNS: 3 RESULT: PASS
27-06-2013

Started verification process runtime/threads/ThreadsCreator - PASS JDK: jdk7_u40 build 29 OS/ENV: Linux 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: ute -jdk ~/home-shared/jdk/jdk7u40_b29/ -testbase /net/backpack/sqe/testbase/sqe/vm/7/build/execution/vm -test runtime/threads/ThreadsCreator -component vm
27-06-2013

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

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

EVALUATION The assertion is added by NMT to catch threads that do not call record_stack_base_and_size() to report their native stack info. But for threads that fail to start, no native stacks are created and the method is not called.
05-07-2012