JDK-8089417 : Mac: intermittent T2K gcc failure prevents parallel compilation
  • Type: Bug
  • Component: javafx
  • Sub-Component: build
  • Affected Version: 8u20
  • Priority: P4
  • Status: Closed
  • Resolution: Cannot Reproduce
  • Submitted: 2014-03-27
  • Updated: 2024-09-20
  • Resolved: 2024-09-03
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
We have a serious intermittent build failure in the :graphics:ccMacFontT2K task. See RT-35955 for more information. In order to fix that bug we disabled parallel compilation on the Mac by setting the default number of parallel compilation threads to 1. If we can fix the underlying cause then we could re-enable parallel native compilation to speed up the build on Mac.

To reproduce this, run the following in a loop until it fails (other values of NUM_COMPILE_THREADS might cause the problem to fail more or less often on a particular system) :

while (true) {
    gradle -PNUM_COMPILE_THREADS=8 cleanNativeFontT2K nativeFontT2K 
}

Comments
The (closed-source) FontT2K native code is no longer present in our source repo, having been removed by JDK-8187147, so the specific compilation error tracked by this bug cannot happen. Back when we first applied the workaround of forcing NUM_COMPILE_THREADS to 1 on macOS, we suspected that this was a macOS Xcode gcc bug. Xcode switched to using clang quite some time ago, so that is another reason that this bug is almost certainly not reproducible. This bug was discussed during the review of JDK-8339335 / https://github.com/openjdk/jfx/pull/1554 since that PR uses the value of NUM_COMPILE_THREADS to control the level of parallelism for building WebKit. As mentioned in that PR, I ran `gradle cleanNative sdk` in a loop over 350 times on my local machine and 100 times on our two CI build nodes (one each for macOS / x64 and macOS / aarch64) with no failures. I am therefore closing this bug as "Cannot reproduce". I will file a new bug to remove the workaround so that we can get parallel compilation on macOS. That new bug is a blocker for JDK-8339335.
03-09-2024

Note that even if we can't fix the root cause, we might be able to refine the workaround so that we use parallel compilation on native modules other than fontT2KNative (currently we disable it for all of Prism and Glass, too).
01-07-2014