-
-
Notifications
You must be signed in to change notification settings - Fork 15
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
Hash of java.rmi differs from expected hash #557
Comments
Doesn't look like a Github action issue. I suggest checking that other vendors are not also seeing a difference in the jlink mod hash code of java.rmi between these dot releases, and that the problem is not an inadvertent change to the values used when calculating the mods hashes. Either that or we are running jlink in an incorrect way in the latest build method. |
The same issue was reported against the same version of Corretto here: corretto/corretto-11#144 (comment) but I don't really understand the message or how a user is intended to act upon this error. From what I can tell, jlink is unusable in this state unless there's a workaround. How would one go about auditing other vendors? I'm not even sure what this message would represent. I assume it's some type of major version check, but if that's the case, why aren't these being picked up in unit tests? (Or perhaps they are but they haven't been backported to JKD11?) |
Another proposal is to ask setup-java to use a locked-in version, but that must be weighed against losing the ability to know and thus report these issues. |
In the meantime I'll try to create a unit test to reproduce however due to the history of this issue happening prior, I was hoping there'd be enough knowledge around it to take immediate action. |
On my phone at the moment, so apologies for the terse replies. Yes, the Corretto (future) fix notice is here Looks like no code change was required. |
I've asked them for the information about the patch; it seems quite coincidental to affect identical versions. |
Hi, I'm on the Corretto team. We root caused it to openjdk/jdk11u@7c29f0e which changes how the hashes are calculated. We were using an older version of Corretto11 to repack the jmods after signing the binaries. No code changes were required for us to fix since we just rebuilt using 11.0.16 to repack. This means you cannot use jlink across minor versions after 11.0.16. |
Whoah, this breaks jlink at its core. Is this by design? Can you share some upstream conversations about this? jlink already has a high learning curve, I fear this is going to make adoption even harder. |
I just checked and there was no conversation about it on the email list, JBS, or PR. |
The good news is that now that jlink is aligned with how JDK15+ perform the hash calculation, there should no longer be incompatibilities when repackaging JDK11 jmods using newer JDKs (which is what cause the original Corretto issue two years ago). After the lessons learned with this patch, we don't think changes to the jlink format should be done for existing major JDK versions, and even for new major versions should be avoided. |
Hmm... this is very interesting... So does that mean this (following) statement is only true for =< 11.0.15? That might not be as dire of a consequence.
For example, in my builds, I check the major version only currently, but I can add an exception to 11.0.16+. |
While I await an answer, I've written a patch in my environment that assumes 11.0.16 and higher can be used to build >=11.0.16 and that 11.0.15 and lower can be used to build <= 11.0.15 and it's succeeding. I'm sure this can be simplified to just check if it's greater than 11.0.16, but speculative fear will keep the old logic around for a while. 😅 Once I have a definitive answer, we can close this as |
Our understanding is that all versions prior to 11.0.16 should work against each other and 11.0.16+ should work. I think we would push back on any more breaking changes here. 😄 |
Thanks closing as upstream has permanently broken backwards compatibility and a manual workaround is needed. Quoting:
|
Hashes of non-upgradeable modules are recorded in |
Strongly disagree. According to this comment, the hash calculation was changed to be more reliable, but in doing so, it broke user space: #557 (comment) Frameworks should be careful to not break user space, it adds unintuitive errors, breaks the documentation for such features, and deters people from trusting the feature. |
Please provide a brief summary of the bug
Builds on GitHub Actions using GitHub's Temurin 11.0.16+8 against Temurin 11.0.12+7 are failing.
Please provide steps to reproduce where possible
I haven't yet reproduced this locally, but at this point all GitHub builds using
jlink
against the above combinations of Java 11 seem to be affected (MacOS, Linux, Linux targeting Windows)JAVA_HOME
:/opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/11.0.16-8/x64
https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.12+7/OpenJDK11U-jdk_x64_linux_hotspot_11.0.12_7.tar.gz
Expected Results
jlink succeeds
Actual Results
jlink fails
What Java Version are you using?
JAVA_HOME: /usr/lib/jvm/temurin-11-jdk-amd64
What is your operating system and platform?
https://github.com/qzind/tray/runs/7662042575?check_suite_focus=true
How did you install Java?
GitHub actions/setup-java@v2
Did it work before?
Worked with
11.0.15+10
Did you test with other Java versions?
No response
Relevant log output
The text was updated successfully, but these errors were encountered: