- Dec 07, 2023
-
-
Simon McVittie authored
This makes room for /run/host to be used for the $FEX_ROOTFS. We currently implement this by distinguishing between /run/host and $FEX_ROOTFS/run/host, but we want to stop doing that, because it interferes with path resolution for /run if it exists inside the $FEX_ROOTFS. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
We have to mount the graphics provider below $FEX_ROOTFS, so that when other parts of the $FEX_ROOTFS have symbolic links into it, those symlinks are resolved successfully even with FEX's interference (it resolves symlinks as if chrooted into the $FEX_ROOTFS). However, if we mount anything below $FEX_ROOTFS/run, that has the undesired effect that sockets mounted in the real root filesystem's /run are not visible to a readdir() by emulated x86 code. If we move the graphics provider outside /run, we can avoid this. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Dec 01, 2023
-
-
Simon McVittie authored
pv-runtime: Avoid relying on soname-match and therefore ld.so.cache See merge request !636
-
- Nov 30, 2023
-
-
Ludovico de Nittis authored
populate-depot: Allow SteamLinuxRuntime_whatever/.ref to exist See merge request !637
-
- Nov 29, 2023
-
-
Simon McVittie authored
pv-wrap creates this lock file for compatibility with very old (pre-2021) versions of the Steam Linux Runtime, which took this lock before unpacking scout or soldier from a tarball, because at the time the Steampipe CDN did not cope well with a large number of small files. Fixes: 0f89e027 "populate-depot: Write a top-level mtree" Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Nov 28, 2023
-
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Same reasoning as the previous commit, but for the graphics stack rather than NSS. Helps: https://github.com/ValveSoftware/steam-runtime/issues/632 Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Normally, operating systems arrange for ld.so.cache to contain all core system libraries for both word sizes, and especially glibc. However, on heavily customized systems, they might not be in the ld.so.cache at all, only in the LD_LIBRARY_PATH. soname-match is implemented in terms of the ld.so.cache and therefore ignores the LD_LIBRARY_PATH, so we cannot rely on it on such systems. Instead, try to load a concrete SONAME directly, which takes into account the LD_LIBRARY_PATH (and other information sources like RUNPATHs). Continue to fall back to using soname-match for future-proofing against possible future glibc changes on systems that make a normal level of use of the ld.so.cache. Helps: https://github.com/ValveSoftware/steam-runtime/issues/632 Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Nov 27, 2023
-
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Nov 24, 2023
-
-
Ludovico de Nittis authored
pv-runtime, pv-adverb: Use ${LIB} instead of ${PLATFORM} if possible Closes tasks#349 See merge request !635
-
Ludovico de Nittis authored
pv-wrap: Fix minor issues caught by the test suite See merge request !634
-
- Nov 23, 2023
-
-
Ludovico de Nittis authored
pv-wrap: Don't try to construct a sysroot for a NULL path See merge request !633
-
Ludovico de Nittis authored
subprocess: Avoid using timeout(1) to impose a timeout on subprocesses Closes #88 See merge request !626
-
Ludovico de Nittis authored
subprocess: Start the subprocess asynchronously, then wait for it See merge request !628
-
- Nov 22, 2023
-
-
Simon McVittie authored
This lets us use a path based on ${LIB} rather than ${PLATFORM}, which will work under FEX-Emu. Helps: steamrt/tasks#349 Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
When running under FEX-Emu, we cannot determine the correct value for ${PLATFORM}. However, the standard "rootfs" environments for FEX-Emu are all based on operating systems whose ${LIB} setup we understand - either Debian multiarch, FHS/Red Hat multilib, or Arch multilib - so we can prefer to use one of those, only falling back to ${PLATFORM} if nothing else works. Helps: steamrt/tasks#349 Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Otherwise, pv-adverb will be unable to detect the expansion of ${LIB} or ${PLATFORM}, leading to a somewhat unrealistic test. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
No functional changes. The vast majority of our delta was merged: our only remaining changes are to use a slightly older WAFFLE_API_VERSION, and apply https://gitlab.freedesktop.org/mesa/waffle/-/merge_requests/146 as local delta. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
There appears to be a once-per-process memory leak in wegl_display_init(), which is uninteresting for a short-lived process. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Previously we allocated one GVariant per loop, but only freed the last. When building with AddressSanitizer, this caused a crash which is reported to systemd-coredump if used (but the JSON output was valid, and the test suite can't assert that check-xdg-portal succeeds because on some test systems it might not, so the crash did not cause a test failure). Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
No functional change intended, it just uses a little less memory. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
The SrtSysroot passes it to a function that is annotated as not validly accepting NULL, which is caught by recent functions of UBSan. In practice _srt_sysroot_new() would have returned NULL in this situation anyway. Fixes: 1d08d563 "pv-wrap: Use a SrtSysroot to represent the interpreter root" Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Nov 21, 2023
-
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Ludovico de Nittis authored
Add a tool to verify runtimes against a mtree manifest See merge request !631
-
- Nov 17, 2023
-
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This will make it easy to verify that `SteamLinuxRuntime_sniper` and `SteamLinuxRuntime_soldier` are intact: .../SteamLinuxRuntime_sniper/pressure-vessel/bin/pv-verify and only slightly more difficult to do the same for SLR 1.0: .../SteamLinuxRuntime_soldier/pressure-vessel/bin/pv-verify \ .../SteamLinuxRuntime A more explicit version of the first command is: .../SteamLinuxRuntime_sniper/pressure-vessel/bin/pv-verify \ --mtree=.../SteamLinuxRuntime_sniper/mtree.txt.gz \ -- \ .../SteamLinuxRuntime_sniper/pressure-vessel but the defaults are sensible. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This will allow a similar code path that verifies instead of applying. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This provides a convenient way to check whether the depot has the contents we believe it should. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This matches the output of bsdtar (libarchive), for example: bsdtar -cf- --format=mtree -C ~/tmp . and NetBSD mtree(8) (the mtree-netbsd package in Debian), for example: mtree -c -p ~/tmp | mtree -C Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
There are too many false positives if we do. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
The key trick here is that on any halfway modern kernel, we can use waitid() in a background thread with the WNOWAIT flag, which pauses until the subprocess has exited but does not reap it, allowing the main thread to wait for it again, this time without WNOWAIT, causing the subprocess to be reaped. This is considerably faster than the previous implementation, around 30% on both x86 and ARM. I considered using a GThreadPool to reuse the short-lived threads, but that's more complex and doesn't actually seem to be any faster than creating and destroying the thread every time. Resolves: #88 Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
We expect that "most" subprocesses will exit shortly after closing their stdout and stderr, so by the time we have read their output, polling their exit status will probably succeed. In practice, this mostly counteracts the performance penalty from the previous commit on x86. On ARM emulating x86 with FEX-Emu, it's still inconveniently slow (time taken > my patience to wait for it). Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This is more difficult than you might think, because until GLib 2.78 (which is far too new for us to depend on), there was a potential race condition between g_child_watch_source_new()'s use of waitpid(), and a kill() in the same main-context. We don't really want to use g_child_watch_source_new() anyway, because we don't know whether this library is going to be loaded by a process that is blocking SIGCHLD or handling SIGCHLD itself. Avoiding timeout(1) can result in a significant speedup on ARM hardware emulating x86 via FEX-Emu, which makes executable startup disproportionately expensive: each new executable needs to re-initialize the interpreter, which is normally fine, but the cost builds up when we run a very large number of very small processes. Avoiding timeout(1) is also good for robustness: in the past, Canonical's Steam Snap app has had an AppArmor profile that did not allow arbitrary coreutils commands to be run. In this initial implementation, we poll the process every 100ms. This is *much* slower than blocking (it adds up to 100ms to every subprocess execution, resulting in a slowdown from around 8 to 96 seconds for steam-runtime-system-info on x86), but it can be used as a fallback. It's in this commit to have an opportunity to test the fallback code path. Subsequent commits will speed this up again. Helps: #88 Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This is a step towards being able to do other things while we are waiting, in particular killing the subprocess with a signal if it times out (for which we would need to do coordinate between a thread that calls waitpid(), and a thread that iterates the main-context to handle the timeout). Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Ludovico de Nittis authored
pv-adverb: Show contents of ld.so.cache if debug output is enabled See merge request !630
-