Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Godot 4 build with doubles crashes Mesa RADV Radeon drivers on launch (works with AMDVLK, fixed in Mesa 22.3) #58333

Closed
croxis opened this issue Feb 20, 2022 · 15 comments

Comments

@croxis
Copy link

croxis commented Feb 20, 2022

Godot version

4.0.dev (499eec1)

System information

Arch linux with amd 5700 xt

Issue description

Crashes with the following backtrace

./bin/godot.linuxbsd.double.opt.tools.64                                         INT ↵
Godot Engine v4.0.alpha.custom_build.6a51999b7 - https://godotengine.org
ERROR: GENERAL - Message Id Number: 0 | Message Id Name: Loader Message
	loader_scanned_icd_add: Driver /usr/lib/libvulkan_radeon.so supports Vulkan 1.2, but only supports loader interface version 4. Interface version 5 or newer required to support this version of Vulkan (Policy #LDP_DRIVER_7)
	Objects - 1
		Object[0] - VK_OBJECT_TYPE_INSTANCE, Handle 94548984335344
   at: _debug_messenger_callback (drivers/vulkan/vulkan_context.cpp:157)
Vulkan API 1.2.203 - Using Vulkan Device #0: AMD - AMD RADV NAVI10

================================================================
handle_crash: Program crashed with signal 8
Engine version: Godot Engine v4.0.alpha.custom_build (6a51999b7f4d9f7b1f950d7a655a464f28542318)
Dumping the backtrace. Please include this when reporting the bug on https://github.com/godotengine/godot/issues
[1] /usr/lib/libc.so.6(+0x42560) [0x7fc37ca18560] (??:0)
[2] /usr/lib/libvulkan_radeon.so(+0x1ed79e) [0x7fc37abd379e] (??:0)
[3] /usr/lib/libvulkan_radeon.so(+0x1eef5e) [0x7fc37abd4f5e] (??:0)
[4] /usr/lib/libvulkan_radeon.so(+0x1ef058) [0x7fc37abd5058] (??:0)
[5] ./bin/godot.linuxbsd.double.opt.tools.64(+0x1a24537) [0x55fddfb84537] (??:0)
[6] ./bin/godot.linuxbsd.double.opt.tools.64(+0x3b54aef) [0x55fde1cb4aef] (??:0)
[7] ./bin/godot.linuxbsd.double.opt.tools.64(+0xd49267) [0x55fddeea9267] (??:0)
[8] ./bin/godot.linuxbsd.double.opt.tools.64(+0x3b19830) [0x55fde1c79830] (??:0)
[9] ./bin/godot.linuxbsd.double.opt.tools.64(+0xd23282) [0x55fddee83282] (??:0)
[10] /usr/lib/libc.so.6(+0x2d310) [0x7fc37ca03310] (??:0)
[11] /usr/lib/libc.so.6(__libc_start_main+0x81) [0x7fc37ca033c1] (??:0)
[12] ./bin/godot.linuxbsd.double.opt.tools.64(+0xd3fdf5) [0x55fddee9fdf5] (??:0)
-- END OF BACKTRACE --
================================================================
[1]    77475 IOT instruction (core dumped)  ./bin/godot.linuxbsd.double.opt.tools.64

With a debug build

Vulkan API 1.2.203 - Using Vulkan Device #0: AMD - AMD RADV NAVI10

================================================================
handle_crash: Program crashed with signal 8
Engine version: Godot Engine v4.0.alpha.custom_build (3f3826edb8a3b5ea137dbe5a167e3b9336181551)
Dumping the backtrace. Please include this when reporting the bug on https://github.com/godotengine/godot/issues
[1] /usr/lib/libc.so.6(+0x42560) [0x7f211aa7d560] (??:0)
[2] /usr/lib/libvulkan_radeon.so(+0x1ed98e) [0x7f2118c7798e] (??:0)
[3] /usr/lib/libvulkan_radeon.so(+0x1ef14e) [0x7f2118c7914e] (??:0)
[4] /usr/lib/libvulkan_radeon.so(+0x1ef248) [0x7f2118c79248] (??:0)
[5] RenderingDeviceVulkan::render_pipeline_create(RID, long, long, RenderingDevice::RenderPrimitive, RenderingDevice::PipelineRasterizationState const&, RenderingDevice::PipelineMultisampleState const&, RenderingDevice::PipelineDepthStencilState const&, RenderingDevice::PipelineColorBlendState const&, int, unsigned int, Vector<RenderingDevice::PipelineSpecializationConstant> const&) (??:0)
[6] RendererCanvasRenderRD::RendererCanvasRenderRD(RendererStorageRD*) (??:0)
[7] RendererCompositorRD::RendererCompositorRD() (??:0)
[8] RendererCompositorRD::_create_current() (??:0)
[9] RendererCompositor::create() (??:0)
[10] RenderingServerDefault::RenderingServerDefault(bool) (??:0)
[11] Main::setup2(unsigned long) (??:0)
[12] Main::setup(char const*, int, char**, bool) (??:0)
[13] ./godot.linuxbsd.double.tools.64(main+0x134) [0x55be1781eb3d] (??:0)
[14] /usr/lib/libc.so.6(+0x2d310) [0x7f211aa68310] (??:0)
[15] /usr/lib/libc.so.6(__libc_start_main+0x81) [0x7f211aa683c1] (??:0)
[16] ./godot.linuxbsd.double.tools.64(_start+0x25) [0x55be17214655] (??:0)
-- END OF BACKTRACE --
================================================================
[1]    74981 IOT instruction (core dumped)  VK_ICD_FILENAMES= ./godot.linuxbsd.double.tools.64

If more info is needed, please tell me how. I'll need some hand holding.

Steps to reproduce

Build script: scons -j12 warnings=all werror=yes platform=linuxbsd tools=yes tests=no production=yes float=64 target=release_debug

Minimal reproduction project

No response

@Chaosus Chaosus added this to the 4.0 milestone Feb 20, 2022
@akien-mga akien-mga changed the title Godot 4 build with doubles crashes on launch Godot 4 build with doubles crashes Radeon drivers on launch Feb 20, 2022
@nicktheway
Copy link

Not sure if it affects the crash but regarding the
loader_scanned_icd_add: Driver /usr/lib/libvulkan_radeon.so supports Vulkan 1.2, but only supports loader interface version 4. Interface version 5 or newer required to support this version of Vulkan (Policy #LDP_DRIVER_7 part.

I was hitting that also on arch and happened after a vulkan-icd-loader update. To fix I had to downgrade to version 1.2.199-2 from the pacman's caches.

After the downgrade it disappeared from the warning in Godot 4. Could reproduce it without running godot though - just by running vulkaninfo.

If that affects the crash then the issue is probably not godot related, but again, it may be unrelated to the crash.

@croxis
Copy link
Author

croxis commented Feb 25, 2022 via email

@croxis
Copy link
Author

croxis commented Mar 11, 2022

I switched to amdvlk and it runs using that

@Malkverbena
Copy link

I am also experiencing this issue.
Ubuntu 21.04
Ryzen 1700x
Radeon RX580

@Calinou
Copy link
Member

Calinou commented Oct 16, 2022

I am also experiencing this issue. Ubuntu 21.04 Ryzen 1700x Radeon RX580

Which Godot version (exact commit) are you using?

@Malkverbena
Copy link

Custom build of #767f8fb
The latest one. I just compile it every day.

@Malkverbena
Copy link

I tried to switch to amdvlk. It's working now.
I guess it's driver's issue.

@Malkverbena
Copy link

I've tested Godot build with double on two other different machines.
I got the same issue in them all.
After switch to amdvlk everything works.

Ubuntu 22.04 - ryzen 5 5600x - Radeon RX 6500
Ubuntu 22.04 - ryzen 7 3700x - Radeon RX 580

@Calinou Calinou changed the title Godot 4 build with doubles crashes Radeon drivers on launch Godot 4 build with doubles crashes Mesa RADV Radeon drivers on launch (works with AMDVLK) Nov 7, 2022
@Calinou
Copy link
Member

Calinou commented Nov 7, 2022

Please report this to Mesa developers, as this is a third-party driver issue.

@clayjohn
Copy link
Member

clayjohn commented Nov 8, 2022

I have a feeling this is caused by us using real_t with shader structs. While working on particles I noticed a few Uniform Buffers had been changed from floats to real_t, which would cause alignment issues on doubles builds.

Stuff like this:

scale was turned into a real_t on the engine side, but it is still a float in the shader. There are a bunch of others in the particles uniforms, and I imagine there are other similar issues elsewhere.

Of course, without an MRP I can't say whether this contributes to the crash or not, it is just a hunch I have

@akien-mga
Copy link
Member

Is this the same issue as #67575?

If so check the linked Mesa bug report and feedback from upstream devs.

@Malkverbena
Copy link

I've tried use driver from Oibaf repository:
ppa:oibaf/graphics-drivers
It works. I believe godot was some bug with vulkan but I also believe there is a issue from vulkan side.

@Calinou
Copy link
Member

Calinou commented Jan 1, 2023

According to https://gitlab.freedesktop.org/mesa/mesa/-/issues/7528#note_1619087, Mesa 22.3 should fix this by supporting 64-bit vertex buffer formats in RADV. It's now released in stable form, so (half-)rolling release distributions should have it by now.

Unfortunately, Mesa 22.3 may not be backported to all LTS Linux distributions. Ubuntu generally backports Mesa updates as part of its hardware enablement stack, but in other distributions, you'll have to use third-party repositories to get up-to-date graphics drivers. This could affect Debian stable and CentOS desktops in particular.

@akien-mga akien-mga changed the title Godot 4 build with doubles crashes Mesa RADV Radeon drivers on launch (works with AMDVLK) Godot 4 build with doubles crashes Mesa RADV Radeon drivers on launch (works with AMDVLK, fixed in Mesa 22.3.0) Jan 9, 2023
@akien-mga akien-mga changed the title Godot 4 build with doubles crashes Mesa RADV Radeon drivers on launch (works with AMDVLK, fixed in Mesa 22.3.0) Godot 4 build with doubles crashes Mesa RADV Radeon drivers on launch (works with AMDVLK, fixed in Mesa 22.3) Jan 9, 2023
@akien-mga
Copy link
Member

Closing as fixed in Mesa 22.3 then, as there's not much we can do on our side to work around the issue in older driver versions.

@github-project-automation github-project-automation bot moved this from To Assess to Done in 4.x Priority Issues Jan 9, 2023
@somebody1121
Copy link

somebody1121 commented Jan 9, 2023

Could not be done a check to inform the user that a more up to date driver is need? Just crashing could be confusing.
Edit: correct typos.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

9 participants