From 8b7cc07adbaddd9c1c1a07a03d0f8eadbbedad51 Mon Sep 17 00:00:00 2001 From: Kirill Date: Sun, 15 Nov 2026 18:33:19 +0400 Subject: [PATCH] Fetch the pinned Venus component in local builds (#975) Venus: fix the render server's destroyed-mutex abort; fetch Venus in local builds The render server aborted with "pthread_mutex_lock called on a destroyed mutex" whenever a context died while its device still had objects. vkr_device_destroy destroys dev->object_mutex before the loop that frees those objects, and each vkr_device_remove_object in that loop locks the mutex. glibc tolerates this; bionic's FORTIFY aborts, and every client of that server goes down with it. The mutex is now destroyed after the loop (virglrenderer 1.3.0 and main share the bug). tools/build_local.sh now fetches the Venus component by tools/venus/release.env, as build.yml does. It unpacks the component after assets/linuxfs is rebuilt, so the Mali compatibility layer stays in the APK. DROIDDECK_VENUS_TZST points it at a locally built venus.tzst. The unpacked binaries are git-ignored. Seen on a Pixel 10a (Tensor G4, Mali-G715, Android 17 beta): Steam Big Picture reaches its login screen on the Mali (Venus) route. Co-authored-by: xXJsonDeruloXx Co-authored-by: Kurt Himebauch <136133082+xXJSONDeruloXx@users.noreply.github.com> --- .gitignore | 5 +++++ tools/build_local.sh | 14 ++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/.gitignore b/.gitignore index f5d56071f8..27a4aee071 100644 --- a/.gitignore +++ b/.gitignore @@ -34,3 +34,8 @@ __pycache__/ app/src/main/assets/directaudio/ app/src/main/assets/hybris/ /tools/vr/out/ +app/src/main/assets/venus/ +app/src/main/jniLibs/arm64-v8a/libvirgl_test_server.so +app/src/main/jniLibs/arm64-v8a/libvirgl_render_server.so +app/src/main/jniLibs/arm64-v8a/libvirglrenderer.so +app/src/main/jniLibs/arm64-v8a/libepoxy.so diff --git a/tools/build_local.sh b/tools/build_local.sh index 63c5ced875..419df105fb 100755 --- a/tools/build_local.sh +++ b/tools/build_local.sh @@ -232,6 +232,20 @@ if [[ -f "${repo_root}/tools/gamescope/release.env" ]]; then test -f "${linuxfs_dir}/usr/local/bin/gamescope" fi +if [[ -f "${repo_root}/tools/venus/release.env" ]]; then + . "${repo_root}/tools/venus/release.env" + if [[ -n "${DROIDDECK_VENUS_TZST:-}" ]]; then + venus_archive=${DROIDDECK_VENUS_TZST} + echo "venus: using ${venus_archive} instead of ${VENUS_TAG}" + else + venus_archive=$(cached "${VENUS_SHA256}" venus.tzst \ + bash -c 'gh release download "$0" -R "$1" -p venus.tzst -O "$out"' "${VENUS_TAG}" "${VENUS_REPO}") + fi + zstd -dc "${venus_archive}" | tar -xf - -C "${repo_root}/app/src/main" + test -f "${repo_root}/app/src/main/jniLibs/arm64-v8a/libvirgl_test_server.so" + test -f "${repo_root}/app/src/main/assets/venus/libvulkan_virtio.so" +fi + . "${repo_root}/tools/linuxfs/uruntime.env" uruntime_binary=$(cached "${URUNTIME_SHA256}" "${URUNTIME_ASSET}" \ bash -c 'curl -fsSL --retry 5 --retry-all-errors --connect-timeout 20 -o "$out" "$0"' "https://github.com/VHSgunzo/uruntime/releases/download/${URUNTIME_VERSION}/${URUNTIME_ASSET}")