JDK-8352533 : Report useful IOExceptions when jspawnhelper fails
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.lang
  • Affected Version: 17,21,25
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2025-03-20
  • Updated: 2025-09-03
  • Resolved: 2025-05-14
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 25
25 b23Fixed
Related Reports
Causes :  
Relates :  
Description
When jspawnhelper fails for whatever reason, but more prominently due to JDK-8325621, it will report the errors into stdout, but not to the relevant IOException. So, if the application is configured to only capture the exception logs (e.g. through java.util.logging), we will miss any output from jspawnhelper, it user would be left without a clue what have happened. We have seen customers spending weeks trying to figure out what went wrong.

It would be good to provide useful IOException when jspawnhelper fails. We already have a precedent with vmError printing helpful suggestions when VM fails, we can do the same here. Something like: https://github.com/openjdk/jdk/compare/master...shipilev:JDK-8352533-jspawnhelper-ioexceptions
Comments
[jdk21u-fix-request] Approval Request from Rui Li A clean backport for https://bugs.openjdk.org/browse/JDK-8352533 The current error message of jspawnhelper is only available in stdout, but not in IOException. Applications would miss the error message if stdout isn't captured. This change makes the error message available in exceptions. The risk is relatively low. On tip for over 3 months.
03-09-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk21u-dev/pull/2142 Date: 2025-09-03 02:27:06 +0000
03-09-2025

Changeset: 5c73dfc2 Branch: master Author: Aleksey Shipilev <shade@openjdk.org> Date: 2025-05-14 09:05:49 +0000 URL: https://git.openjdk.org/jdk/commit/5c73dfc28cbd6801ac85c6685fb8c77aad3ab0b7
14-05-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/24149 Date: 2025-03-21 10:00:26 +0000
21-03-2025