JDK-8248347 : windows build broken by JDK-8243114
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 11,16
  • Priority: P1
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows
  • CPU: x86_64
  • Submitted: 2020-06-25
  • Updated: 2022-02-06
  • Resolved: 2020-06-25
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 13 JDK 16
11.0.10-oracleFixed 13.0.6Fixed 16 b04Fixed
Related Reports
Relates :  
Description
[2020-06-25T18:08:39,838Z] Compiling 2543 files for java.desktop
[2020-06-25T18:08:56,669Z] t:/workspace/open/src/hotspot/cpu/x86/sharedRuntime_x86_64.cpp(3773): error C2220: the following warning is treated as an error
[2020-06-25T18:08:56,669Z] t:/workspace/open/src/hotspot/cpu/x86/sharedRuntime_x86_64.cpp(3773): warning C4146: unary minus operator applied to unsigned type, result still unsigned
[2020-06-25T18:08:56,669Z] t:/workspace/open/src/hotspot/cpu/x86/sharedRuntime_x86_64.cpp(3815): warning C4146: unary minus operator applied to unsigned type, result still unsigned
[2020-06-25T18:08:56,810Z] lib/CompileJvm.gmk:149: recipe for target '/cygdrive/t/workspace/build/windows-x64-debug/hotspot/variant-server/libjvm/objs/sharedRuntime_x86_64.obj' failed
[2020-06-25T18:08:56,810Z] make[3]: *** [/cygdrive/t/workspace/build/windows-x64-debug/hotspot/variant-server/libjvm/objs/sharedRuntime_x86_64.obj] Error 1
[2020-06-25T18:08:56,810Z] make[3]: *** Waiting for unfinished jobs....
[2020-06-25T18:08:58,939Z] make/Main.gmk:259: recipe for target 'hotspot-server-libs' failed
[2020-06-25T18:08:58,939Z] make[2]: *** [hotspot-server-libs] Error 2
[2020-06-25T18:08:58,939Z] make[2]: *** Waiting for unfinished jobs....


Here's the "broken" code:

src/hotspot/cpu/x86/sharedRuntime_x86_64.cpp:

L3773:   assert(inv * n[0] == -1ULL, "broken inverse in Montgomery multiply");

L3815:   assert(inv * n[0] == -1ULL, "broken inverse in Montgomery square");

The last changeset applied to src/hotspot/cpu/x86/sharedRuntime_x86_64.cpp is:

changeset:   59937:bf2cdc10fabe
user:        stooke
date:        Thu Jun 25 14:19:37 2020 +0100
summary:     8243114: Implement montgomery{Multiply,Square}intrinsics on Windows

Comments
Fix request (13u) Requesting backport to 13u as follow-up fix for JDK-8243114 that is already included to 13u. The patch applies cleanly. Debug configurations are built successfully after applying the patch.
11-12-2020

Fix request (11u) -- will label after testing completed. I would like to downport this for parity with 11.0.10-oracle. Applies clean.
03-09-2020

Changeset: b87302ca Author: Vladimir Kozlov <kvn@openjdk.org> Date: 2020-06-25 16:01:16 +0000 URL: https://git.openjdk.java.net/mobile/commit/b87302ca
02-07-2020

No problem, David. I'd have been happy enough to have run the change through jdk-submit before pushing, but I genuinely wasn't aware of it at the time. I guess that's a result of mostly being focused on the various update releases over the last few years. It's actually a shame we don't have something similar for those, as it's even more important that breakage is caught quickly there with the shorter quarterly release cycle. It's interesting that Oracle is already using VS2019. Usually, we're the first to hit breakage when some new GCC comes along!
26-06-2020

Andrew, I withdraw the comment with apologies. The jdk-submit system has been around for a while now and a lot of people know about it. It's use is not mandated though recommended (especially for people that don't have access to a range of build/tests systems). But jdk-submit simply exercises the Oracle build platforms. The change was tested with VS 2017, and Oracle uses VS 2019. The build file toolchain_windows.m4 states: VALID_VS_VERSIONS="2019 2017 2013 2015 2012 2010" so there seems to be a general expectation that all code will compile on all listed versions. But we only test on VS2019 (AFAIK) so if we used something that failed to compile on an earlier version we wouldn't know until someone reported it. So if someone else tests on VS2017 we can't expect them to know it doesn't work on VS2019.
26-06-2020

David, I wasn't aware of this. Where is it documented? I can't see anything in the developers' guide - https://openjdk.java.net/guide/producingChangeset.html#pushing - and I had to do a Web search for "jdk-submit" to find https://wiki.openjdk.java.net/display/Build/Submit+Repo
26-06-2020

URL: https://hg.openjdk.java.net/jdk/jdk/rev/97726b05c864 User: kvn Date: 2020-06-25 23:01:31 +0000
25-06-2020

Testing next fix: - assert(inv * n[0] == -1ULL, "broken inverse in Montgomery multiply"); + assert(inv * n[0] == ULLONG_MAX, "broken inverse in Montgomery multiply");
25-06-2020

That is why it is supposed to go through jdk-submit testing before pushing.
25-06-2020

Thanks. Our test compiler was Microsoft (R) C/C++ Optimizing Compiler Version 19.16.27027.1 for x64 So this may be a failure on the newer version.
25-06-2020

The compiler used was: [2020-06-25T18:02:02,479Z] configure: Using microsoft C++ compiler version 19.25.28612 [Microsoft (R) C/C++ Optimizing Compiler Version 19.25.28612 for x64] I don't see a dump of the compiler flags in the stdout log that I found.
25-06-2020

Yes, this is code from JDK-8243114. Do we know what compiler was used to build here and with what flags?
25-06-2020

Since JDK-8243114 is in hotspot/compiler, I'm moving this bug from hotspot/gc -> hotspot/compiler.
25-06-2020

The only changeset in the jdk-16+4-85 Build ID is this one: JDK-8248329 JDK-8244603 breaks windows build but that fix changed a different file so I have to poke around a bit. Thomas did a Mach5 Tier1 job with the fix for JDK-8248329 and that job passed so where did this failure come from? Update: Here's the recent pushes to jdk/jdk: age author description 118 seconds ago egahlin 8248302: JFR: Add test for OldObjectSample event when using ZGCdefault tip 8 minutes ago minqi 8203005: The top-of-stack type specified for nofast_* bytecodes are wrong 2 hours ago tschatzl 8248329: JDK-8244603 breaks windows build 3 hours ago ihse 8220639: Need a way to augment JTREG_LAUNCHER_OPTIONS from command-line 6 hours ago stooke 8243114: Implement montgomery{Multiply,Square}intrinsics on Windows 5 hours ago tschatzl 8244603: G1 incorrectly limiting young gen size when using the reserve can result in repeated full gcs 5 hours ago tschatzl 8243672: Short term pause time ratio calculation in G1 off Looks like the push for 8243114 happened after Thomas's push of JDK-8244603 so the Win* build was broken twice.
25-06-2020

Failing lines match this changeset: changeset: 59937:bf2cdc10fabe user: stooke date: Thu Jun 25 14:19:37 2020 +0100 summary: 8243114: Implement montgomery{Multiply,Square}intrinsics on Windows
25-06-2020