Revert runner-contention theory, add gdb diagnostics for the test segfault
The windows job hadn't even started when build's odin test segfaulted again on its own (run 132), so concurrency wasn't the cause. Add a Debug Segfault step that runs the already-built test binary under gdb to get a backtrace, since this doesn't reproduce locally or in a plain ubuntu:24.04 container with the same Odin build. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
458f0edccb
commit
0776e8e4b9
2 files changed
+14
-9
No files matched your search
@@ -30,18 +30,23 @@ jobs:
|
||||
- name: Test
|
||||
run: just test
|
||||
|
||||
- name: Debug Segfault
|
||||
if: failure()
|
||||
run: |
|
||||
uname -a
|
||||
cat /etc/os-release || true
|
||||
clang --version
|
||||
ulimit -a
|
||||
free -h || true
|
||||
SUDO=""; command -v sudo >/dev/null && SUDO=sudo
|
||||
$SUDO apt-get install -y --no-install-recommends gdb >/dev/null
|
||||
gdb -batch -ex run -ex bt -ex "info registers" build/tests
|
||||
|
||||
- name: Build
|
||||
run: just release
|
||||
|
||||
# Cross-compiles for Windows so link breakages show up before a release.
|
||||
# Runs after `build`: both jobs land on the same self-hosted runner, and the
|
||||
# first run segfaulted `odin test` in `build` while `windows` was doing its
|
||||
# (uncached) SDK download/splat at the same time - resource contention, not
|
||||
# a code or toolchain bug (odin check passed; the test suite reproduces fine
|
||||
# in isolation). Sequencing avoids that contention at the cost of a longer
|
||||
# total run.
|
||||
# Cross-compiles for Windows so link breakages show up before a release
|
||||
windows:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
|
||||
@@ -38,7 +38,7 @@ Commands (see `justfile`): `just run`, `just check`, `just test`, `just package
|
||||
6. **Windows builds are cross-compiled**: Odin can't link Windows binaries on Linux, so `just windows` builds objects with `-build-mode:obj` and links with `lld-link` against an xwin SDK. The VC runtime is linked statically; only Windows system DLLs are needed. New Odin core usage can need new import libs (e.g. `ole32.lib` for `os.user_data_dir`); the CI `windows` job catches this. Not yet tested on a real Windows machine.
|
||||
7. **Odin constant arrays can't be indexed at runtime**: lookup tables (`DECKS`, `LAYOUTS`, …) are `@(rodata)` globals instead of `::` constants.
|
||||
8. **Profile memory**: `profile` always allocates from the heap allocator, because the test runner frees each test's allocator afterwards.
|
||||
9. **CI jobs share one self-hosted runner**: `build` and `windows` in `gitea-build.yaml` land on the same machine. Running them concurrently once segfaulted `odin test` while `windows` was mid-SDK-download, so `windows` now runs with `needs: build` to avoid the contention.
|
||||
9. **CI's `build` job segfaults on `odin test`** (exit 139) on the self-hosted runner, even running alone — reproduces every push so far. Does not reproduce locally or in a plain `ubuntu:24.04` container with the same Odin version, so it's specific to the runner's actual job image/environment, not the test code. Under investigation; see the `Debug Segfault` diagnostic step in `gitea-build.yaml`.
|
||||
|
||||
## File Structure
|
||||
```
|
||||
|
||||
Reference in new issue
Block a user