|
107 | 107 | required: false |
108 | 108 | default: '' |
109 | 109 | type: string |
| 110 | + # XXX Temporary validation aid; remove (with its 3 consumers below) when the sanitizer-validation |
| 111 | + # campaign concludes. Lets 2 parallel runs split the test load of one cell. |
| 112 | + test-subset: |
| 113 | + description: >- |
| 114 | + If 'u-t-only': the transport_test runs no-op. If 't-t-only': the unit-tests run no-ops. |
| 115 | + Blank: everything runs. |
| 116 | + required: false |
| 117 | + default: '' |
| 118 | + type: string |
110 | 119 |
|
111 | 120 | jobs: |
112 | 121 | # Impetus behind this is to set up at least one magic string used in 2+ places. |
@@ -606,6 +615,19 @@ jobs: |
606 | 615 | # detector CHECK-fails -- and its failure path hangs the process (observed: a 3-hour unit_test wedge). |
607 | 616 | # Data-race detection (TSAN's main job) is unaffected; lock-inversion detection is the sacrifice. |
608 | 617 | export TSAN_OPTIONS="disable_coredump=0 detect_deadlocks=0 suppressions=$SAN_SUPP_CFG" |
| 618 | + if [ '${{ matrix.compiler.id }}' = 'clang-17' ]; then |
| 619 | + # clang-17's llvm-symbolizer-17 crashes ("LLVM ERROR: Sections with relocations should have an |
| 620 | + # address of 0") when symbolizing our binaries' TSAN reports, stalling the reporting thread 10+ |
| 621 | + # seconds each time (leading to, e.g., test-internal timeouts). A sibling version's symbolizer |
| 622 | + # handles the same binaries fine -- and nothing requires it to version-match the compiler. |
| 623 | + for SYMB_VER in 16 18 15; do |
| 624 | + if command -v llvm-symbolizer-$SYMB_VER > /dev/null; then |
| 625 | + export TSAN_OPTIONS="$TSAN_OPTIONS external_symbolizer_path=$(command -v llvm-symbolizer-$SYMB_VER)" |
| 626 | + echo "To avoid clang-17 symbolizer bugginess overrode symbolizer to [llvm-symbolizer-$SYMB_VER]." |
| 627 | + break |
| 628 | + fi |
| 629 | + done |
| 630 | + fi |
609 | 631 | echo "TSAN_OPTIONS = [$TSAN_OPTIONS]." |
610 | 632 | fi |
611 | 633 | if [ "$SAN_SUPP" != '' ]; then |
@@ -799,6 +821,10 @@ jobs: |
799 | 821 | # key template groups (<=> ipc::session::Session compile-time config, possibly others) in separate |
800 | 822 | # `.cpp`s, would benefit other environments, including user environments, and be less reliant on fairly |
801 | 823 | # dynamic hardware conditions from GitHub/whomever. Revisit that; ideally get rid of this as a result. |
| 824 | + # Update: The below trick is likely insufficient (from numbers we've seen), so we split the handful of |
| 825 | + # heaviest unit_test `.cpp`s per this to-do. Combined with the below trick (but not without it, notably), |
| 826 | + # 8/2026 GitHub build was OK. The to-do remains: Ideally split more stuff, so that this can be removed |
| 827 | + # (among other benefits). transport_test is likely the guy to attack. |
802 | 828 | # XXXrevisit soon, if there's time; or delete this line and leave TODO; whatever seems best at the end. |
803 | 829 | if [ '${{ matrix.compiler.high-mem-build }}' != '' ] \ |
804 | 830 | && [ '${{ matrix.compiler.high-mem-build }}' != 'false' ] \ |
@@ -946,18 +972,8 @@ jobs: |
946 | 972 | run: | |
947 | 973 | # Build libraries and demos/tests with Conan. |
948 | 974 | ${{ env.setup-run-env }} |
949 | | - #XXXtemp-debug! |
950 | | - # Sample RAM use in the background, so its output interleaves with the log as we go: post-mortem evidence |
951 | | - # regarding sporadic whole-VM kills (runner-shutdown message from GitHub) observed when several jumbo test |
952 | | - # TUs compile simultaneously in `-g` configs -- apparent OOM of the 16 GiB runner. |
953 | | - ( while true; do echo "[mem-sample] $(free -m | grep Mem:)"; sleep 15; done ) & |
954 | | - MEM_SAMPLER_PID=$! |
955 | | - #XXXtemp-debug-end |
956 | 975 | # At least capnp compiler binary is built with our build-settings, so $BUILT_CMD_PREFIX is required. |
957 | 976 | $BUILT_CMD_PREFIX conan build . |
958 | | - #XXXtemp-debug! |
959 | | - kill $MEM_SAMPLER_PID |
960 | | - #XXXtemp-debug-end |
961 | 977 |
|
962 | 978 | - name: Install built targets with Makefile |
963 | 979 | if: env.cell-selected == 'true' |
@@ -1121,6 +1137,8 @@ jobs: |
1121 | 1137 | && (!cancelled()) |
1122 | 1138 | run: | |
1123 | 1139 | # Run unit tests. |
| 1140 | + # XXX Temporary; see test-subset input. |
| 1141 | + if [ '${{ github.event.inputs.test-subset }}' = 't-t-only' ]; then echo 'Skipped per test-subset.'; exit 0; fi |
1124 | 1142 | cd ${{ env.install-dir }}/bin |
1125 | 1143 | # Some newline issues with the possible additional args; so need to make a wrapper script |
1126 | 1144 | # and then redirect, as desired, its output. |
@@ -1252,6 +1270,8 @@ jobs: |
1252 | 1270 | run: | |
1253 | 1271 | # Prepare run script for [transport_test - Scripted mode] variations below. |
1254 | 1272 | cat <<'EOF' > ${{ env.install-dir }}/bin/run_transport_test_sc.sh |
| 1273 | + # XXX Temporary; see test-subset input. |
| 1274 | + if [ '${{ github.event.inputs.test-subset }}' = 'u-t-only' ]; then echo 'Skipped per test-subset.'; exit 0; fi |
1255 | 1275 | echo "Log level: [$1]." |
1256 | 1276 | cd ${{ env.install-dir }}/bin/transport_test |
1257 | 1277 | OUT_DIR_NAME=log_level_$1 |
@@ -1317,6 +1337,8 @@ jobs: |
1317 | 1337 | # Prepare run script for [transport_test - Exercise mode] variations below. |
1318 | 1338 | cat <<'EOF' > ${{ env.install-dir }}/bin/run_transport_test_ex.sh |
1319 | 1339 | # Script created by pipeline during job. |
| 1340 | + # XXX Temporary; see test-subset input. |
| 1341 | + if [ '${{ github.event.inputs.test-subset }}' = 'u-t-only' ]; then echo 'Skipped per test-subset.'; exit 0; fi |
1320 | 1342 | echo "Log level: [$1]." |
1321 | 1343 | echo "Exercise sub-mode: [$2]." |
1322 | 1344 | echo "Sub-mode snippet (none or '-shm-?'): [$3]." |
@@ -1381,37 +1403,20 @@ jobs: |
1381 | 1403 | && (!cancelled()) && (steps.transport_test_ex_shm_c.outcome == 'failure') |
1382 | 1404 | run: /usr/bin/bash -e ${{ env.install-dir }}/bin/run_transport_test_ex.sh data shm_classic_log_level_data -shm-c |
1383 | 1405 |
|
1384 | | - # Disabling this particular test run for the specific case of clang-17 in TSAN (thread sanitizer) config |
1385 | | - # (in particular at least 2 other clangs+TSAN are exercised, so the TSAN coverage is still good). |
1386 | | - # First the reason in detail: This run semi-reliably (50%+) fails at this point in the server binary: |
1387 | | - # 2023-12-20 11:36:11.322479842 +0000 [info]: Tguy: ex_srv.hpp:send_req_b(1428): App_session [0x7b3800008180]: |
1388 | | - # Chan B[0]: Filling/send()ing payload (description = [reuse out-message + SHM-handle to modified (unless |
1389 | | - # SHM-jemalloc) existing STL data]; alt-payload? = [0]; reusing msg? = [1]; reusing SHM payload? = [1]). |
1390 | | - # LLVM ERROR: Sections with relocations should have an address of 0 |
1391 | | - # PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace. |
1392 | | - # Stack dump: |
1393 | | - # 0. Program arguments: /usr/bin/llvm-symbolizer-17 --demangle --inlines --default-arch=x86_64 |
1394 | | - # Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it): |
1395 | | - # ... |
1396 | | - # ==77990==WARNING: Can't read from symbolizer at fd 599 |
1397 | | - # 2023-12-20 11:36:31.592293322 +0000 [info]: Tguy: ex_srv.hpp:send_req_b(1547): App_session [0x7b3800008180]: Chan B[0]: Filling done. Now to send. |
1398 | | - # Sometimes the exact point is different, depending on timing; but in any case it is always the above |
1399 | | - # TSAN/LLVM error, at which point the thread gets stuck for a long time (10+ seconds); but eventually gets |
1400 | | - # unstuck; however transport_test happens to be testing a feature in a certain way so that a giant blocking |
1401 | | - # operation in this thread delays certain processing, causes an internal timeout, and the test exits/fails. |
1402 | | - # Sure, we could make some changes to the test for that to not happen, but that's beside the point: TSAN |
1403 | | - # at run-time is trying to do something and fails terribly; I have no wish to try to work around that situation; |
1404 | | - # literally it says "PLEASE submit a bug report [to clang devs]." |
1405 | | - # |
1406 | | - # TODO: Revisit; figure out how to not trigger this; re-enable. For the record, I (ygoldfel) cannot reproduce |
1407 | | - # in a local clang-17, albeit with libc++ (LLVM STL) instead of libstdc++ (GNU STL). I've also tried to |
1408 | | - # reduce optimization to -O1, as well as with and without LTO, and with and without -fno-omit-frame-pointer; |
1409 | | - # same result. |
| 1406 | + # clang-17 + TSAN only: |
| 1407 | + # In this config this run would semi-reliably (50%+) fail: TSAN reports during the run |
| 1408 | + # invoke llvm-symbolizer-17 which crashes on our binaries ("LLVM ERROR: Sections with relocations should |
| 1409 | + # have an address of 0" -- an LLVM bug; ticket filed), stalling the reporting thread 10+ seconds each |
| 1410 | + # time; and a certain giant blocking operation in a particular thread then delays certain processing, |
| 1411 | + # causing an internal timeout, and the test exits/fails. Worked around by symbolizing with a sibling |
| 1412 | + # llvm-symbolizer version in that config; see `setup-tests-env`. If this becomes insufficient, or some other |
| 1413 | + # such problem arises, it is defensible to disable this for the offending compiler, as there are as of this |
| 1414 | + # writing a few TSAN configs that would remain (different compiler version(s)). |
1410 | 1415 | - name: Run integration test [transport_test - Exercise mode - SHM-jemalloc sub-mode] |
1411 | 1416 | id: transport_test_ex_shm_j |
1412 | 1417 | if: | |
1413 | 1418 | (env.cell-selected == 'true') |
1414 | | - && (!cancelled()) && ((matrix.compiler.id != 'clang-17') || (matrix.build-test-cfg.sanitizer-name != 'tsan')) |
| 1419 | + && (!cancelled()) |
1415 | 1420 | run: /usr/bin/bash -e ${{ env.install-dir }}/bin/run_transport_test_ex.sh info shm_jemalloc -shm-j |
1416 | 1421 |
|
1417 | 1422 | - name: Re-run with increased logging, on failure only |
|
0 commit comments