You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ci: Tier 2 Linux gives tests a different environment in Docker and on the native runner #982
Found while moving Tier 2 Linux from the Docker harness to the native runner (#966, PR #967).
What happens
Two tests fail on the native ubuntu-26.04 runner, in both the OFF and the ON build and on both runs, while passing in the Docker container (locally and in CI):
test_group_empty_bounds / drag_into_filled_group: the item is at (642, 360)-(843, 460.5) on the canvas, expected (640, 360)-(840, 460)
test_scene_dup_group_children / private_copy_keeps_group_state: the grouped item moved
Why it can happen at all
validate.sh inherits whatever environment the harness gives it, and the two harnesses differ:
Docker (run.sh)
Native runner
user / $HOME
root, /root
runner, /home/runner (preexisting)
locale
unset (POSIX)
C.UTF-8
cmake on PATH
apt 4.2.3
runner's /usr/local/bin 4.4.3
extra libraries
only the package list
the runner image's preinstalls (incl. PPA builds)
Ruled out so far (in the container, with the same build)
CMake 4.4.3 vs 4.2.3: identical flags (-O2 -g -DNDEBUG), both pass.
LANG=C.UTF-8 vs unset: both pass.
an unprivileged user vs root: both pass.
So the group failures come from something else in the native environment (preinstalled libraries, or interaction with tests running alongside). That's being diagnosed separately, but nothing should let the two harnesses drift in the first place.
Fix
validate.sh pins the test environment for both harnesses: LANG/LC_ALL=C.UTF-8, TZ=UTC, a fresh HOME and XDG dirs under the build root, and the distro's /usr/bin ahead of /usr/local/bin, so the apt CMake is used.
It prints an environment fingerprint first (user, locale, nproc, cmake/gcc/ctest versions), so drift shows in the log.
Native run with the pinned environment (fingerprint user=runner nproc=4 locale=C.UTF-8 cmake=4.2.3 cc=cc (Ubuntu 15.2.0-16ubuntu1) 15.2.0 kernel=7.0.0-1017-azure): the two group tests still fail, with identical numbers. So locale, CMake and compiler are ruled out natively too.
The diagnostic step reran them alone, three times: 3/3 fail, so it isn't interference from parallel tests. ldd of libobs: the same 148 libraries at the same paths as the container. Group content comes out 199×99.5 instead of 200×100, which looks like rounding or precision. Next run's diagnostic: the same tests as root (sudo -E), the CPU model and flags (glibc's libm picks code paths per CPU), and the full environment.
Code lead for the two group tests (both now fail 3/3 alone natively, while libraries, CMake, compiler and locale match the container):
Positions are in relative coordinates by default (AbsoluteCoordinates false in obs->data.private_data, obs-scene.c:178), normalized by the parent's height (size_from_absolute, obs-scene.c:392).
resize_scene_base then sets the group size with ceilf of a float computed through those conversions: scene->cx = (uint32_t)ceilf(scale->x) (obs-scene.c:3571). A true 200 that computes as 200.00002 becomes 201, which with SCALE_INNER gives the observed (642, 360)-(843, 460.5) instead of (640, 360)-(840, 460) (content 199×99.5).
vec3_transform is plain SSE (no FMA) and rotation is 0, so the arithmetic is CPU-independent. The inputs must differ, most likely through tick timing: resize_group runs on video-thread ticks, and test_group_empty_bounds calls add_box() then add_to_group() with no wait between them, so a tick that lands in between resizes from an intermediate state.
Running as root in Docker may also give the video thread a scheduling priority the unprivileged runner user can't get. The pending diagnostic reruns the tests natively as root: if they pass, it's priority/timing.
Either way, a size that depends on tick timing and ceilf of a near-integer float is fragile in libobs itself. Candidate fix (for discussion, not done): compute the group size with a tolerance (ceilf(scale - 1e-4f)) or from absolute integer extents.
Diagnostic results (#967, OFF job): natively as root the two tests still fail with identical numbers, so it isn't the user or thread priority. CPU AMD EPYC 7763 (avx2, fma); environment unremarkable (no LD_PRELOAD, no glibc tunables; ImageVersion=20261012.163.1). The Docker job passes on the same machine pool, so hardware and kernel are the same. What's left is userspace library versions (the runner image's preinstalled snapshot against the container's archive versions). Container: libc6 2.43-2ubuntu2.4, Mesa 26.0.8-1ubuntu0.3, LLVM 21, libjansson4 2.14-2build4, xvfb 2:21.1.22-1ubuntu1.2. Next run prints the runner's versions of the same packages.
Last diagnostic: the runner's libc6, Mesa (libgl1-mesa-dri/libegl-mesa0/libgbm1 26.0.8-1ubuntu0.3), libstdc++6, libjansson4, libx11-6 and xvfb versions match the container exactly, and obs-scene.c's 52 compile flags are identical. (The runner also has LLVM 20 and 22 beside 21.) With libraries, compiler, flags, CPU, user, locale and timing all ruled out, what's left is the container boundary itself (devices, seccomp, cgroups).
To unblock without a Dockerfile, #967 now runs the job in a digest-pinned stock ubuntu:26.04 image (container:), with packages installed by apt at job start. Root cause stays open here.
Master push run 38868223793 (attempt 2), Tier 2 Linux in the stock ubuntu:26.04 job container with the git-safe fix (#1030): OFF and ON both pass, including test_group_empty_bounds and test_scene_dup_group_children. OFF 10.1 min, ON 8.7 min, in parallel. The direct-on-runner difference stays unexplained, but CI no longer depends on it.
Activity
test: Tier 2 Linux pins the test environment in both harnesses (RED, …
ci: Tier 2 Linux pins the test environment in both harnesses (Fixes #982
zackees commentedon Oct 16, 2026
Fix pushed to #967 (RED 67649c5, GREEN 7af7696). Local Docker harness with the pinned environment, OFF build: 251/251 passed, fingerprint:
Waiting on #967's native run for its fingerprint and the temporary group-test diagnostic (the two tests rerun alone, plus
lddof libobs).zackees commentedon Oct 16, 2026
Native run with the pinned environment (fingerprint
user=runner nproc=4 locale=C.UTF-8 cmake=4.2.3 cc=cc (Ubuntu 15.2.0-16ubuntu1) 15.2.0 kernel=7.0.0-1017-azure): the two group tests still fail, with identical numbers. So locale, CMake and compiler are ruled out natively too.The diagnostic step reran them alone, three times: 3/3 fail, so it isn't interference from parallel tests.
lddof libobs: the same 148 libraries at the same paths as the container. Group content comes out 199×99.5 instead of 200×100, which looks like rounding or precision. Next run's diagnostic: the same tests as root (sudo -E), the CPU model and flags (glibc's libm picks code paths per CPU), and the full environment.ci: TEMPORARY extend the native group-test diagnostic: root run, CPU,…
zackees commentedon Oct 16, 2026
Code lead for the two group tests (both now fail 3/3 alone natively, while libraries, CMake, compiler and locale match the container):
AbsoluteCoordinatesfalse inobs->data.private_data,obs-scene.c:178), normalized by the parent's height (size_from_absolute,obs-scene.c:392).resize_scene_basethen sets the group size withceilfof a float computed through those conversions:scene->cx = (uint32_t)ceilf(scale->x)(obs-scene.c:3571). A true 200 that computes as 200.00002 becomes 201, which withSCALE_INNERgives the observed(642, 360)-(843, 460.5)instead of(640, 360)-(840, 460)(content 199×99.5).vec3_transformis plain SSE (no FMA) and rotation is 0, so the arithmetic is CPU-independent. The inputs must differ, most likely through tick timing:resize_groupruns on video-thread ticks, andtest_group_empty_boundscallsadd_box()thenadd_to_group()with no wait between them, so a tick that lands in between resizes from an intermediate state.runneruser can't get. The pending diagnostic reruns the tests natively as root: if they pass, it's priority/timing.Either way, a size that depends on tick timing and
ceilfof a near-integer float is fragile in libobs itself. Candidate fix (for discussion, not done): compute the group size with a tolerance (ceilf(scale - 1e-4f)) or from absolute integer extents.zackees commentedon Oct 16, 2026
Diagnostic results (#967, OFF job): natively as root the two tests still fail with identical numbers, so it isn't the user or thread priority. CPU
AMD EPYC 7763(avx2, fma); environment unremarkable (noLD_PRELOAD, no glibc tunables;ImageVersion=20261012.163.1). The Docker job passes on the same machine pool, so hardware and kernel are the same. What's left is userspace library versions (the runner image's preinstalled snapshot against the container's archive versions). Container:libc6 2.43-2ubuntu2.4, Mesa26.0.8-1ubuntu0.3, LLVM 21,libjansson4 2.14-2build4,xvfb 2:21.1.22-1ubuntu1.2. Next run prints the runner's versions of the same packages.ci: TEMPORARY add library versions to the native group-test diagnosti…
ci: TEMPORARY print obs-scene.c's compile flags in the native diagnos…
zackees commentedon Oct 16, 2026
Last diagnostic: the runner's
libc6, Mesa (libgl1-mesa-dri/libegl-mesa0/libgbm126.0.8-1ubuntu0.3),libstdc++6,libjansson4,libx11-6andxvfbversions match the container exactly, andobs-scene.c's 52 compile flags are identical. (The runner also has LLVM 20 and 22 beside 21.) With libraries, compiler, flags, CPU, user, locale and timing all ruled out, what's left is the container boundary itself (devices, seccomp, cgroups).To unblock without a Dockerfile, #967 now runs the job in a digest-pinned stock
ubuntu:26.04image (container:), with packages installed by apt at job start. Root cause stays open here.ci: Run Tier 2 Linux in a stock ubuntu:26.04 container, no Dockerfile…
ci: Run Tier 2 Linux natively on the runner (obs-rust#967)
zackees commentedon Oct 16, 2026
Master push run 38868223793 (attempt 2), Tier 2 Linux in the stock
ubuntu:26.04job container with the git-safe fix (#1030): OFF and ON both pass, includingtest_group_empty_boundsandtest_scene_dup_group_children. OFF 10.1 min, ON 8.7 min, in parallel. The direct-on-runner difference stays unexplained, but CI no longer depends on it.