Skip to content

8357089: Remove VFORK launch mechanism from Process implementation (linux) #25260

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

tstuefe
Copy link
Member

@tstuefe tstuefe commented May 16, 2025

Note: This PR is closed; the new PR is here: #25768

Not for JDK 25

See the companion CSR (https://bugs.openjdk.org/browse/JDK-8357090) for the ratio behind this removal.

Patch

  • removes all code handling the VFORK mode.
  • removes or rewrites comments explaining use of vfork by the JVM.
  • we now print out an error message to stderr if the user still specifies -Djdk.lang.Process.launchMechanism=vfork.

Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change requires a CSR request matching fixVersion 25 to be approved (needs to be created)

Warnings

 ⚠️ Patch contains a binary file (src/java.desktop/share/classes/java/awt/doc-files/BorderLayout-1.gif)
 ⚠️ Patch contains a binary file (src/java.desktop/share/classes/java/awt/doc-files/FlowLayout-1.gif)
 ⚠️ Patch contains a binary file (src/java.desktop/share/classes/java/awt/doc-files/GridBagLayout-1.gif)
 ⚠️ Patch contains a binary file (src/java.desktop/share/classes/java/awt/doc-files/GridBagLayout-2.gif)
 ⚠️ Patch contains a binary file (src/java.desktop/share/classes/java/awt/doc-files/GridLayout-1.gif)
 ⚠️ Patch contains a binary file (src/java.desktop/share/classes/java/awt/doc-files/GridLayout-2.gif)

Issue

  • JDK-8357089: Remove VFORK launch mechanism from Process implementation (linux) (Enhancement - P4)(⚠️ The fixVersion in this issue is [26] but the fixVersion in .jcheck/conf is 25, a new backport will be created when this pr is integrated.)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/25260/head:pull/25260
$ git checkout pull/25260

Update a local copy of the PR:
$ git checkout pull/25260
$ git pull https://git.openjdk.org/jdk.git pull/25260/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 25260

View PR using the GUI difftool:
$ git pr show -t 25260

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/25260.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented May 16, 2025

👋 Welcome back stuefe! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented May 16, 2025

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk openjdk bot changed the title JDK-8357089: Remove VFORK launch mechanism from Process implementation (linux) 8357089: Remove VFORK launch mechanism from Process implementation (linux) May 16, 2025
@openjdk openjdk bot added the csr Pull request needs approved CSR before integration label May 16, 2025
@openjdk
Copy link

openjdk bot commented May 16, 2025

@tstuefe The following label will be automatically applied to this pull request:

  • core-libs

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the core-libs core-libs-dev@openjdk.org label May 16, 2025
@tstuefe tstuefe marked this pull request as ready for review May 16, 2025 07:23
@openjdk openjdk bot added the rfr Pull request is ready for review label May 16, 2025
@mlbridge
Copy link

mlbridge bot commented May 16, 2025

Webrevs

@tstuefe
Copy link
Member Author

tstuefe commented May 16, 2025

I will delay this push for early JDK 26; hence back to draft state.

@tstuefe tstuefe marked this pull request as draft May 16, 2025 08:40
@openjdk openjdk bot removed the rfr Pull request is ready for review label May 16, 2025
Copy link
Contributor

@RogerRiggs RogerRiggs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delaying the removal to jdk 26 is good.
But there should be a warning/deprecation in JDK 25.

Comment on lines +99 to +107
// On Posix platforms, chose a launch mechanism (should be value of a LaunchMechanism enum)
if (OperatingSystem.current() != OperatingSystem.WINDOWS) {
String v = s.toUpperCase(Locale.ROOT);
if (v.equals("VFORK")) {
System.err.println("The VFORK launch mechanism has been removed; please either remove the " +
"jdk.lang.Process.launchMechanism property (preferred) or use " +
"-Djdk.lang.Process.launchMechanism=FORK instead.");
}
return LaunchMechanism.valueOf(v);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to check for Windows, Windows has a completely separate implementation. Its in the switch to make switch exhaustive.
The first change should just be deprecation, not removal, so output the message but continue.
The message should have some prefix that stands out ALL-CAPS or something big and ugly.

Copy link
Member Author

@tstuefe tstuefe May 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @RogerRiggs . Deprecation PR is out (including CSR and release note): Deprecation patch PR: #25282

I keep this one on hold until JDK 26.

@openjdk
Copy link

openjdk bot commented May 22, 2025

@tstuefe this pull request can not be integrated into master due to one or more merge conflicts. To resolve these merge conflicts and update this pull request you can run the following commands in the local repository for your personal fork:

git checkout Remove-VFORK-launch-mechanism-from-Process-implementation-linux-
git fetch https://git.openjdk.org/jdk.git master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push

@openjdk openjdk bot added the merge-conflict Pull request has merge conflict with target branch label May 22, 2025
@tstuefe
Copy link
Member Author

tstuefe commented Jun 12, 2025

I close this PR in favor of a new one I will open shortly for 26

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core-libs core-libs-dev@openjdk.org csr Pull request needs approved CSR before integration merge-conflict Pull request has merge conflict with target branch
Development

Successfully merging this pull request may close these issues.

2 participants