Linux, Intel Arc B390 (Mesa ANV 26.2.5): segfault in libvulkan_intel.so on the first task/mesh draw after loading a save #748
Labels
No labels
accessibility
autorelease: pending
autorelease: tagged
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
question
testing wanted
wontfix
No milestone
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Hookshot#748
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hookshot version
hookshot v2.0.2-19-g66892e6 (source acd3b3a0)—mainat66892e6, built as the Linux AppImage withscripts/linux/deps.sh+scripts/linux/appimage.shin anubuntu:22.04container (same steps as CI), then--cli --updateinto the game folder.What kind of problem
Crash, freeze or black screen
What happened
The game segfaults inside Mesa's Intel Vulkan driver (ANV) on the first task/mesh draw after loading a save. Shader preparation finished cleanly first (
prepared 31985 shader programs (39842 new, 0 failed, 3808 stage libraries) in 652.8 s).The crash is a read of address
0xc8inlibvulkan_intel.so+0x3a9b48, which looks like a NULL object plus an offset in the driver. It is called from an indirect call (call *(%rax), probably the Vulkan draw call) inmkwvk::draw, reached throughreplay←run_submit←submit_job←submit_q. It happens on the same draw both times: program1bae, 3 stages (stage 1 + task stage 6 + mesh stage 7),mesh draw kind 0: 0 12 512. The GPU reportsmesh shaders yes, so this is the native mesh path, not the #640 compute fallback.This build includes the overnight mesh changes (#640's
emit_spirv_mesh.cpp/vk_draw.cppchanges) and the Intel changes (#496, #548). I have not bisected it yet. The vk back end can be rebuilt on its own, so I can test ahookshot_vk.sofrom a branch or commit if that helps.Possibly related: #17 has a B390 report, but that one is a device lost on Windows, while this is a segfault in the driver on Linux.
Where in the game
Right after loading a save file, before the first in-game frame.
How often
Every time (2 of 2 runs, identical crash address and draw).
Graphics card and driver version
Intel Arc B390 (Panther Lake iGPU), Mesa
vulkan-intel26.2.5 (Arch;libvulkan_intel.soBuildID6ce609c1a667be4f4358bbbbdc5dd02a7ad6a5dd), Vulkan 1.4, driver 0x6802005CPU, RAM and operating system
Intel Core Ultra X7 358H, 32 GB, Arch Linux (Omarchy), kernel 7.2.15, Wayland (Hyprland)
Changes from the defaults
None (no
hookshot_env.txt).Other software hooked into the game
No, nothing hooked in
hookshot_log.txt
Excerpt below; full
hookshot_log.txtandhookshot_log.1.txtattached.Before you send it
mainpast v2.0.2)Update, retested on
mainatb82bd36(v2.0.5-19-gb82bd36). Same machine: Arc B390, Mesa ANV 26.2.5, Arch.The original crash is gone. The first task/mesh draw (program
1bae) no longer crashes.A new crash replaces it, every time (3 of 3 runs), in the loading screen after picking a save, before Link appears. It's a SIGSEGV in
libvulkan_intel.so+0x9d8763, with a deep driver backtrace, on a background worker building a graphics pipeline:I added a log line before and after the
guarded_graphicscall inbuild_graphics. Exactly one pipeline started and never finished, and it was the same one in every run: programb0b3b40244c71ec7, a mesh + fragment pipeline (stages0x80,0x10). That's one of the grass-shadow programs that674d6e1(#482, "mesh programs with control topology 1 draw points") names. Its mesh SPIR-V hasOutputPoints,PrimitivePointIndicesEXTand aPointSizeoutput,LocalSize 32,OutputVertices 32andOutputPrimitivesEXT 32. Both stages passspirv-val --target-env vulkan1.3 --uniform-buffer-standard-layout --scalar-block-layout. So this looks like a Mesa ANV compiler bug with point-output mesh shaders that #482 now runs into. (I'm not attaching the SPIR-V, because it's built from the game's shaders. I can send the disassembly or anything else you need.)Confirmed by undoing #482: with
git revert 674d6e1(onlyhookshot_vk.sorebuilt), the crash is gone and the save loads. But the picture is unplayable, with random shapes, objects and icons flashing all over the screen. That's more than the grass-shadow streaks #482 fixed, so it may be a separate Intel rendering problem. So reverting isn't a fix. Intel probably needs another way to draw these point meshes, for example as tiny triangles, or a fix in Mesa.Also: with this build, the first-start shader preparation (after #772) needed about 33 GB (18 GB RSS + 14.5 GB swap). The previous build peaked around 20 GB. On a 32 GB machine it swapped for 20+ minutes. I skipped it with
hookshot_prepare_skippedto get to the crash. I can open a separate issue for that if it's useful.Let me guess, Intel G3 extreme handheld ?
no, intel arc B390 (dell xps 14)
Tracked in #999, follow there. That issue collects every report of Intel Arc / Core Ultra device lost, black screens and Linux ANV crashes, and this one is linked from it with its GPU, version and log details. If it still happens on v2.0.6 (https://github.com/NotRexed/Hookshot/releases/tag/v2.0.6; Update next to Play in the launcher), please add a comment there with your
hookshot_log.txt.