diff options
author | Michal Klocek <michal.klocek@qt.io> | 2022-05-24 13:05:39 +0200 |
---|---|---|
committer | Michal Klocek <michal.klocek@qt.io> | 2022-05-24 18:16:30 +0000 |
commit | 41e94fc482eca3e40082c34d8332821a15aefba0 (patch) | |
tree | 3da4c2cfb7c1f863d14c2d7bd89a471e64196153 | |
parent | 2a5d2bdfa115f930459b1e1437bb190b17c0fb68 (diff) | |
download | qtwebengine-41e94fc482eca3e40082c34d8332821a15aefba0.tar.gz |
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>
-rw-r--r-- | src/core/gn_run.pro | 10 |
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!") } |