Skip to content
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

8294310: compare.sh fails on macos after JDK-8293550 #10435

Closed
wants to merge 2 commits into from

Conversation

erikj79
Copy link
Member

@erikj79 erikj79 commented Sep 26, 2022

Since JDK-8293550 we are adding adhoc signatures to all binaries on macos, and the compare script is no longer running cleanly. In order to compare binaries on macos, especially on aarch64, where signatures are mandatory, we will have to remove them first. They will never be exactly the same between two runs.

This patch adds codesign --remove-signature to compare.sh before comparing any executables or libraries. Stripping the signature has to happen after running strip as strip will fail otherwise. I also had to add a special option to strip to avoid warnings.

While enabling baseline compare runs for macosx-aarch64 in our CI, I discovered that were also not running testmake for aarch64, so I snuck in that change in jib-profiles.js here as well.


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

Issue

  • JDK-8294310: compare.sh fails on macos after JDK-8293550

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 10435

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 26, 2022

👋 Welcome back erikj! 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 JDK-8294310 8294310: compare.sh fails on macos after JDK-8293550 Sep 26, 2022
@openjdk openjdk bot added the rfr Pull request is ready for review label Sep 26, 2022
@openjdk
Copy link

openjdk bot commented Sep 26, 2022

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

  • build

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 build build-dev@openjdk.org label Sep 26, 2022
@mlbridge
Copy link

mlbridge bot commented Sep 26, 2022

Webrevs

@magicus
Copy link
Member

magicus commented Sep 27, 2022

I'm a bit sad to see the exact bit-by-bit comparison on macOS go down the drain. :( Do you think we could export MACOSX_CODESIGN_MODE to compare.sh.in, and if it is disabled, then we do the traditional bit-by-bit comparison? That way we at least have some possible way to do this, even if the signing normally in place makes a complete match impossible.

@erikj79
Copy link
Member Author

erikj79 commented Sep 27, 2022

I'm a bit sad to see the exact bit-by-bit comparison on macOS go down the drain. :( Do you think we could export MACOSX_CODESIGN_MODE to compare.sh.in, and if it is disabled, then we do the traditional bit-by-bit comparison? That way we at least have some possible way to do this, even if the signing normally in place makes a complete match impossible.

I know what you mean and I did consider this, but decided against it. On aarch64 there is no way to not get a signed binary and compare.sh was failing even before my codesign change. If you remove the default signature that the linker adds, the OS won't let you start the executable at all. Macos on intel is basically a discontinued platform at this point, so I didn't think it worth the effort to implement and maintain special treatment for it.

@magicus
Copy link
Member

magicus commented Sep 27, 2022

Ok. Sigh. This is really a step backwards in reproducability. But the fault lies with Apple, and we can't do much about it.

@openjdk
Copy link

openjdk bot commented Sep 27, 2022

@erikj79 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:

8294310: compare.sh fails on macos after JDK-8293550

Reviewed-by: ihse

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

  • 3419363: 8294361: Cleanup usages of StringBuffer in SQLOutputImpl
  • 1abf971: 8249627: Degrade Thread.suspend and Thread.resume
  • bc12e95: 8292969: Bad Thread Utilization in ForkJoinPool
  • dd51f7e: 8293996: C2: fix and simplify IdealLoopTree::do_remove_empty_loop
  • 14c6ac4: 8293998: [PPC64] JfrGetCallTrace: assert(_pc != nullptr) failed: must have PC
  • 02ea338: 8293887: AArch64 build failure with GCC 12 due to maybe-uninitialized warning in libfdlibm k_rem_pio2.c
  • 49a7347: 8294408: Problemlist runtime/handshake/HandshakeSuspendExitTest.java
  • aa48705: 8289422: Fix and re-enable vector conditional move
  • 1ddc92f: 8294404: [BACKOUT] JDK-8294142: make test should report only executed tests
  • 1e222bc: 8293462: [macos] app image signature invalid when creating DMG or PKG from post processed signed image
  • ... and 11 more: https://git.openjdk.org/jdk/compare/3675f4c2afd10b5042948fc79e62caee5f3874ce...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.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Sep 27, 2022
@erikj79
Copy link
Member Author

erikj79 commented Oct 5, 2022

/integrate

@openjdk
Copy link

openjdk bot commented Oct 5, 2022

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

  • 13a5000: 8294151: JFR: Unclear exception message when dumping stopped in memory recording
  • 8ebebbc: 8294368: Java incremental builds broken on Windows after JDK-8293116
  • 4bdd1c9: 8290964: C2 compilation fails with assert "non-reduction loop contains reduction nodes"
  • b4e74ae: 8294514: Wrong initialization of nmethod::_consts_offset for native nmethods
  • 953ce8d: 8293701: jdeps InverseDepsAnalyzer runs into NoSuchElementException: No value present
  • be82cff: 8294748: Cleanup unneeded references to hg
  • 43dbf58: 8186765: Speed up test sun/net/www/protocol/https/HttpsClient/ProxyAuthTest.java
  • 755958e: 8294376: Minimize disabled warnings in java.base
  • 1dafbe3: 8294539: Augment discussion of equivalence relations on floating-point values
  • b2e86a6: 8294255: Add link to DEFAULT_WAIT_TIME in javadoc for SunToolKit.realsSync
  • ... and 120 more: https://git.openjdk.org/jdk/compare/3675f4c2afd10b5042948fc79e62caee5f3874ce...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Oct 5, 2022
@openjdk openjdk bot closed this Oct 5, 2022
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Oct 5, 2022
@openjdk
Copy link

openjdk bot commented Oct 5, 2022

@erikj79 Pushed as commit b9eeec2.

💡 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
build build-dev@openjdk.org integrated Pull request has been integrated
2 participants