Skip to content

8310265: (process) jspawnhelper should not use argv[0] #1922

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

Closed
wants to merge 1 commit into from

Conversation

luhenry
Copy link
Member

@luhenry luhenry commented Oct 26, 2023

That patch makes sure that launching processes from Java works when running using QEMU user-space emulation. See
https://mail.openjdk.org/pipermail/core-libs-dev/2023-June/107738.html for details of the bug.

The backport doesn't apply cleanly.


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
  • JDK-8310265 needs maintainer approval

Issue

  • JDK-8310265: (process) jspawnhelper should not use argv[0] (Bug - P3 - Approved)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk17u-dev.git pull/1922/head:pull/1922
$ git checkout pull/1922

Update a local copy of the PR:
$ git checkout pull/1922
$ git pull https://git.openjdk.org/jdk17u-dev.git pull/1922/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 1922

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk17u-dev/pull/1922.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Oct 26, 2023

👋 Welcome back luhenry! 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 openjdk bot changed the title Backport 47d00a4cbeff5d757dda9c660dfd2385c02a57d7 8310265: (process) jspawnhelper should not use argv[0] Oct 26, 2023
@openjdk
Copy link

openjdk bot commented Oct 26, 2023

This backport pull request has now been updated with issue from the original commit.

@openjdk openjdk bot added backport rfr Pull request is ready for review labels Oct 26, 2023
@mlbridge
Copy link

mlbridge bot commented Oct 26, 2023

Webrevs

@luhenry
Copy link
Member Author

luhenry commented Oct 26, 2023

/approval request That fix is required for Java to launch new processes when running inside QEMU user space emulation. It is a requirement for some platforms (like riscv or s390x) as hardware or VMs are not largely available, and QEMU is the only available solutions on many CIs. The approach has been in JDK 21 and later for some time, and it's been validated to work.
The risk is also minimal since the patch only makes sure to follow the specification for posix_spawn and execve, which we didn't follow before.
The backport wasn't clean, but the conflicts are minimal and the logic straightforward.

@openjdk
Copy link

openjdk bot commented Oct 26, 2023

@luhenry
8310265: The approval request has been created successfully.

@openjdk openjdk bot added the approval label Oct 26, 2023
@GoeLin
Copy link
Member

GoeLin commented Oct 31, 2023

Thanks for the useful comment.
Please label again once you got a review.

@openjdk openjdk bot removed the approval label Oct 31, 2023
@luhenry
Copy link
Member Author

luhenry commented Oct 31, 2023

@tstuefe looks good to you?

Copy link
Member

@tstuefe tstuefe left a comment

Choose a reason for hiding this comment

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

All good.

@openjdk
Copy link

openjdk bot commented Oct 31, 2023

⚠️ @luhenry This change is now ready for you to apply for maintainer approval. This can be done directly in each associated issue or by using the /approval command.

@luhenry
Copy link
Member Author

luhenry commented Nov 1, 2023

/approval request

@openjdk
Copy link

openjdk bot commented Nov 1, 2023

@luhenry
8310265: The approval request has been updated successfully.

@luhenry
Copy link
Member Author

luhenry commented Nov 1, 2023

/approval request That fix is required for Java to launch new processes when running inside QEMU user space emulation. It is a requirement for some platforms (like riscv or s390x) as hardware or VMs are not largely available, and QEMU is the only available solutions on many CIs. The approach has been in JDK 21 and later for some time, and it's been validated to work.
The risk is also minimal since the patch only makes sure to follow the specification for posix_spawn and execve, which we didn't follow before.
The backport wasn't clean, but the conflicts are minimal and the logic straightforward.

@openjdk openjdk bot added the approval label Nov 1, 2023
@openjdk
Copy link

openjdk bot commented Nov 1, 2023

@luhenry
8310265: The approval request has been updated successfully.

@openjdk
Copy link

openjdk bot commented Nov 1, 2023

@luhenry This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8310265: (process) jspawnhelper should not use argv[0]

