JDK-8213017 : jspawnhelper: need to handle pipe write failure when sending return code
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.lang
  • Affected Version: 8,11,12
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2018-10-26
  • Updated: 2020-07-27
  • Resolved: 2018-10-30
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 11 JDK 12
11.0.10-oracleFixed 12 b18Fixed
Related Reports
Duplicate :  
Description
jspawnhelper reports error codes back to the parent via pipe. 

That write may fail. We do not check the return code. On Linux, where I test experimental posix_spawn support, gcc complains:

/shared/projects/openjdk/jdk-jdk/source/src/java.base/unix/native/jspawnhelper/jspawnhelper.c:52:5: error: ignoring return value of ���write���, declared with attribute warn_unused_result [-Werror=unused-result]




Comments
Fix Request We have discovered this issue on jdk-11.0.4+2 when building openj9 variant using gcc 7.4. It makes sense to have the fix in 11u too to support future compiler upgrades. The patch applies cleanly to 11u, resolves the compiler warning, and passes tier1. The risk is low it only changes the error code in the edge error case."
31-05-2019

This is not exactly how backport process work: https://wiki.openjdk.java.net/display/JDKUpdates/How+to+contribute+a+fix I would be taking care of this one, once 11.0.5 tree opens.
29-05-2019

Fix Request for jdk11u: We have discovered this issue on jdk-11.0.4+2 when building openj9 variant using gcc 7.4. Please can this be backported for 11.0.4. thanks
17-05-2019