JDK-8055289 : Internal Error: mallocTracker.cpp:146 fatal error: Should not use malloc for big memory block, use virtual memory instead
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 8u40,9
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2014-08-18
  • Updated: 2015-06-03
  • Resolved: 2014-09-04
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
8u40Fixed 9 b32Fixed
Related Reports
Relates :  
Description
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/opt/jprt/T/P1/162542.amurillo/s/hotspot/src/share/vm/services/mallocTracker.cpp:146), pid=5369, tid=4152154992
#  fatal error: Should not use malloc for big memory block, use virtual memory instead
#
# JRE version: Java(TM) SE Runtime Environment (9.0-b26) (build 1.9.0-internal-fastdebug-201408151625.amurillo.jdk9-hs-2014-08-15-b26)
# Java VM: Java HotSpot(TM) Client VM (1.9.0-internal-fastdebug-201408151625.amurillo.jdk9-hs-2014-08-15-b26 compiled mode linux-x86 )
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#

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

Current thread (0xf6407c00):  JavaThread "main" [_thread_in_vm, id=5374, stack(0xf777d000,0xf77ce000)]

Stack: [0xf777d000,0xf77ce000],  sp=0xf77cc9b0,  free space=318k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0xa9d808]  VMError::report_and_die()+0x198
V  [libjvm.so+0x3c7579]  report_fatal(char const*, int, char const*)+0x79
V  [libjvm.so+0x7da510]  MallocTracker::record_malloc(void*, unsigned int, MemoryType, NativeCallStack const&, NMT_TrackingLevel)+0x1c0
V  [libjvm.so+0x8a4558]  os::malloc(unsigned int, MemoryType, NativeCallStack const&)+0x288
V  [libjvm.so+0x8a46f6]  os::malloc(unsigned int, MemoryType)+0x76
V  [libjvm.so+0xa5e01a]  Unsafe_AllocateMemory+0x26a
J 138  sun.misc.Unsafe.allocateMemory(J)J (0 bytes) @ 0xf4599632 [0xf45995a0+0x92]
J 137 C1 nsk.serial.Unsafe.allocateMemory.allocmem001.run([Ljava/lang/String;Ljava/io/PrintStream;)I (437 bytes) @ 0xf4594404 [0xf4593240+0x11c4]
J 136 C1 nsk.serial.Unsafe.allocateMemory.allocmem001.main([Ljava/lang/String;)V (14 bytes) @ 0xf45926cc [0xf45926b0+0x1c]
v  ~StubRoutines::call_stub
V  [libjvm.so+0x59277b]  JavaCalls::call_helper(JavaValue*, methodHandle*, JavaCallArguments*, Thread*)+0xa5b
V  [libjvm.so+0x8b3fd4]  os::os_exception_wrapper(void (*)(JavaValue*, methodHandle*, JavaCallArguments*, Thread*), JavaValue*, methodHandle*, JavaCallArguments*, Thread*)+0x24
V  [libjvm.so+0x590618]  JavaCalls::call(JavaValue*, methodHandle, JavaCallArguments*, Thread*)+0x78
V  [libjvm.so+0x600fd8]  jni_invoke_static(JNIEnv_*, JavaValue*, _jobject*, JNICallType, _jmethodID*, JNI_ArgumentPusher*, Thread*) [clone .isra.191] [clone .constprop.227]+0x5d8
V  [libjvm.so+0x624a6d]  jni_CallStaticVoidMethod+0x31d
C  [libjli.so+0x65b8]  JavaMain+0x768
C  [libpthread.so.0+0x6a49]
C  [libc.so.6+0xdee1e]  clone+0x5e

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
J 138  sun.misc.Unsafe.allocateMemory(J)J (0 bytes) @ 0xf45995ee [0xf45995a0+0x4e]
J 137 C1 nsk.serial.Unsafe.allocateMemory.allocmem001.run([Ljava/lang/String;Ljava/io/PrintStream;)I (437 bytes) @ 0xf4594404 [0xf4593240+0x11c4]
J 136 C1 nsk.serial.Unsafe.allocateMemory.allocmem001.main([Ljava/lang/String;)V (14 bytes) @ 0xf45926cc [0xf45926b0+0x1c]
v  ~StubRoutines::call_stub



Comments
Could we make this not look like a crash?
18-08-2014

ILW HLL = P4 I: High, Fatal error, looks like a crash L: Low, Only happens when mallocing more than 1gb memory using Unsafe W: Low, Don't allocate 1gb using Unsafe when running with NMT on
18-08-2014