On Fri, 30 Oct 2026 09:02:21 GMT, Ambarish Rapte <[email protected]> wrote:

> The upgrade to gradle 9.7.0, uncovered a race condition in our build logic 
> that causes intermittent build failures in native compilation when 
> NUM_COMPILE_THREADS > 1.
> The build failures occur when native compilation workers concurrently access 
> project properties.
> The issue is very intermittent.
> 
> Fix: Fetch the project properties before starting compilation threads to 
> avoid concurrent access.
> 
> Verification: Verified that the build artifacts are same as before.
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

Marked as reviewed by kcr (Lead).

LGTM. I ran a before vs after test using the same `SOURCE_DATE_EPOCH` and the 
results are identical. I presume you've tested it in our CI? I left a minor 
suggestion, but it's probably not worth changing it, since you would need to 
retest.

@lukostyra Can you be the second reviewer?

buildSrc/src/main/groovy/com/sun/javafx/gradle/CCTask.groovy line 57:

> 55:                 prjEnv.put(key.toString(), value.toString());
> 56:             }
> 57:             projectEnv = Collections.unmodifiableMap(prjEnv);

Minor suggestion: since this appears three times (and will be four once D3D12 
is integrated), do you think it's worth moving this into a utility method in 
the base class that takes a Map (`project.WINDOWS_NATIVE_COMPILE_ENVIRONMENT` 
in this case) and returns an unmodifiable Map? It's only 4 lines of code, so 
I'll leave it up to you. Since you've already tested it, it might not be worth 
it.

-------------

PR Review: https://git.openjdk.org/jfx/pull/2357#pullrequestreview-5713292888
PR Comment: https://git.openjdk.org/jfx/pull/2357#issuecomment-6524675412
PR Comment: https://git.openjdk.org/jfx/pull/2357#issuecomment-6524697257
PR Review Comment: https://git.openjdk.org/jfx/pull/2357#discussion_r4424374540

Reply via email to