NTMan
January 31, 2018, 6:42pm
1
All games maded with Unity engine crashes on AMD GPU, but worked on Intel GPU on same machine.
Discussion in amd-gfx mailing list
./aaa.x86_64
ATTENTION: default value of option allow_rgb10_configs overridden by environment.
Set current directory to /home/mikhail/New Unity Project
Found path: /home/mikhail/New Unity Project/aaa.x86_64
Mono path[0] = ‘/home/mikhail/New Unity Project/aaa_Data/Managed’
Mono config path = ‘/home/mikhail/New Unity Project/aaa_Data/Mono/etc’
Preloaded ‘ScreenSelector.so’
Logging to /home/mikhail/.config/unity3d/DefaultCompany/New Unity Project/Player.log
free(): invalid pointer
Native stacktrace:
/home/mikhail/New Unity Project/aaa_Data/Mono/x86_64/libmono.so(+0x984ea) [0x7ff33437a4ea]
/lib64/libpthread.so.0(+0x12aef) [0x7ff35126aaef]
/lib64/libc.so.6(gsignal+0xcb) [0x7ff3503b266b]
/lib64/libc.so.6(abort+0x140) [0x7ff3503b4380]
/lib64/libc.so.6(+0x81a56) [0x7ff3503fca56]
/lib64/libc.so.6(+0x889a9) [0x7ff3504039a9]
/lib64/libc.so.6(+0x8b47b) [0x7ff35040647b]
/usr/lib64/dri/radeonsi_dri.so(+0x486cbc) [0x7ff34256bcbc]
/usr/lib64/dri/radeonsi_dri.so(+0x4b3a5a) [0x7ff342598a5a]
/usr/lib64/dri/radeonsi_dri.so(+0xca1e3) [0x7ff3421af1e3]
/usr/lib64/dri/radeonsi_dri.so(+0x2d8a1c) [0x7ff3423bda1c]
/usr/lib64/dri/radeonsi_dri.so(+0x2f01a7) [0x7ff3423d51a7]
/usr/lib64/dri/radeonsi_dri.so(+0x2f8990) [0x7ff3423dd990]
/usr/lib64/dri/radeonsi_dri.so(+0x51cca7) [0x7ff342601ca7]
/usr/lib64/dri/radeonsi_dri.so(+0x2eccf8) [0x7ff3423d1cf8]
/usr/lib64/dri/radeonsi_dri.so(+0x2ece07) [0x7ff3423d1e07]
./aaa.x86_64() [0x1310b8f]
./aaa.x86_64() [0x12de3f9]
./aaa.x86_64() [0x12de84e]
./aaa.x86_64() [0x12f6b38]
./aaa.x86_64() [0x12ac693]
./aaa.x86_64() [0x12a5111]
./aaa.x86_64() [0x12a527a]
./aaa.x86_64() [0x8d9e78]
/lib64/libpthread.so.0(+0x761a) [0x7ff35125f61a]
/lib64/libc.so.6(clone+0x3e) [0x7ff35049298e]
Debug info from gdb:
I refuse to debug myself!
No threads.
=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
Aborted (core dumped)
Tak
February 1, 2018, 12:48pm
2
This looks like a driver crash in free/delete after mesa_glsl_link_shader
.
I don’t believe that Unity is duplicating these symbols (as concluded in the freedesktop thread) - as far as I can tell, this is all in the radeonsi driver.
NTMan
February 2, 2018, 3:11am
3
Valgrind doesn’t show any memory-related issue with Mesa. It does show
an issue with “New Unity Project”. This can corrupt the heap and cause
a random crash on the next call of malloc/free/new/delete:
3377545–264984–valgrind.txt (1.58 MB)
Tak
February 2, 2018, 8:27am
4
We’ll investigate, but if that were the case, wouldn’t it affect the intel driver the same way?
NTMan
February 2, 2018, 5:24pm
5
Marek said:
There are several factors making radeonsi more vulnerable to heap corruption:
radeonsi has a lot of running threads, unlike intel
radeonsi uses LLVM, which is a big user of new/delete to the extent of making new/delete/malloc/free a little slower for Mesa and Unity.
Closed-source drivers use their own allocator for memory allocations (usually jemalloc), so they are immune to such Unity bugs.