godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
89.93k stars 21.06k forks source link

Linux crash in Mesa when using Iris driver #42264

Open Skallwar opened 4 years ago

Skallwar commented 4 years ago

Godot version: 3.2.3

OS/device including version: Linux 5.4.0-48-generic Ubuntu SMP x86_64 GNU/Linux

$ glxinfo | grep -i opengl
OpenGL vendor string: Intel
OpenGL renderer string: Mesa Intel(R) HD Graphics 520 (SKL GT2)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 20.0.8
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL version string: 4.6 (Compatibility Profile) Mesa 20.0.8
OpenGL shading language version string: 4.60
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 20.0.8
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

Issue description:

$ godot
Godot Engine v3.2.3.stable.custom_build - https://godotengine.org
OpenGL ES 3.0 Renderer: Mesa Intel(R) HD Graphics 520 (SKL GT2)

handle_crash: Program crashed with signal 11
Dumping the backtrace. Please include this when reporting the bug on https://github.com/godotengine/godot/issues
ERROR: execute: Cannot pipe stream from process running with following arguments '"addr2line" "0x7fd73dfc0210" "-e" "/home/chrx/Downloads/godot-3.2.3-stable/bin/godot.x11.opt.tools.64" 2>/dev/null'.
   At: drivers/unix/os_unix.cpp:306.
[1] /lib/x86_64-linux-gnu/libc.so.6(+0x46210) [0x7fd73dfc0210] ()
ERROR: execute: Cannot pipe stream from process running with following arguments '"addr2line" "0x7fd7374a3278" "-e" "/home/chrx/Downloads/godot-3.2.3-stable/bin/godot.x11.opt.tools.64" 2>/dev/null'.
   At: drivers/unix/os_unix.cpp:306.
[2] /usr/lib/x86_64-linux-gnu/dri/iris_dri.so(+0xb21278) [0x7fd7374a3278] ()
ERROR: execute: Cannot pipe stream from process running with following arguments '"addr2line" "0x7fd7374a58ff" "-e" "/home/chrx/Downloads/godot-3.2.3-stable/bin/godot.x11.opt.tools.64" 2>/dev/null'.
   At: drivers/unix/os_unix.cpp:306.
[3] /usr/lib/x86_64-linux-gnu/dri/iris_dri.so(+0xb238ff) [0x7fd7374a58ff] ()
ERROR: execute: Cannot pipe stream from process running with following arguments '"addr2line" "0x7fd737668a84" "-e" "/home/chrx/Downloads/godot-3.2.3-stable/bin/godot.x11.opt.tools.64" 2>/dev/null'.
   At: drivers/unix/os_unix.cpp:306.
[4] /usr/lib/x86_64-linux-gnu/dri/iris_dri.so(+0xce6a84) [0x7fd737668a84] ()
ERROR: execute: Cannot pipe stream from process running with following arguments '"addr2line" "0x7fd73747f86d" "-e" "/home/chrx/Downloads/godot-3.2.3-stable/bin/godot.x11.opt.tools.64" 2>/dev/null'.
   At: drivers/unix/os_unix.cpp:306.
[5] /usr/lib/x86_64-linux-gnu/dri/iris_dri.so(+0xafd86d) [0x7fd73747f86d] ()
ERROR: execute: Cannot pipe stream from process running with following arguments '"addr2line" "0x7fd7374804a5" "-e" "/home/chrx/Downloads/godot-3.2.3-stable/bin/godot.x11.opt.tools.64" 2>/dev/null'.
   At: drivers/unix/os_unix.cpp:306.
[6] /usr/lib/x86_64-linux-gnu/dri/iris_dri.so(+0xafe4a5) [0x7fd7374804a5] ()
ERROR: execute: Cannot pipe stream from process running with following arguments '"addr2line" "0x7fd736abe8d4" "-e" "/home/chrx/Downloads/godot-3.2.3-stable/bin/godot.x11.opt.tools.64" 2>/dev/null'.
   At: drivers/unix/os_unix.cpp:306.
[7] /usr/lib/x86_64-linux-gnu/dri/iris_dri.so(+0x13c8d4) [0x7fd736abe8d4] ()
ERROR: execute: Cannot pipe stream from process running with following arguments '"addr2line" "0x11b92dc" "-e" "/home/chrx/Downloads/godot-3.2.3-stable/bin/godot.x11.opt.tools.64" 2>/dev/null'.
   At: drivers/unix/os_unix.cpp:306.
[8] ./godot.x11.opt.tools.64() [0x11b92dc] ()
ERROR: execute: Cannot pipe stream from process running with following arguments '"addr2line" "0x2ade3b6" "-e" "/home/chrx/Downloads/godot-3.2.3-stable/bin/godot.x11.opt.tools.64" 2>/dev/null'.
   At: drivers/unix/os_unix.cpp:306.
