Repository navigation
Description
Context
GitHub's macos-latest label migrated from macos-15-arm64 to
macos-26-arm64. Since that migration, FastLED's macOS unit and example
workflows compile successfully but hang when starting dynamically loaded
test/example libraries.
Strong A/B evidence:
- Run https://github.com/FastLED/FastLED/actions/runs/28732659489 used
macos-15-arm64and passed 266/266 tests. - Run https://github.com/FastLED/FastLED/actions/runs/28732654753 started
11 seconds earlier with the same dependency versions but used
macos-26-arm64; every shared-runner subprocess hung. - The last clean macOS 15 master run passed 267/267 tests:
https://github.com/FastLED/FastLED/actions/runs/28838232736 - Current master is affected:
The workflow, streaming executor, dynamic loader, and runner had no source
changes between the last green commit and the first failing commit.
The shared failure is in ci/meson/streaming.py:
- Ninja prints
Linking target <library>before the link operation has
completed. stream_compile_only()treats that status line as successful completion.- It immediately invokes
on_test_compiled(). - A worker starts
runner <test>.dylibor
example_runner <example>.dylib. - On macOS 26,
dlopen()can hang while ld64/lld is still writing the
Mach-O library. - The runner watchdog is installed after
dlopen(), so it cannot diagnose
or terminate this hang. - The Python process timeout kills workers in 600-second batches until the
enclosing workflow reaches its 30- or 45-minute timeout.
Both workflows pass --no-parallel, but the streaming path uses raw
os.cpu_count() and launches three workers anyway. This makes the race more
likely and means the command-line option does not provide its documented
behavior.
Raising workflow timeouts or pinning macos-15 would only mask the unsafe
link/load coordination.
Proposal
Make compilation and dynamic-library execution distinct phases:
stream_compile_only()should collect linked test/example paths without
executing callbacks from Ninja's pre-link status lines.- Wait for the Meson/Ninja process to finish successfully.
- Complete post-link mtime stabilization.
- Only then submit
CompileOnlyResult.compiled_teststo the execution pool. - Never run collected artifacts when compilation fails.
- Use
ci.util.cpu_count.cpu_count()for the streaming worker count so
NO_PARALLEL=1produces exactly one worker. - Keep the existing worker cap, filtering, max-failure handling, cached-build
fallback, and interrupt cleanup behavior. - Keep the workflows on
macos-latest; do not increase their timeouts or pin
macOS 15.
This shared fix must cover both unit-test dylibs and example dylibs.
Implementation steps
- Add a RED regression to the existing streaming-runner Python tests which
records when a fake test callback runs and proves it cannot run before the
fake compile process has completed successfully. - Add a regression proving a failed compilation executes zero collected
test/example artifacts. - Add a regression proving
NO_PARALLEL=1selects one streaming worker. - Update
stream_compile_only()to collect artifacts only. - Update
stream_compile_and_run_tests()to submit collected artifacts after
successful compilation and stabilization. - Replace direct
os.cpu_count()use with the repository's
ci.util.cpu_count.cpu_count()helper. - Update comments/docstrings that currently promise compile/test overlap.
- Run the focused Python regression until RED becomes GREEN.
- Run:
bash test test_streaming_runner_artifact_validation --pybash test --pybash lintbash test --cpp
- Open a PR and require both macOS workflows to complete on the current
macos-latest/macOS 26 image. - Confirm no orphaned
runnerorexample_runnerprocesses remain and the
workflows finish well below their timeout limits.
Acceptance criteria
- No test or example callback runs before Meson/Ninja exits successfully.
- Failed compilation executes no stale, missing, or partially linked
artifact. -
--no-parallel/NO_PARALLEL=1uses exactly one streaming worker. - Linux and Windows behavior remains green.
- The macOS unit workflow passes on
macos-latest/macOS 26. - The macOS example workflow passes on
macos-latest/macOS 26. - No macOS workflow pin or timeout increase is introduced.
- Focused regression, full Python tests, lint, and full C++ tests pass.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
zackees commentedon Jul 15, 2026
Correction after PR #3643 / macOS 26 validation
PR #3643 fixed two real correctness bugs in the streaming executor: execution can no longer overlap compilation, and
--no-parallelnow selects one worker. It was merged before its macOS check completed, however, and the macOS 26 run proves that those changes are not sufficient to fix this issue.Failed validation: https://github.com/FastLED/FastLED/actions/runs/29383388561/job/87251581047
Observed sequence in that job:
fl_active_strip_data_json.dylibthen hung for the full 600-second subprocess timeout.fastled_core.dylibalso hung for 600 seconds.This rules out concurrent linking as the sole cause and confirms that
NO_PARALLELis now honored. The remaining failure is inside the debug shared-library runner path itself.The strongest current discriminator is sanitizer configuration: the quick/non-sanitized macOS runner path passes, while the debug path builds both the runner and loaded
.dylibfiles with shared ASan/UBSan and hangs on macOS 26. The Apple runner also has an observability gap: unit-test watchdog setup happens afterdlopen(), and the Python timeout currently discards captured child output.Revised work plan
dlopen(), symbol lookup, test invocation, and teardown.main(), during sanitizer/crash setup, or indlopen().macos-latest; do not pin macOS 15 or merely raise workflow timeouts.PR #3644 contains the already-reviewed bounded DLL-touch wait and its regression coverage; it will carry the follow-up diagnostics/root fix.
zackees commentedon Jul 15, 2026
Diagnostic/containment update pushed in commit 5f0b697868 on PR #3644.
It implements the first four steps from the revised plan:
dlopen();The watchdog is deliberately built as a separate macOS-only static library with
-fno-sanitize=all. Its signal path uses onlywrite(2)and_exit(2), so it can report a timeout even if ASan/dyld loader locks are involved. Both unit and example runners use it.The next PR run is the discriminator:
main();crash-handler-setupmeans crash handler initialization;dynamic-loadmeansdlopen()/ sanitizer / dyld;symbol-lookupmeansdlsym();invocationmeans the loaded test/example body;teardownmeans cleanup or process exit.Once that run supplies the exact phase, the remaining work is:
macos-latest;master;Local validation for this update: focused regression 12 passed; Python CI tests excluding the unrelated long-running local QEMU integration 508 passed / 40 skipped; Ruff checks passed; C++ lint passed; C++ tests 350/350 passed; Python, C++, and Meson review passes clean.
zackees commentedon Jul 15, 2026
The diagnostic run now gives a decisive result: https://github.com/FastLED/FastLED/actions/runs/29385930873/job/87259086238
startupmarker;main(), during sanitizer/runtime initialization—not in FastLED'sdlopen()call or test body.This matches the Apple-reported macOS SDK 15+ ASan/dynamically-loaded-debug-library regression (Feedback FB16513866): https://developer.apple.com/forums/thread/774632
The permanent workaround is pushed in 06cdc873fb. On Apple debug builds only, every runner and dynamically loaded library is compiled with:
ASan heap/stack instrumentation, UBSan, debug symbols, and
macos-latestremain enabled. The workaround disables only the affected ASan global-variable instrumentation pass on macOS; Linux and Windows sanitizer configurations are unchanged.Local validation after the change: forced Meson reconfiguration and C++ rebuild succeeded, all 350/350 C++ tests passed, C++ lint passed, and the Meson review was clean. The new macOS 26 run is now the acceptance test. If it passes, the remaining required steps are the example-path validation, merge, and current-
masterunit/example validation before closing this issue.zackees commentedon Jul 15, 2026
Root-cause refinement: the
-asan-globals=0experiment did not restore the macOS completion time and has been removed from the final diff.The exact matching upstream report is LLVM #200447: llvm/llvm-project#200447
It reproduces with a trivial ASan executable on macOS 26.4 and identifies the pre-
main()deadlock as recursive allocation while the ASan runtime inspects dyld's shared cache. The report also confirms that changing ASan options or using older/newer pre-fix runtimes does not help. Apple shipped the runtime fix in Xcode 26.4+, and a reporter confirmed Xcode 26.5 resolves the repro.GitHub's current
macos-26image runs macOS 26.4 with Xcode 26.5 as the default, but FastLED's clang-tool-chain compiler was linking its bundled Clang 19 sanitizer runtime. Commit 573a05d93a now keeps clang-tool-chain for compilation while passing Xcode'sclang -print-resource-dirto the linker. Both runners and every loaded dylib therefore use the platform-compatible, fixed Xcode sanitizer runtime.This preserves the complete ASan instrumentation (including globals), UBSan, debug symbols, and
macos-latest. The superseded compiler workaround was removed. Forced local Meson rebuild: 350/350 tests passed; Meson review: clean. The new macOS 26 run is the acceptance test.[-]fix(ci): prevent macOS 26 streaming runner hangs[/-][+]fix(ci): prevent macOS 26 ASan startup hangs[/+]zackees commentedon Jul 15, 2026
Confirmed resolution after the runtime-only experiment:
The exact failure is LLVM #200447 (llvm/llvm-project#200447), a pre-
main()ASan initialization deadlock on macOS 26.4. The diagnostic run compiled and collected all 267 artifacts, then ten runners timed out without emitting the first startup marker: https://github.com/FastLED/FastLED/actions/runs/29385930873/job/87259086238The
573a05d93aexperiment selected Xcode's sanitizer resource directory only at link time while compiling with clang-tool-chain Clang 19. It failed quickly withundefined symbol: __asan_version_mismatch_check_v8, proving that Clang 19 instrumentation cannot be mixed with Xcode's Clang 21 runtime: https://github.com/FastLED/FastLED/actions/runs/29387594533/job/87264018034The corrected implementation is commit
fe0e73e292on PR #3644: #3644Required implementation, now pushed:
clang,clang++, andarthroughxcrun.clang-tool-chain-libdeployonly on Apple debug, because it can copy the old bundled compiler-rt next to an Xcode-linked runner.Regression coverage now proves Xcode tool resolution/failure handling, stale-marker migration,
CC/CXX/ARselection, Apple non-debug scoping, and Apple debug-only runtime-deployer suppression.Local validation:
Remaining acceptance steps:
unit tests macosjob on currentmacos-latestto compile and run successfully.master, require bothunit tests macosandexample tests macosto pass onmacos-latest.runner/example_runnerprocesses.No macOS pin, workflow timeout increase, or sanitizer-coverage reduction is part of the resolution.
zackees commentedon Jul 15, 2026
Acceptance-run follow-up: the first matched-toolchain job failed during Meson's compiler sanity check, not in ASan and not by cancellation: https://github.com/FastLED/FastLED/actions/runs/29388323772/job/87266129472
xcrun --find clang++correctly selected Xcode 26.5 / Apple Clang 21, but directly invoking that binary did not select a macOS SDK. The sanity link therefore failed withld: library 'c++' not found.Commit
e6a85aa254adds the missing Xcode SDK integration:xcrun --sdk macosx --show-sdk-path.-isysroot <SDK>to Apple-debug C/C++ compile and link built-in options in the Meson native file.SDKROOTfor Meson setup/compiler probes.cpp_argsinto both manual PCH compiler commands, which otherwise bypass normal target options.Local validation after this correction: focused regressions 22 passed plus 2 subtests; full Python 519 passed / 39 skipped / 7 subtests; forced C++ reconfiguration/build/execution 350/350; Python and Meson reviews clean.
The replacement macOS job is now the acceptance run. The issue remains open and no merge will occur until it is green.
zackees commentedon Jul 15, 2026
Post-merge validation found one remaining macOS-only gap, now addressed by PR #3645.
Current evidence:
Root cause:
PR #3644 corrected the sanitizer environment in ci/meson/runner.py, but ci/util/meson_example_runner.py had a separate copied prepare_sanitizer_environment call. That duplicated path continued to inject detect_leaks=1, so unit tests passed while examples failed.
Resolution in #3645:
Local verification:
Acceptance remains unchanged: keep this issue open until #3645 is merged and both the macOS unit and macOS example workflows are green on current master. No ESP32/board build is part of this fix.
zackees commentedon Jul 15, 2026
Resolved and validated on current master at merge commit 862508e.
Final acceptance evidence:
Shipped fixes:
Both required macOS workflows are green on the merged revision, so the investigation and fix are complete.
fix(ci): prevent macOS streaming runner hangs