Skip to content

fix(ci): address recurring Testsuite failures on macOS and dmd-master jobs - #3176

Merged
Geod24 merged 4 commits into
dlang:masterfrom
Geod24:mlang/fix-ci
Oct 30, 2026
Merged

Geod24 merged 4 commits into
dlang:masterfrom
Geod24:mlang/fix-ci

Conversation

@Geod24

@Geod24 Geod24 commented Oct 29, 2026

Copy link
Copy Markdown
Member

Three distinct issues have been keeping the Testsuite workflow red:

  • test: give fetchzip.sh and timeout.sh realistic timeout budgets The `timeout 1s`/`timeout 2s` budgets around `$DUB` invocations were exceeded by DUB's total runtime (startup + fetch) on slow runners, especially with coverage-instrumented builds, so `timeout` killed DUB after it had already printed success. Additionally, in fetchzip.sh the `rc -eq 124` checks were unreachable because the ERR trap fired on the `timeout` command itself before the checks could run; restructure the commands with `|| rc=$?` so the exit status is actually inspected. Budgets are now generous (30-60s): they only need to catch hangs, the semantic checks (DUB's own 8s HTTP timeout, retry counts) are unchanged.

  • ci: fix OpenSSL resolution on ARM64 macOS runners vibe-d:tls hardcodes `-L/usr/local/opt/openssl@1.1/lib`, which only exists for Intel Homebrew. On ARM64 runners (Homebrew in /opt/homebrew) `-lssl` fell back to the system LibreSSL, which lacks the deprecated DTLSv1_* symbols, so linking dub-test-library-nonet failed with undefined symbols. Install openssl@3 and export LIBRARY_PATH/PKG_CONFIG_PATH via `brew --prefix` (also making the coreutils PATH arch-independent).

  • test: print captured output when ninja generator tests fail The ninja tests used `execute()` which captures the subprocess output, so CI failures ('initial ninja build failed', 'build.ninja was not actually regenerated') carried no diagnostic information at all. Dump the captured output and distinguish the regen failure modes, so the remaining intermittent dmd-master failures can be diagnosed.

@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

✅ PR OK, no changes in deprecations or warnings

Total deprecations: 0

Total warnings: 0

Build statistics:

 statistics (-before, +after)
 executable size=5688656 bin/dub
 rough build time=43s
Full build output
DUB version 1.42.0, built on Aug 30 2026
LDC - the LLVM D compiler (1.43.0):
  based on DMD v2.113.0 and LLVM 22.1.8
  built with LDC - the LLVM D compiler (1.43.0)
  Default target: x86_64-unknown-linux-gnu
  Host CPU: znver5
  https://dlang.org - https://wiki.dlang.org/LDC


  Registered Targets:
    aarch64     - AArch64 (little endian)
    aarch64_32  - AArch64 (little endian ILP32)
    aarch64_be  - AArch64 (big endian)
    amdgcn      - AMD GCN GPUs
    arm         - ARM
    arm64       - ARM64 (little endian)
    arm64_32    - ARM64 (little endian ILP32)
    armeb       - ARM (big endian)
    avr         - Atmel AVR Microcontroller
    bpf         - BPF (host endian)
    bpfeb       - BPF (big endian)
    bpfel       - BPF (little endian)
    hexagon     - Hexagon
    lanai       - Lanai
    loongarch32 - 32-bit LoongArch
    loongarch64 - 64-bit LoongArch
    mips        - MIPS (32-bit big endian)
    mips64      - MIPS (64-bit big endian)
    mips64el    - MIPS (64-bit little endian)
    mipsel      - MIPS (32-bit little endian)
    msp430      - MSP430 [experimental]
    nvptx       - NVIDIA PTX 32-bit
    nvptx64     - NVIDIA PTX 64-bit
    ppc32       - PowerPC 32
    ppc32le     - PowerPC 32 LE
    ppc64       - PowerPC 64
    ppc64le     - PowerPC 64 LE
    r600        - AMD GPUs HD2XXX-HD6XXX
    riscv32     - 32-bit RISC-V
    riscv32be   - 32-bit big endian RISC-V
    riscv64     - 64-bit RISC-V
    riscv64be   - 64-bit big endian RISC-V
    sparc       - Sparc
    sparcel     - Sparc LE
    sparcv9     - Sparc V9
    spirv       - SPIR-V Logical
    spirv32     - SPIR-V 32-bit
    spirv64     - SPIR-V 64-bit
    systemz     - SystemZ
    thumb       - Thumb
    thumbeb     - Thumb (big endian)
    ve          - VE
    wasm32      - WebAssembly 32-bit
    wasm64      - WebAssembly 64-bit
    x86         - 32-bit X86: Pentium-Pro and above
    x86-64      - 64-bit X86: EM64T and AMD64
    xcore       - XCore
    xtensa      - Xtensa 32
   Upgrading project in /home/runner/work/dub/dub/
    Fetching vibe-stream 1.5.1 (getting selected version)
    Fetching openssl 3.4.0 (getting selected version)
    Starting Performing "release" build using /opt/hostedtoolcache/ldc2/1.43.0/x64/ldc2-1.43.0-linux-x86_64/bin/ldc2 for x86_64.
    Building dub 1.42.0-beta.1+commit.37.g6ce193b0: building configuration [application]
     Linking dub
