Skip to content

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

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

Conversation

luhenry
Copy link
Member

@luhenry luhenry commented Nov 6, 2023

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!


Progress

  • 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)

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 2255

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

Using diff file

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

Webrev

Link to Webrev Comment

@luhenry
Copy link
Member Author

luhenry commented Nov 6, 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.

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 6, 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 cd6cb730c934d8e16d4bd8e3342e59e806f158f9 8310265: (process) jspawnhelper should not use argv[0] Nov 6, 2023
@openjdk
Copy link

openjdk bot commented Nov 6, 2023

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

@openjdk
Copy link

openjdk bot commented Nov 6, 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.

@openjdk openjdk bot added the rfr Pull request is ready for review label Nov 6, 2023
@openjdk
Copy link

openjdk bot commented Nov 6, 2023

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

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

mlbridge bot commented Nov 6, 2023

Webrevs

@GoeLin
Copy link
Member

GoeLin commented Nov 7, 2023

/approve yes

@openjdk
Copy link

openjdk bot commented Nov 7, 2023

@GoeLin
8310265: The approval request has been approved.

@openjdk
Copy link

openjdk bot commented Nov 7, 2023

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

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

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

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 24 new commits pushed to the master branch:

  • 75daf18: 8315214: Do not run sun/tools/jhsdb tests concurrently
  • 662f3bd: 8317920: JDWP-agent sends broken exception event with onthrow option
  • 68807aa: 8314242: Update applications/scimark/Scimark.java to accept VM flags
  • 5754eb1: 8290469: Add new positioning options to PassFailJFrame test framework
  • 2aca53f: 8026393: jarsigner never shows a warning in badKeyUsage case
  • ff19eeb: 8285687: Remove jtreg tag manual=yesno for java/awt/print/PrinterJob/PageRangesDlgTest.java
  • 2f3fc25: 8232135: Add diagnostic output to test java/util/ProcessBuilder/Basic.java
  • 48f1f39: 8230435: Replace wildcard address with loopback or local host in tests - part 22
  • b64a1ac: 8293166: jdk/jfr/jvm/TestDumpOnCrash.java fails on Linux ppc64le and Linux aarch64
  • 80d3bb4: 8289745: JfrStructCopyFailed uses heap words instead of bytes for object sizes
  • ... and 14 more: https://git.openjdk.org/jdk11u-dev/compare/de9ae1eac41876c2995e99256225085297171048...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.

➡️ 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 7, 2023
@luhenry
Copy link
Member Author

luhenry commented Nov 7, 2023

/integrate

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

openjdk bot commented Nov 7, 2023

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

@phohensee
Copy link
Member

/sponsor

@openjdk
Copy link

openjdk bot commented Nov 8, 2023

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

  • 34cc089: 8298905: Test "java/awt/print/PrinterJob/ImagePrinting/PrintARGBImage.java" fails because the frames of instruction does not display
  • b773f56: 6445283: ProgressMonitorInputStream not large file aware (>2GB)
  • 799a7c8: 8292683: Remove BadKeyUsageTest.java from Problem List
  • 0bc8b22: 8230858: Replace wildcard address with loopback or local host in tests - part 23
  • 3592b70: 8317373: Add Telia Root CA v2
  • 75daf18: 8315214: Do not run sun/tools/jhsdb tests concurrently
  • 662f3bd: 8317920: JDWP-agent sends broken exception event with onthrow option
  • 68807aa: 8314242: Update applications/scimark/Scimark.java to accept VM flags
  • 5754eb1: 8290469: Add new positioning options to PassFailJFrame test framework
  • 2aca53f: 8026393: jarsigner never shows a warning in badKeyUsage case
  • ... and 19 more: https://git.openjdk.org/jdk11u-dev/compare/de9ae1eac41876c2995e99256225085297171048...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Nov 8, 2023
@openjdk openjdk bot closed this Nov 8, 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 8, 2023
@openjdk
Copy link

openjdk bot commented Nov 8, 2023

@phohensee @luhenry Pushed as commit 416c48e.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport clean integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

3 participants