JDK-8129419 : heapDumper.cpp: assert(length_in_bytes > 0) failed: nothing to copy
  • Type: Bug
  • Component: hotspot
  • Sub-Component: svc
  • Affected Version: 7u80,9
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2015-06-22
  • Updated: 2016-07-21
  • Resolved: 2016-01-19
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 JDK 9
7u111Fixed 8u102Fixed 9 b105Fixed
Related Reports
Duplicate :  
Duplicate :  
Duplicate :  
Relates :  
Relates :  
Relates :  
Description
When dumping a heap that has big arrays java can crash.
A debug build fails on an assert in heapDumper.cpp.

Test:

public static void main (String[] args) throws IOException {
  long[] a = new long[268435456];
  // Sleep here and initiate a heapdump, for example with jcmd <pid> GC.heap_dump /tmp/dump.hprof

Error:

# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error ([...]/src/share/vm/services/heapDumper.cpp:1038)
#  assert(length_in_bytes > 0) failed: nothing to copy
...