JDK-8319053 : Segment dump files remain after parallel heap dump on Windows
  • Type: Bug
  • Component: hotspot
  • Sub-Component: svc
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows
  • CPU: generic
  • Submitted: 2023-10-28
  • Updated: 2023-11-03
  • Resolved: 2023-11-03
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 22
22 masterFixed
Related Reports
Relates :  
Description
Segment file are not deleted after parallel heap dump on Windows

jcmd <pid> GC.heap_dump -parallel=2 parallelHeapDump.bin
produces parallelHeapDump.bin
and parallelHeapDump.bin.p0

Reproducer:
update test/hotspot/jtreg/serviceability/dcmd/gc/HeapDumpParallelTest.java
add the following check in checkAndVerify method:
		List<String> files
			= Stream.of(heapDumpFile.getAbsoluteFile().getParentFile().listFiles())
				.filter(file -> !file.isDirectory())
				.map(File::getName)
				.filter(name -> name.startsWith("parallelHeapDump.bin") && !name.equals("parallelHeapDump.bin"))
				.collect(Collectors.toList());
		if (!files.isEmpty()) {
			throw new RuntimeException("Unexpected files left: " + files);
		}

The test fails on Windows (release and debug) with
java.lang.RuntimeException: Unexpected files left: [parallelHeapDump.bin.p0]
Serment files are removed on unix platforms

Comments
Changeset: 29cf2c47 Author: Alex Menkov <amenkov@openjdk.org> Date: 2023-11-03 20:44:36 +0000 URL: https://git.openjdk.org/jdk/commit/29cf2c471bf046cd58bd6fefd617a2b03040d4ff
03-11-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/16462 Date: 2023-11-01 19:23:14 +0000
01-11-2023