JDK-8144732 : VM_HeapDumper hits assert with bad dump_len
  • Type: Bug
  • Component: hotspot
  • Sub-Component: svc
  • Affected Version: 9
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2015-12-04
  • Updated: 2024-10-24
  • Resolved: 2016-02-29
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 9 Other
9 b110Fixed openjdk8u252Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Relates :  
Relates :  
Sub Tasks
JDK-8174881 :  
Description
heapDumper doesn't check the size of segment while dumping an array. So if (bytes written to segment + length of array) > max_juint it overflows u4 segment length field and crash later on assert in heapDumper.cpp:

assert(dump_len >= 0 && dump_len <= max_juint) failed: bad dump length

Comments
The CSR has been approved. 8u review approval https://mail.openjdk.java.net/pipermail/jdk8u-dev/2020-January/011006.html.
23-01-2020

I had a look at this bug in terms of 8u approval. This message suggests there is a pending CSR: https://mail.openjdk.java.net/pipermail/jdk8u-dev/2019-December/010711.html Indeed, the CSR is in Draft state (JDK-8235300). Approvals can only happen once CSRs are approved. For the time being I'll remove the jdk8u-fix-request label. Please also add references to the 8u reviewer(s) in the fix request comment in the future and also a link where the patch got approved by the reviewer. This helps speed up the approval process.
17-12-2019

jdk8u fix request: I often found the heap dump files have the illegal format caused by some big array in our environment. This patch can resolve our problem, and I think it's also useful for others. Related discussion: https://mail.openjdk.java.net/pipermail/jdk8u-dev/2019-September/010351.html webrev: http://cr.openjdk.java.net/~ddong/8144732/hotspot.01
16-10-2019

URL: http://hg.openjdk.java.net/jdk9/jdk9/hotspot/rev/36aaa9ceed16 User: lana Date: 2016-03-14 15:54:56 +0000
14-03-2016

URL: http://hg.openjdk.java.net/jdk9/hs-rt/hotspot/rev/36aaa9ceed16 User: aeriksso Date: 2016-02-29 15:41:16 +0000
29-02-2016

Suggested release note: When dumping the heap in binary format, HPROF format 1.0.2 is always used now. Previously format 1.0.1 was used for heaps smaller than 2GB.
26-02-2016