STAT:statistics (-before, +after)
STAT:executable size=5688656 bin/dub
STAT:rough build time=43s

@PetarKirov

Copy link
Copy Markdown
Member

@Geod24 can you split your changes in atomic commits?

@Geod24

Geod24 commented Oct 29, 2026

Copy link
Copy Markdown
Member Author

Yeah will do - need dlang/dmd#24127 first anyway, as ubuntu isn't going to pass without it.

Geod24 and others added 2 commits October 30, 2026 03:01
The 1s/2s/10s `timeout` budgets raced DUB's own internal timeouts
(default 8s) — DUB startup alone can take a second or two, especially
in coverage builds on loaded runners — and the `! cmd; rc=$?` /
`if cmd; elif [ $? -eq 124 ]` idioms under `set -e` made the rc==124
checks dead code, so flakes showed up as misleading status codes.

Capture the exit status explicitly and distinguish a timeout (124,
a hang) from other failures, with budgets generous enough to only
ever catch actual hangs.

Co-Authored-By: Claude Code <noreply@anthropic.com>
When the ninja generator tests failed, the exit status alone carried
no diagnostic information. Dump the captured output of every failing
invocation and split the regeneration checks so the exact failure mode
is visible in CI logs.

This is what surfaced the upstream dmd segfault: the ninja children
intermittently die with status 139 on dmd master nightlies since
dmd#23999 (bump-allocator heap corruption).

Co-Authored-By: Claude Code <noreply@anthropic.com>
@Geod24

Geod24 commented Oct 30, 2026

Copy link
Copy Markdown
Member Author

Three commits. Also submitted vibe-d/vibe-stream#24 . Still haven't managed to land the PR I intended to though 😅

Geod24 and others added 2 commits October 30, 2026 11:29
vibe-stream 1.5.1 drops the hardcoded
`-L/usr/local/opt/openssl{,@1.1}/lib` lflags on macOS, which took
precedence over LIBRARY_PATH and pointed at paths that don't exist on
ARM runners (falling back to the system LibreSSL) or at the stale
OpenSSL 1.1.1w keg on Intel runners (clashing with the OpenSSL 3.x
API the deimos bindings select via pkg-config).

Also bump openssl to 3.4.0, as the new vibe-stream:tls requires
`~>3.4`.

Co-Authored-By: Claude Code <noreply@anthropic.com>
The OpenSSL-using test dependencies (vibe-stream:tls, openssl bindings)
must agree on one libssl: the linker finds it via LIBRARY_PATH, while
the deimos bindings select their API version via pkg-config. On ARM64
runners neither is set, so the link falls back to the system LibreSSL
(missing DTLSv1_* symbols), and any bindings/libssl version mix yields
undefined symbols such as _ERR_new or _SSL_get1_peer_certificate.

Install openssl@3 and point LIBRARY_PATH and PKG_CONFIG_PATH at it, so
the libssl actually linked always matches the selected bindings. Since
vibe-stream 1.5.1 removed the hardcoded `-L/usr/local/opt/openssl`
lflags, no other workaround is needed. Also use `brew --prefix` for the
GNU utils PATH so the step works on ARM (/opt/homebrew) as well as
Intel (/usr/local).

Co-Authored-By: Claude Code <noreply@anthropic.com>
@Geod24
Geod24 merged commit 4f740f1 into dlang:master Oct 30, 2026
37 checks passed
@Geod24
Geod24 deleted the mlang/fix-ci branch October 30, 2026 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants