1# -*- bazel-starlark -*- 2# Copyright 2023 The Chromium Authors 3# Use of this source code is governed by a BSD-style license that can be 4# found in the LICENSE file. 5"""workaround for b/289968566. they often faile with exit=137 (OOM?).""" 6 7load("@builtin//runtime.star", "runtime") 8load("@builtin//struct.star", "module") 9 10def __step_config(ctx, step_config): 11 # TODO(b/289968566): they often faile with exit=137 (OOM?). 12 # They need to run on a machine has more memory than the default machine type n2-custom-2-3840 13 exit137_list = [ 14 # Fallback happens with follwoing args.gn (try/linux-chromeos-rel-compilator). 15 # Fallback may happen in other build config too. 16 # also_build_lacros_chrome = true 17 # dcheck_always_on = true 18 # enable_backup_ref_ptr_feature_flag = true 19 # enable_dangling_raw_ptr_checks = true 20 # enable_dangling_raw_ptr_feature_flag = true 21 # ffmpeg_branding = "ChromeOS" 22 # is_component_build = false 23 # is_debug = false 24 # proprietary_codecs = true 25 # symbol_level = 0 26 # target_os = "chromeos" 27 # use_cups = true 28 # use_remoteexec = true 29 "./lacros_clang_x64/obj/chrome/browser/browser/chrome_browser_interface_binders.o", 30 "./lacros_clang_x64/obj/chrome/browser/browser/chrome_content_browser_client.o", 31 "./lacros_clang_x64/obj/content/browser/browser/browser_interface_binders.o", 32 "./lacros_clang_x64/obj/content/browser/browser/render_frame_host_impl.o", 33 "./lacros_clang_x64/obj/content/browser/browser/web_contents_impl.o", 34 "./lacros_clang_x64/obj/net/http/transport_security_state_generated_files/transport_security_state.o", 35 "./lacros_clang_x64/obj/third_party/blink/public/mojom/mojom_platform/speech_recognition_grammar.mojom.o", 36 "./obj/chrome/browser/ash/ash/autotest_private_api.o", 37 "./obj/chrome/browser/ash/ash/chrome_browser_main_parts_ash.o", 38 "./obj/chrome/browser/ash/ash/user_session_manager.o", 39 "./obj/chrome/browser/ash/ash/webui_login_view.o", 40 "./obj/chrome/browser/ash/system_web_apps/apps/browser_tests/media_app_integration_browsertest.o", 41 "./obj/chrome/browser/ash/system_web_apps/browser_tests/system_web_app_manager_browsertest.o", 42 "./obj/chrome/browser/ash/unit_tests/wizard_controller_unittest.o", 43 "./obj/chrome/browser/browser/browser_prefs.o", 44 "./obj/chrome/browser/browser/chrome_browser_interface_binders.o", 45 "./obj/chrome/browser/browser/chrome_browser_main_extra_parts_profiles.o", 46 "./obj/chrome/browser/browser/chrome_content_browser_client.o", 47 "./obj/chrome/browser/browser/render_view_context_menu.o", 48 "./obj/chrome/browser/ui/ash/holding_space/browser_tests/holding_space_ui_browsertest.o", 49 "./obj/chrome/test/browser_tests/browser_non_client_frame_view_chromeos_browsertest.o", 50 "./obj/chrome/test/browser_tests/chrome_shelf_controller_browsertest.o", 51 "./obj/chrome/test/browser_tests/device_local_account_browsertest.o", 52 "./obj/chrome/test/browser_tests/file_manager_browsertest_base.o", 53 "./obj/chrome/test/browser_tests/file_tasks_browsertest.o", 54 "./obj/chrome/test/browser_tests/full_restore_app_launch_handler_browsertest.o", 55 "./obj/chrome/test/browser_tests/safe_browsing_blocking_page_test.o", 56 "./obj/chrome/test/browser_tests/scalable_iph_browsertest.o", 57 "./obj/chrome/test/interactive_ui_tests/local_card_migration_uitest.o", 58 "./obj/chrome/test/interactive_ui_tests/system_web_app_interactive_uitest.o", 59 "./obj/chrome/test/interactive_ui_tests/tab_drag_controller_interactive_uitest.o", 60 "./obj/chrome/test/test_support_ui/web_app_integration_test_driver.o", 61 "./obj/chrome/test/unit_tests/chrome_browsing_data_remover_delegate_unittest.o", 62 "./obj/chrome/test/unit_tests/chrome_compose_client_unittest.o", 63 "./obj/chrome/test/unit_tests/chrome_shelf_controller_unittest.o", 64 "./obj/chrome/test/unit_tests/render_view_context_menu_unittest.o", 65 "./obj/content/browser/browser/browser_interface_binders.o", 66 67 # Fallback happens with follwoing args.gn (try/linux-lacros-rel-compilator). 68 # Fallback may happen in other build config too. 69 # also_build_ash_chrome = true 70 # chromeos_is_browser_only = true 71 # dcheck_always_on = true 72 # is_clang = true 73 # is_component_build = false 74 # is_debug = false 75 # symbol_level = 0 76 # target_os = "chromeos" 77 # use_cups = true 78 # use_remoteexec = true 79 "./ash_clang_x64/obj/chrome/browser/ash/ash/autotest_private_api.o", 80 "./ash_clang_x64/obj/chrome/browser/ash/ash/chrome_browser_main_parts_ash.o", 81 "./ash_clang_x64/obj/chrome/browser/browser/browser_prefs.o", 82 "./ash_clang_x64/obj/chrome/browser/browser/chrome_browser_interface_binders.o", 83 "./ash_clang_x64/obj/chrome/browser/browser/chrome_content_browser_client.o", 84 "./ash_clang_x64/obj/content/browser/browser/browser_interface_binders.o", 85 86 # Fallback happens with follwoing args.gn (try/android_compile_dbg). 87 # Fallback may happen in other build config too. 88 # debuggable_apks = false 89 # ffmpeg_branding = "Chrome" 90 # is_component_build = true 91 # is_debug = true 92 # proprietary_codecs = true 93 # symbol_level = 0 94 # target_cpu = "arm64" 95 # target_os = "android" 96 # use_remoteexec = true 97 "./android_clang_arm/obj/content/browser/browser/browser_interface_binders.o", 98 "./obj/chrome/test/unit_tests__library/chrome_browsing_data_remover_delegate_unittest.o", 99 "./obj/content/test/content_browsertests__library/fenced_frame_browsertest.o", 100 "./obj/content/test/content_unittests__library/ad_auction_service_impl_unittest.o", 101 "./obj/content/test/content_unittests__library/auction_runner_unittest.o", 102 103 # Fallback happens with follwoing args.gn (try/fuchsia-x64-cast-receiver-rel). 104 # Fallback may happen in other build config too. 105 # cast_streaming_enable_remoting = true 106 # chrome_pgo_phase = 0 107 # dcheck_always_on = true 108 # enable_cast_receiver = true 109 # enable_dav1d_decoder = false 110 # enable_hidpi = false 111 # enable_libaom = false 112 # enable_library_cdms = false 113 # enable_logging_override = true 114 # enable_pdf = false 115 # enable_plugins = false 116 # enable_printing = false 117 # fuchsia_code_coverage = true 118 # is_component_build = false 119 # is_debug = false 120 # optimize_for_size = true 121 # optional_trace_events_enabled = false 122 # produce_v8_compile_hints = false 123 # symbol_level = 0 124 # target_os = "fuchsia" 125 # use_remoteexec = true 126 # use_thin_lto = false 127 "./obj/fuchsia_web/runners/cast_runner_integration_tests__exec/cast_runner_integration_test.o", 128 "./obj/fuchsia_web/webengine/web_engine_core/frame_impl.o", 129 130 # Fallback happens with follwoing args.gn (try/linux_chromium_asan_rel_ng). 131 # dcheck_always_on = true 132 # fail_on_san_warnings = true 133 # is_asan = true 134 # is_component_build = false 135 # is_debug = false 136 # is_lsan = true 137 # symbol_level = 1 138 # use_remoteexec = true 139 "./obj/components/autofill/core/browser/unit_tests/browser_autofill_manager_unittest.o", 140 "./obj/content/browser/browser/render_frame_host_impl.o", 141 "./obj/content/browser/browser/web_contents_impl.o", 142 "./obj/content/test/content_browsertests/back_forward_cache_features_browsertest.o", 143 "./obj/content/test/content_browsertests/back_forward_cache_internal_browsertest.o", 144 "./obj/content/test/content_browsertests/fenced_frame_browsertest.o", 145 "./obj/content/test/content_browsertests/interest_group_browsertest.o", 146 "./obj/content/test/content_browsertests/navigation_controller_impl_browsertest.o", 147 "./obj/content/test/content_browsertests/navigation_request_browsertest.o", 148 "./obj/content/test/content_browsertests/prerender_browsertest.o", 149 "./obj/content/test/content_browsertests/render_frame_host_impl_browsertest.o", 150 "./obj/content/test/content_browsertests/shared_storage_browsertest.o", 151 "./obj/content/test/content_browsertests/site_per_process_browsertest.o", 152 "./obj/content/test/content_browsertests/web_contents_impl_browsertest.o", 153 "./obj/content/test/content_unittests/ad_auction_service_impl_unittest.o", 154 "./obj/content/test/content_unittests/auction_runner_unittest.o", 155 "./obj/content/test/content_unittests/authenticator_impl_unittest.o", 156 "./obj/content/test/content_unittests/web_usb_service_impl_unittest.o", 157 "./obj/net/third_party/quiche/quiche_tests/quic_connection_test.o", 158 "./obj/third_party/abseil-cpp/absl/functional/any_invocable_test/any_invocable_test.o", 159 "./obj/third_party/blink/renderer/core/unit_tests/web_frame_test.o", 160 "./obj/third_party/blink/renderer/core/unit_tests/web_media_player_impl_unittest.o", 161 "./obj/third_party/perfetto/protos/perfetto/trace/merged_trace_lite/perfetto_trace.pb.o", 162 "./obj/ui/gl/gl_unittest_utils/gl_bindings_autogen_mock.o", 163 164 # Fallback happens with follwoing args.gn (ci/Linux MSan Builder). 165 # dcheck_always_on = false 166 # is_component_build = false 167 # is_debug = false 168 # is_msan = true 169 # msan_track_origins = 2 170 # use_remoteexec = true 171 "./obj/chrome/test/unit_tests/site_settings_handler_unittest.o", 172 "./obj/components/policy/chrome_settings_proto_generated_compile_proto/chrome_settings.pb.o", 173 "./obj/content/test/content_browsertests/cross_origin_opener_policy_browsertest.o", 174 "./obj/content/test/content_browsertests/navigation_controller_impl_browsertest.o", 175 "./obj/content/test/content_unittests/auction_runner_unittest.o", 176 "./obj/content/test/test_support/service_worker_test_utils.o", 177 "./obj/net/dns/tests/host_resolver_manager_unittest.o", 178 "./obj/net/third_party/quiche/quiche_tests/oghttp2_adapter_test.o", 179 "./obj/net/third_party/quiche/quiche_tests/quic_connection_test.o", 180 "./obj/net/third_party/quiche/quiche_tests/structured_headers_generated_test.o", 181 "./obj/ui/accessibility/accessibility_unittests/ax_node_position_unittest.o", 182 "./obj/ui/gl/gl_unittest_utils/gl_bindings_autogen_mock.o", 183 "./obj/ui/gl/gl_unittest_utils/gl_mock.o", 184 "./obj/v8/v8_turboshaft/csa-optimize-phase.o", 185 # Fallback happens with following args.gn (try/android-arm64-rel) 186 # android_static_analysis = "off" 187 # coverage_instrumentation_input_file = "//.code-coverage/files_to_instrument.txt" 188 # dcheck_always_on = true 189 # debuggable_apks = false 190 # fail_on_android_expectations = true 191 # ffmpeg_branding = "Chrome" 192 # is_component_build = false 193 # is_debug = false 194 # proprietary_codecs = true 195 # skip_secondary_abi_for_cq = true 196 # strip_debug_info = true 197 # symbol_level = 0 198 # system_webview_package_name = "com.google.android.apps.chrome" 199 # target_cpu = "arm64" 200 # target_os = "android" 201 # use_clang_coverage = true 202 # use_remoteexec = false 203 # use_siso = true 204 "./obj/content/test/content_browsertests__library/interest_group_browsertest.o", 205 "./obj/content/test/content_browsertests__library/prerender_browsertest.o", 206 "./obj/content/test/content_browsertests__library/site_per_process_browsertest.o", 207 "./robolectric_x64/obj/net/http/transport_security_state_generated_files/transport_security_state.o", 208 # Fallback happens with the following args.gn 209 # (linux-build-perf-developer, win-build-perf-developer) 210 # is_component_build = true 211 # is_debug = true 212 # symbol_level = 2 213 # use_siso = true 214 "./clang_x64/obj/net/http/transport_security_state_generated_files/transport_security_state.o", 215 "./obj/content/browser/browser/render_process_host_impl.o", 216 "./obj/net/http/transport_security_state_generated_files/transport_security_state.o", 217 # Fallback happens with the following args.gn 218 # (try/mac-rel) 219 # coverage_instrumentation_input_file = "//.code-coverage/files_to_instrument.txt" 220 # dcheck_always_on = true 221 # enable_backup_ref_ptr_feature_flag = true 222 # enable_dangling_raw_ptr_checks = true 223 # enable_dangling_raw_ptr_feature_flag = true 224 # ffmpeg_branding = "Chrome" 225 # is_component_build = false 226 # is_debug = false 227 # proprietary_codecs = true 228 # symbol_level = 0 229 # target_cpu = "x64" 230 # use_clang_coverage = true 231 # use_remoteexec = false 232 # use_siso = true 233 "./arm64/obj/net/http/transport_security_state_generated_files/transport_security_state.o", 234 "./arm64_v8_x64/obj/net/http/transport_security_state_generated_files/transport_security_state.o", 235 "./clang_arm64_v8_x64/obj/net/http/transport_security_state_generated_files/transport_security_state.o", 236 # Fallback happens with the following args.gn 237 # (try/ios-simulator) 238 # coverage_instrumentation_input_file = "//.code-coverage/files_to_instrument.txt" 239 # enable_run_ios_unittests_with_xctest = true 240 # is_component_build = false 241 # is_debug = true 242 # symbol_level = 1 243 # target_cpu = "x64" 244 # target_environment = "simulator" 245 # target_os = "ios" 246 # use_clang_coverage = true 247 # use_remoteexec = false 248 # use_siso = true 249 "./clang_arm64/obj/net/http/transport_security_state_generated_files/transport_security_state.o", 250 # Fallback happens with the following args.gn 251 # (mac-build-perf-developer, win-build-perf-developer) 252 # is_component_build = true 253 # is_debug = true 254 # symbol_level = 2 255 # use_siso = true 256 "./obj/content/browser/browser/storage_partition_impl.o", 257 "./obj/third_party/blink/renderer/core/core/local_frame_view.o", 258 "./obj/third_party/blink/renderer/core/core_hot/document.o", 259 # Fallback happens with the following args.gn 260 # (android-build-perf-developer) 261 # is_component_build = true 262 # is_debug = true 263 # symbol_level = 2 264 # target_cpu = "arm64" 265 # target_os = "android" 266 # use_siso = true 267 "./obj/third_party/sentencepiece/sentencepiece/unicode_script.o", 268 ] 269 if runtime.os == "windows": 270 exit137_list = [obj.removesuffix(".o") + ".obj" for obj in exit137_list if obj.startswith("./obj/")] 271 272 # Fallback happens with the following args.gn 273 # (win-build-perf-developer) 274 # is_component_build = true 275 # is_debug = true 276 # symbol_level = 2 277 # use_siso = true 278 exit137_list.extend([ 279 "./obj/third_party/blink/renderer/core/core/local_frame.obj", 280 ]) 281 282 new_rules = [] 283 for rule in step_config["rules"]: 284 if not rule["name"].endswith("/cxx"): 285 new_rules.append(rule) 286 continue 287 if "action_outs" in rule: 288 fail("unexpeced \"action_outs\" in cxx rule %s" % rule["name"]) 289 r = {} 290 r.update(rule) 291 r["name"] += "/b289968566/exit-137" 292 r["action_outs"] = exit137_list 293 294 # Some large compile take longer than the default timeout 2m. 295 r["timeout"] = "4m" 296 297 # use `_large` variant of platform if it doesn't use default platform, 298 # i.e. mac/win case. 299 if "platform_ref" in r: 300 r["platform_ref"] = r["platform_ref"] + "_large" 301 else: 302 r["platform_ref"] = "large" 303 if r.get("handler") == "rewrite_rewrapper": 304 r["handler"] = "rewrite_rewrapper_large" 305 new_rules.append(r) 306 new_rules.append(rule) 307 step_config["rules"] = new_rules 308 return step_config 309 310b289968566 = module( 311 "b289968566", 312 step_config = __step_config, 313) 314