iokitd opens DISPLAY and falls back to :0, but the env-check probe only asked
xdpyinfo for DISPLAY. It could warn on a host where iokitd still had a display,
or pass on :0 while DISPLAY was broken. The probe now tries :0 when DISPLAY is
unset or cannot be opened, and the one-line log names the fallback, so the
probe and the guest agree.
prepare.py --check-only validates all 31 patch entries with the new hunk;
iokitd rebuilds and carries the new message.
Signed-off-by: zero <zero@localhost>
- a forwarded SIGINT/SIGTERM/SIGHUP now leaves the polling loop, so the
five-second TERM grace and the SIGKILL fallback actually run; a loader that
ignores SIGTERM no longer blocks the supervisor forever
- surviving guest processes now return a non-zero status instead of 0
- an invalid RCLOL_STOP_AFTER_CLIENT_SECONDS warns and disables the idle stop
instead of aborting the launch with a traceback
Adds a regression test that sends SIGTERM to a loader and a descendant that
both ignore it, and asserts the process group is killed.
Signed-off-by: zero <zero@localhost>
vulkan_devices() flattened every apiVersion and check_vulkan() accepted any
timelineSemaphore = true, so a host with an old fast device and a new device
without timeline semaphores could pass without a usable device. Each GPUn
block is now one record, and one device must report both.
The full dump supplies the features and --summary the versions, matched by
GPU index. A dump without feature sections still gets the version check, and a
summary that lists no device is a required failure.
Adds three tests: a second device satisfies both, requirements are not
combined across devices, and no reported device.
- an installed vulkaninfo that errors or times out is now a required failure
with an actionable line; a missing one still only warns
- llvm_tools runs llvm-config with a 30 second timeout and reports it instead
of hanging the preflight or the build
- RCLOL_PREFLIGHT_SOURCE overrides the prepared checkout, so the tests never
scan (or fail on) a real build/darling-src
Adds four tests: missing vs broken vulkaninfo, and the two timeout paths.
setup failures reported in #137, #138 and #143 happened only after the long
fetch/build or at Riot startup. scripts/preflight.py now runs from
scripts/build.sh (before configure.py, so an old interpreter gets this message
and not a traceback) and from scripts/install-runtime.sh, and checks the host
once:
- python 3.10+, cmake 3.20+ (the bundled indium CMakeLists requires it),
git-lfs 2.13+, kernel 5.14+ and LLVM 16+ exit nonzero with one actionable
line each. RCLOL_SKIP_PREFLIGHT=1 bypasses the gate.
- llvm-objdump and llvm-nm are required, and unresolved names are explained.
- Vulkan 1.3 and timeline semaphores are required when vulkaninfo is
installed; they only warn when it is not, because a missing tool does not
mean a missing driver.
- the X display is probed with xdpyinfo in the environment Darling inherits.
It only warns: a build does not need a display.
- a prepared build/darling-src is scanned for small .dylib/.a/.so/.o files
that still contain Git LFS pointer text, which links but crashes the guest.
- --json prints the same report for the diagnostic tools.
The installers no longer call hashlib.file_digest (Python 3.11+), so Ubuntu
22.04's Python 3.10 works instead of failing after the overlays are built
(#137). A streaming tools/file_digest.py replaces it.
LLVM command line tools are resolved by tools/llvm_tools.py: an unversioned
name on PATH first, then the highest llvm-<tool>-<N>, then llvm-config
--bindir. Debian/Ubuntu install llvm-objdump and llvm-nm only under
/usr/lib/llvm-<N>/bin, which broke the runtime validation (#138). Six tools
now use it. The LLVM 16 floor also stops the LLVM 15 runtime abort from #139
before anything is built.
Two test helpers used APIs added after Python 3.10; they are shimmed so the
same suite runs on 3.10, 3.11 and 3.14.
Adds tests/test_preflight.py (24 tests, fake host tools only).
With DISPLAY set but XAUTHORITY missing or stale, the X server rejects the
connection, XOpenDisplay() returns NULL, and iokitd passed that NULL display
to eglGetPlatformDisplay(). Mesa's X11 platform expects a real Display there,
so iokitd faulted and launchd restarted it every 10 seconds while /tmp/lolsig.log
filled with frames (issue #140).
IOSurfaceRoot now checks the display first, stays at EGL_NO_DISPLAY and prints
one line when it is missing. createSurface() already returns KERN_FAILURE for
!hasDisplay(), so surfaces fail closed instead of the process crashing. The
destructor also skips eglTerminate() when no display was initialized.
Documents that DISPLAY alone is not enough on servers and SSH sessions, and
adds a display probe to tools/env-check.sh: it reports DISPLAY/XAUTHORITY and
warns when xdpyinfo cannot open the display that Darling will inherit.
Signed-off-by: zero <zero@localhost>
Moving the checkout to another path or account left three kinds of stale
state behind (issue #142):
- configure.py kept the previous home's default prefix. A saved prefix that
was exactly <previous home>/.darling now follows the current host home; a
user-chosen prefix is kept, and one inside the previous home is reported
with the --prefix escape hatch.
- build/runtime/build was an absolute symlink, so it dangled after a move and
the "not link.exists()" guard treated the dangling entry as absent. It is
now a relative link and an absolute or dangling leftover is replaced. A
real directory at that path is reported and left untouched.
- A CMake cache generated for another source directory made the build fail
with permission errors against the old path. configure.py now reports the
cache and the exact directory to remove, and never deletes it itself.
Patches are rendered at prepare.py time, so the report also points at the
re-render path. Documents the moved-checkout steps and the opt-in RenderDoc
diagnostic, which still expects files no setup script creates.
Adds 7 tests to tests/test_setup_portability.py.
Signed-off-by: zero <zero@localhost>
The stub records the final darling launch after exec-guest.py. The launcher
now runs session-supervisor.py first, so the stub hands the supervised command
to exec-guest.py instead of stopping at the supervisor. The guest assertions
are unchanged: they still inspect the launch that exec-guest.py performs.
The Riot Client does not exit when its window closes, and a loader that dies
first leaves launchd/mldr and the client tree holding memory until the runtime
is restarted by hand. run-riot-client.sh now execs a small supervisor instead
of the guest loader:
- SIGINT/SIGTERM/SIGHUP are forwarded to the guest process group, the loader
gets a grace period, and darling shutdown runs before any leftover guest
process is stopped.
- Leftovers are stopped only when they carry this prefix's __mldr_sockpath and
the same uid, deepest-first, SIGTERM then SIGKILL. The guest PID namespace is
learned while the session runs; a namespace equal to the host's is refused.
- Cleanup only runs when this launcher started the runtime, so a second launch
that attaches to an existing server leaves it running.
- RCLOL_STOP_AFTER_CLIENT_SECONDS=N adds an opt-in idle stop: it fires only
after a managed client window was seen and is gone for N seconds with no game
process, and never when the window state cannot be read. Off by default.
- RCLOL_CLEAN_ON_EXIT=0 keeps the previous exec-only behaviour.
Adds 23 unit tests for attribution, namespace scoping, shutdown ordering, the
attached-session guard and the idle decision.
- doctor: resolve the workspace/Nix runtime before the native path, honour
multi-entry XDG_DATA_DIRS, raise the kernel minimum to 5.14, and redact
home/prefix/workspace paths by default (--no-redact opts out). Reports are
written mode 0600.
- crash-report: drop the whole-process table from the default bundle
(--all-processes opts in), mask credentials in argv, strip window titles,
validate --label, find the workspace launcher log, bound the log tail,
describe missing logs, write the archive 0600 without owner metadata, and
keep --json output pure JSON.
- perf-baseline: reject non-finite times and absurd frame times, count
--last by usable match, include the last sample interval in duration,
record only the log basename, and rename p50/p95/p99 to sample_p* to make
clear they are ten-second samples.
- docs: correct the metric descriptions, flag names and shader-cache sign.