[11u]: RFR CSR backport: JDK-8220362: Add "POSIX_SPAWN" as valid value to jdk.lang.Process.launchMechanism on Linux

Langer, Christoph christoph.langer at sap.com
Tue Mar 19 09:00:30 UTC 2019

Hm, I’m not sure about the “reconsideration” process… I restored jdk11u-fix-no, because it’s probably not in my powers to remove it. But still the request for reconsideration remains ��


From: Langer, Christoph
Sent: Dienstag, 19. März 2019 09:22
To: Thomas Stüfe <thomas.stuefe at gmail.com>; Andrew Haley <aph at redhat.com>
Cc: Java Core Libs <core-libs-dev at openjdk.java.net>; Alan Bateman <Alan.Bateman at oracle.com>; Roger Riggs <roger.riggs at oracle.com>; jdk-updates-dev at openjdk.java.net; David Lloyd <david.lloyd at redhat.com>
Subject: RE: [11u]: RFR CSR backport: JDK-8220362: Add "POSIX_SPAWN" as valid value to jdk.lang.Process.launchMechanism on Linux

I have removed the jdk11u-fix-no label from the bug and added a fix request comment to trigger reconsideration.


From: Thomas Stüfe <thomas.stuefe at gmail.com<mailto:thomas.stuefe at gmail.com>>
Sent: Dienstag, 19. März 2019 08:33
To: Andrew Haley <aph at redhat.com<mailto:aph at redhat.com>>
Cc: Langer, Christoph <christoph.langer at sap.com<mailto:christoph.langer at sap.com>>; Java Core Libs <core-libs-dev at openjdk.java.net<mailto:core-libs-dev at openjdk.java.net>>; Alan Bateman <Alan.Bateman at oracle.com<mailto:Alan.Bateman at oracle.com>>; Roger Riggs <roger.riggs at oracle.com<mailto:roger.riggs at oracle.com>>; jdk-updates-dev at openjdk.java.net<mailto:jdk-updates-dev at openjdk.java.net>; David Lloyd <david.lloyd at redhat.com<mailto:david.lloyd at redhat.com>>
Subject: Re: [11u]: RFR CSR backport: JDK-8220362: Add "POSIX_SPAWN" as valid value to jdk.lang.Process.launchMechanism on Linux

Hi Andrew,

This would be good to have in jdk11 for the following reason:

The established (since decades) method of forking off on Linux JDKs has been to use vfork(3). Using vfork is risky. There are chances of crashing the parent process. The risk of this happening is very low, but not zero. Since analyzing those crashes and attributing them to vfork(3) is very difficult, there may be a number of reported cases not associated with vfork(3) but in fact caused by it.

The patch adds a second, safer way to fork off childs, using posix_spawn(3). This one has been the default on other platforms for quite some while. The patch does not change the default fork mode - which remains vfork(3). So installations would not be affected unless they explicitely choose to use vfork(3).

Having this possibility would allow us to use posix_spawn(3) in situations where we are analysing crashes and want to exclude vfork(3) as a cause. It also would enable us to use posix_spawn(3) as a safe alternative by default if we choose to do so.

In addition to that, as David Loyd mentioned, vfork(3) is marked as obsolete and may be vanish at some point in the life span of JDK 11. I admit the chance of this happening is low.

Kind Regards, Thomas

On Fri, Mar 8, 2019 at 4:20 PM Andrew Haley <aph at redhat.com<mailto:aph at redhat.com>> wrote:
On 3/8/19 2:39 PM, Langer, Christoph wrote:
> please review the CSR backport https://bugs.openjdk.java.net/browse/JDK-8220362.
> It is the backport of https://bugs.openjdk.java.net/browse/JDK-8214511 to JDK11.
> We want to backport JDK-8212828<https://bugs.openjdk.java.net/browse/JDK-8212828> to jdk11u and hence backporting the CSR is a prerequisite. The CSR is, however, more or less identical for 11u.

I don't see any explanation of why this should go into jdk11.

Andrew Haley
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671

More information about the core-libs-dev mailing list