[9] ./godot.x11.opt.tools.64() [0x2ade3b6] ()
ERROR: execute: Cannot pipe stream from process running with following arguments '"addr2line" "0x7d7e46" "-e" "/home/chrx/Downloads/godot-3.2.3-stable/bin/godot.x11.opt.tools.64" 2>/dev/null'.
   At: drivers/unix/os_unix.cpp:306.
[10] ./godot.x11.opt.tools.64() [0x7d7e46] ()
ERROR: execute: Cannot pipe stream from process running with following arguments '"addr2line" "0x7dbf05" "-e" "/home/chrx/Downloads/godot-3.2.3-stable/bin/godot.x11.opt.tools.64" 2>/dev/null'.
   At: drivers/unix/os_unix.cpp:306.
[11] ./godot.x11.opt.tools.64() [0x7dbf05] ()
ERROR: execute: Cannot pipe stream from process running with following arguments '"addr2line" "0x7a8d61" "-e" "/home/chrx/Downloads/godot-3.2.3-stable/bin/godot.x11.opt.tools.64" 2>/dev/null'.
   At: drivers/unix/os_unix.cpp:306.
[12] ./godot.x11.opt.tools.64(main+0x81) [0x7a8d61] ()
ERROR: execute: Cannot pipe stream from process running with following arguments '"addr2line" "0x7fd73dfa10b3" "-e" "/home/chrx/Downloads/godot-3.2.3-stable/bin/godot.x11.opt.tools.64" 2>/dev/null'.
   At: drivers/unix/os_unix.cpp:306.
[13] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3) [0x7fd73dfa10b3] ()
ERROR: execute: Cannot pipe stream from process running with following arguments '"addr2line" "0x7ab74e" "-e" "/home/chrx/Downloads/godot-3.2.3-stable/bin/godot.x11.opt.tools.64" 2>/dev/null'.
   At: drivers/unix/os_unix.cpp:306.
[14] ./godot.x11.opt.tools.64() [0x7ab74e] ()
-- END OF BACKTRACE --
Aborted (core dumped)

Steps to reproduce: Install Ubuntu godot3 package or compile Godot from source and launch it.

Things I've tried

akien-mga commented 4 years ago

No problem here on Mageia Cauldron with:

$ glxinfo | grep -i opengl
OpenGL vendor string: Intel
OpenGL renderer string: Mesa Intel(R) HD Graphics 630 (KBL GT2)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 20.1.7
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.6 (Compatibility Profile) Mesa 20.1.7
OpenGL shading language version string: 4.60
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 20.1.7
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:

"Intel" vendor means Iris, which is also the default driver since Mesa 20.0 IIRC.

Interestingly, when I try to force either i965 or iris with MESA_LOADER_DRIVER_OVERRIDE, I get super weird errors which don't make any sense:

$ MESA_LOADER_DRIVER_OVERRIDE=iris godot
Godot Engine v3.2.3.stable.mageia - https://godotengine.org
error: Kernel is too old for Iris. Consider upgrading to kernel v4.16.

libGL error: failed to create dri screen
libGL error: failed to load driver: iris
OpenGL ES 3.0 Renderer: Mesa Intel(R) HD Graphics 630 (KBL GT2)
...

$ MESA_LOADER_DRIVER_OVERRIDE=i965 godot
Godot Engine v3.2.3.stable.mageia - https://godotengine.org
libGL error: failed to create dri screen
libGL error: failed to load driver: i965
OpenGL ES 3.0 Renderer: Mesa DRI Intel(R) HD Graphics 630 (KBL GT2)

My kernel is 5.8.10 so the error is completing off.

akien-mga commented 4 years ago

Interestingly, when I try to force either i965 or iris with MESA_LOADER_DRIVER_OVERRIDE, I get super weird errors which don't make any sense:

These errors come from detect_prime.cpp @hpvb. Running with DRI_PRIME=0 fixes it:

$ MESA_LOADER_DRIVER_OVERRIDE=iris DRI_PRIME=0 godot
Godot Engine v3.2.3.stable.mageia - https://godotengine.org
OpenGL ES 3.0 Renderer: Mesa Intel(R) HD Graphics 630 (KBL GT2)
...

$ MESA_LOADER_DRIVER_OVERRIDE=i965 DRI_PRIME=0 godot
Godot Engine v3.2.3.stable.mageia - https://godotengine.org
OpenGL ES 3.0 Renderer: Mesa DRI Intel(R) HD Graphics 630 (KBL GT2)

@Skallwar Do you still get the crash if you set DRI_PRIME=0?

Skallwar commented 4 years ago

@Skallwar Do you still get the crash if you set DRI_PRIME=0?

@akien-mga Yes

Skallwar commented 4 years ago

@akien-mga ping ?

akien-mga commented 4 years ago

I suggest trying to upgrade to the latest Mesa version, and if that doesn't solve it, report a bug upstream to Mesa: https://gitlab.freedesktop.org/mesa/mesa/