summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2022-05-24 13:05:39 +0200
committerMichal Klocek <michal.klocek@qt.io>2022-05-24 15:16:36 +0200
commit959e658b421d704cbe72d4f521c02361cdeb807c (patch)
tree61bbde184cc69d7a7befeb06ecca7d89b4a19b10 /src
parentccdfc6e501ec4d39c6b319908effcd92b0512db1 (diff)
Add workaround for unstable gn on macOS in ci
In ci 'gn' can crash making it hard to integrate, if there is high load crashes occur more frequently sometimes even blocking integrations for few days. Limit number of worker threads for gn as this improves situation however increases time for generating ninja files from 2s to 7s. Note this will not prevent crashes however significantly reduces the issue (when running in loop from 1 per ~10min to 1 per ~3days) Compilation with address or thread sanitizer does not lead to meaningful traces. Moreover running gn with sanitizer creates deadlocks for unknown reason every few runs. Current assumptions is that macos vms are unstable as crashes also occur for sscache calls (compiler) and python calls. Set one thread only for macos, in 6.x series this is ci depended but in 5.x series would require coin source changes. Change-Id: I1c488796eb0547eedd20101606f18ed55718e9c2 Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/core/gn_run.pro10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/core/gn_run.pro b/src/core/gn_run.pro
index 9072f2847..9f6e64504 100644
--- a/src/core/gn_run.pro
+++ b/src/core/gn_run.pro
@@ -41,6 +41,10 @@ build_pass|!debug_and_release {
gn_python = "--script-executable=$$pythonPathForSystem()"
ninjaflags = $$(NINJAFLAGS)
+ enableThreads = $$(GN_MORE_THREADS)
+ isEmpty(enableThreads):macos {
+ gn_threads = "--threads=1"
+ }
isEmpty(ninjaflags):!silent: ninjaflags = "-v"
build_pass:build_all: default_target.target = all
else: default_target.target = first
@@ -52,7 +56,7 @@ build_pass|!debug_and_release {
gn_target = "qtwebengine_target=\"$$system_path($$OUT_PWD/$$arch/$$getConfigDir()):QtWebEngineCore\""
gn_args_per_arch = $$system_quote($$gn_args $$gn_target target_cpu=\"$$gnArch($$arch)\")
gn_build_root = $$system_quote($$system_path($$OUT_PWD/$$arch/$$getConfigDir()))
- gn_run = $$gn_binary gen $$gn_build_root $$gn_python --args=$$gn_args_per_arch --root=$$gn_src_root
+ gn_run = $$gn_binary gen $$gn_build_root $$gn_python $$gn_threads --args=$$gn_args_per_arch --root=$$gn_src_root
message("Running for $$arch: $$gn_run")
!system($$gn_run) {
error("GN run error for $$arch!")
@@ -66,8 +70,8 @@ build_pass|!debug_and_release {
gn_args+= "qtwebengine_target=\"$$system_path($$OUT_PWD/$$getConfigDir()):QtWebEngineCore\""
gn_args = $$system_quote($$gn_args)
gn_build_root = $$system_quote($$system_path($$OUT_PWD/$$getConfigDir()))
- gn_run = $$gn_binary gen $$gn_build_root $$gn_python --args=$$gn_args --root=$$gn_src_root
- message("Running: $$gn_run for $$arch")
+ gn_run = $$gn_binary gen $$gn_build_root $$gn_python $$gn_threads --args=$$gn_args --root=$$gn_src_root
+ message("Running: $$gn_run")
!system($$gn_run) {
error("GN run error!")
}