Reviewed-by: stuefe

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 15 new commits pushed to the master branch:

  • 594e5d7: 8312467: relax the builddir check in make/autoconf/basic.m4
  • 8922e52: 8312612: handle WideCharToMultiByte return values
  • 57bf412: 8308593: Add KEEPALIVE Extended Socket Options Support for Windows
  • 4a638cb: 8318705: [macos] ProblemList java/rmi/registry/multipleRegistries/MultipleRegistries.java
  • d61229d: 8314144: gc/g1/ihop/TestIHOPStatic.java fails due to extra concurrent mark with -Xcomp
  • 03e3232: 6445283: ProgressMonitorInputStream not large file aware (>2GB)
  • d7dd1f0: 8315499: build using devkit on Linux ppc64le RHEL puts path to devkit into libsplashscreen
  • 28e9fd3: 8313164: src/java.desktop/windows/native/libawt/windows/awt_Robot.cpp GetRGBPixels adjust releasing of resources
  • 03552ee: 8314883: Java_java_util_prefs_FileSystemPreferences_lockFile0 write result errno in missing case
  • 3af0c4f: 8317373: Add Telia Root CA v2
  • ... and 5 more: https://git.openjdk.org/jdk17u-dev/compare/8258f274649ca0ebecd92eabd2774689cd4e670e...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@tstuefe) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot added ready Pull request is ready to be integrated and removed approval labels Nov 1, 2023
@luhenry
Copy link
Member Author

luhenry commented Nov 2, 2023

/integrate

@luhenry
Copy link
Member Author

luhenry commented Nov 2, 2023

/backport jdk11u-dev

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Nov 2, 2023
@openjdk
Copy link

openjdk bot commented Nov 2, 2023

@luhenry
Your change (at version 81280eb) is now ready to be sponsored by a Committer.

@openjdk
Copy link

openjdk bot commented Nov 2, 2023

@luhenry Backport for repo openjdk/jdk11u-dev on branch master was successfully enabled and will be performed once this pull request has been integrated. Further instructions will be provided at that time.

@luhenry
Copy link
Member Author

luhenry commented Nov 5, 2023

Could I please get someone to sponsor the change? I don't have the required status to integrate it on my own cc @tstuefe @GoeLin . Thank you!

@tstuefe
Copy link
Member

tstuefe commented Nov 6, 2023

/sponsor

@openjdk
Copy link

openjdk bot commented Nov 6, 2023

Going to push as commit cd6cb73.
Since your change was applied there have been 18 commits pushed to the master branch:

  • d4ed7c2: 8318855: Extra file added by mistake during the backport of JDK-8283326
  • a273858: 8318669: Target OS detection in 'test-prebuilt' makefile target is incorrect when running on MSYS2
  • 348a703: 8318953: RISC-V: Small refactoring for MacroAssembler::test_bit
  • 594e5d7: 8312467: relax the builddir check in make/autoconf/basic.m4
  • 8922e52: 8312612: handle WideCharToMultiByte return values
  • 57bf412: 8308593: Add KEEPALIVE Extended Socket Options Support for Windows
  • 4a638cb: 8318705: [macos] ProblemList java/rmi/registry/multipleRegistries/MultipleRegistries.java
  • d61229d: 8314144: gc/g1/ihop/TestIHOPStatic.java fails due to extra concurrent mark with -Xcomp
  • 03e3232: 6445283: ProgressMonitorInputStream not large file aware (>2GB)
  • d7dd1f0: 8315499: build using devkit on Linux ppc64le RHEL puts path to devkit into libsplashscreen
  • ... and 8 more: https://git.openjdk.org/jdk17u-dev/compare/8258f274649ca0ebecd92eabd2774689cd4e670e...master

Your commit was automatically rebased without conflicts.

@openjdk
Copy link

openjdk bot commented Nov 6, 2023

Creating backport for repo openjdk/jdk11u-dev on branch master

/backport openjdk/jdk11u-dev master

@openjdk openjdk bot added integrated Pull request has been integrated and removed backport=openjdk/jdk11u-dev:master labels Nov 6, 2023
@openjdk openjdk bot closed this Nov 6, 2023
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review sponsor Pull request is ready to be sponsored labels Nov 6, 2023
@openjdk
Copy link

openjdk bot commented Nov 6, 2023

@tstuefe @luhenry Pushed as commit cd6cb73.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@openjdk
Copy link

openjdk bot commented Nov 6, 2023

@openjdk[bot] @luhenry the backport was successfully created on the branch luhenry-backport-cd6cb730 in my personal fork of openjdk/jdk11u-dev. To create a pull request with this backport targeting openjdk/jdk11u-dev:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit cd6cb730 from the openjdk/jdk17u-dev repository.

The commit being backported was authored by Ludovic Henry on 6 Nov 2023 and was reviewed by Thomas Stuefe.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk11u-dev:

$ git fetch https://github.com/openjdk-bots/jdk11u-dev.git luhenry-backport-cd6cb730:luhenry-backport-cd6cb730
$ git checkout luhenry-backport-cd6cb730
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk11u-dev.git luhenry-backport-cd6cb730

@luhenry luhenry deleted the luhenry-backport-47d00a4c branch November 6, 2023 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

3 participants