Skip to content

Commit

Permalink
Temp workaround: use a single thread to generate native image
Browse files Browse the repository at this point in the history
Workaround for oracle/graal#1927

Should be possible to remove this in 19.3.1

This is a different problem to the previous one that this
fix worked around, however because we were using this setting
we only ran into the thread safety problem after it was removed.
  • Loading branch information
stuartwdouglas committed Dec 9, 2019
1 parent d19be13 commit 0f2d90f
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,11 @@ public NativeImageBuildItem build(NativeConfig nativeConfig, NativeImageSourceJa
command.add("-H:InitialCollectionPolicy=com.oracle.svm.core.genscavenge.CollectionPolicy$BySpaceAndTime"); //the default collection policy results in full GC's 50% of the time
command.add("-jar");
command.add(runnerJarName);
//dynamic proxy generation is not thread safe
//should be fixed in 19.3.1
//but we need to add this option back to prevent intermittent failures
//https://github.com/oracle/graal/issues/1927
command.add("-J-Djava.util.concurrent.ForkJoinPool.common.parallelism=1");
if (nativeConfig.enableFallbackImages) {
command.add("-H:FallbackThreshold=5");
} else {
Expand Down

0 comments on commit 0f2d90f

Please sign in to comment.