Vulkan llvmpipe driver crashes in `llvm::CmpInst::Create` with LLVM 15 (when trying to run Godot)

Bug #2072335 reported by Rémi Verschelde
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mesa (Ubuntu)
New
Undecided
Unassigned

Bug Description

I'm project maintainer for the open source Godot game engine [0], and we have a number of users running on Ubuntu 22.04 LTS who report crashes when trying to use the Vulkan rendering backend of the engine.

They're running on systems with old GPUs which do not support Vulkan, or in VMs, and thus the Vulkan loader falls back to llvmpipe for software rendering.

But the version provided in Ubuntu 22.04 seems broken and crashes:
```
(gdb) bt
#0 0x00007fffe7e2d0f0 in llvm::CmpInst::Create(llvm::Instruction::OtherOps, llvm::CmpInst::Predicate, llvm::Value*, llvm::Value*, llvm::Twine const&, llvm::BasicBlock*) () from /lib/x86_64-linux-gnu/libLLVM-15.so.1
#1 0x0000000000000000 in ?? ()
```

This has been an issue for a while, but doesn't seem to be a problem on e.g. Fedora 40 with Mesa 24.1.2-7.fc40 and LLVM 18.1.6-2.fc40.

This bug has been reported both to Godot (many times, consolidating in [1] and [2]) and upstream Mesa [3], which considers that the bug is fixed since it's not reproducible in latest Mesa.

We'd like to see some resolution on Ubuntu 22.04 while it's still supported. I was hoping that upgrading Mesa would help, but 22.04 now provides a recent-ish Mesa 23.2.1 which still has the bug, so I suspect the issue is something that needs to be fixed in LLVM itself, and was fixed at least in LLVM 18 but possibly also earlier versions.

I have yet to try newer Ubuntu versions to see whether the issue is solved there with newer LLVM/Mesa combos. I'll update this report when I get a chance to test.

Thanks!

[0] https://godotengine.org/
[1] https://github.com/godotengine/godot/issues/82435
[2] https://github.com/godotengine/godot/issues/74172
[3] https://gitlab.freedesktop.org/mesa/mesa/-/issues/5699

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.