Bug 94410 - [radeonsi] Unreal engine 4 Segmentation fault
Summary: [radeonsi] Unreal engine 4 Segmentation fault
Status: RESOLVED MOVED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/radeonsi (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Default DRI bug account
QA Contact: Default DRI bug account
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-06 06:18 UTC by Iaroslav Andrusyak
Modified: 2019-09-25 17:54 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Schreenshot1 (3.25 MB, image/jpeg)
2017-07-29 14:25 UTC, Thomas Kowaliczek
Details
Screenshot2 (3.72 MB, image/jpeg)
2017-07-29 14:25 UTC, Thomas Kowaliczek
Details

Description Iaroslav Andrusyak 2016-03-06 06:18:46 UTC
Radeon Hd 7970
mesa\llvm git
unreal editor git
UE4Editor works fine on intel hd 2500, but on radeon i got

bt full log http://pastebin.com/cX57pWcG
 
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fff9afff700 (LWP 3209)]
0x00007ffff72e9e0f in je_arena_salloc (demote=false, ptr=<optimized out>) at include/jemalloc/internal/arena.h:1018
1018    include/jemalloc/internal/arena.h: No such file or directory.
Missing separate debuginfos, use: zypper install Mesa-libglapi0-debuginfo-11.3~git20160305-1.1.x86_64 libFLAC8-debuginfo-1.3.1-219.6.x86_64 libX11-6-debuginfo-1.6.3-41.1.x86_64 libX11-xcb1-debuginfo-1.6.3-41.1.x86_64 libXau6-debuginfo-1.0.8-23.1.x86_64 libXcursor1-debuginfo-1.1.14-25.1.x86_64 libXdamage1-debuginfo-1.1.4-25.1.x86_64 libXext6-debuginfo-1.3.3-22.1.x86_64 libXfixes3-debuginfo-5.0.1-24.1.x86_64 libXi6-debuginfo-1.7.5-35.1.x86_64 libXinerama1-debuginfo-1.1.3-21.1.x86_64 libXrandr2-debuginfo-1.5.99-1.1.x86_64 libXrender1-debuginfo-0.9.9-22.1.x86_64 libXss1-debuginfo-1.2.2-20.1.x86_64 libXxf86vm1-debuginfo-1.1.4-23.1.x86_64 libdbus-1-3-debuginfo-1.8.16-5.2.x86_64 libdrm2-debuginfo-2.4.99~git20160303-1.1.x86_64 libdrm_amdgpu1-debuginfo-2.4.99~git20160303-1.1.x86_64 libdrm_intel1-debuginfo-2.4.99~git20160303-1.1.x86_64 libdrm_nouveau2-debuginfo-2.4.99~git20160303-1.1.x86_64 libdrm_radeon1-debuginfo-2.4.99~git20160303-1.1.x86_64 libelf1-debuginfo-0.158-9.5.x86_64 libexpat1-debuginfo-2.1.0-15.4.x86_64 libgcc_s1-debuginfo-5.2.1+r226025-4.2.x86_64 libgcrypt20-debuginfo-1.6.1-20.1.x86_64 libgpg-error0-debuginfo-1.13-3.6.x86_64 libjson-c2-debuginfo-0.12-4.2.x86_64 liblzma5-debuginfo-5.0.5-3.5.x86_64 libogg0-debuginfo-1.3.2-35.5.x86_64 libopenssl1_0_0-debuginfo-1.0.1i-12.1.x86_64 libpciaccess0-debuginfo-0.13.4-28.1.x86_64 libpulse0-debuginfo-8.0-2.1.x86_64 libsndfile1-debuginfo-1.0.26-74.2.x86_64 libspeex1-debuginfo-1.2~rc2-46.3.x86_64 libtxc_dxtn-debuginfo-1.0.1-6.1.x86_64 libudev1-debuginfo-210-86.1.x86_64 libvorbis0-debuginfo-1.3.5-57.30.x86_64 libvorbisenc2-debuginfo-1.3.5-57.30.x86_64 libxcb-dri2-0-debuginfo-1.11.1-50.1.x86_64 libxcb-dri3-0-debuginfo-1.11.1-50.1.x86_64 libxcb-glx0-debuginfo-1.11.1-50.1.x86_64 libxcb-present0-debuginfo-1.11.1-50.1.x86_64 libxcb-sync1-debuginfo-1.11.1-50.1.x86_64 libxcb1-debuginfo-1.11.1-50.1.x86_64 libxshmfence1-debuginfo-1.2-13.1.x86_64 libz1-debuginfo-1.2.8-6.4.x86_64 systemd-debuginfo-210-86.1.x86_64
(gdb) bt
#0  0x00007ffff72e9e0f in je_arena_salloc (demote=false, ptr=<optimized out>) at include/jemalloc/internal/arena.h:1018
#1  je_isalloc (demote=false, ptr=<optimized out>) at include/jemalloc/internal/jemalloc_internal.h:849
#2  je_malloc_usable_size (ptr=<optimized out>) at src/jemalloc.c:1861
#3  0x00007ffff6f976d1 in FMallocJemalloc::Free(void*) () from /docker/tmp/UnrealEngine/Engine/Binaries/Linux/libUE4Editor-Core.so
#4  0x00007ffff6f9e70a in FMemory::Free(void*) () from /docker/tmp/UnrealEngine/Engine/Binaries/Linux/libUE4Editor-Core.so
#5  0x00007fffed8be9a6 in operator delete(void*) () from /docker/tmp/UnrealEngine/Engine/Binaries/Linux/libUE4Editor-UnrealEd.so
#6  0x00007fffedb95e95 in std::_Rb_tree<std::string, std::pair<std::string const, std::string>, std::_Select1st<std::pair<std::string const, std::string> >, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > >::_M_erase(std::_Rb_tree_node<std::pair<std::string const, std::string> >*) () from /docker/tmp/UnrealEngine/Engine/Binaries/Linux/libUE4Editor-UnrealEd.so
#7  0x00007fffb30cc888 in LLVMAddTargetDependentFunctionAttr () from /usr/lib64/libLLVM-3.9svn.so
#8  0x00007fffb5fd3bfd in radeon_llvm_add_attribute (F=0x7fff9454ae58, name=0x7fffb60dfe83 "ShaderType", value=<optimized out>) at radeon_llvm_emit.c:63
#9  0x00007fffb5ef9aee in si_create_function (ctx=ctx@entry=0x7fff9aff4f70, returns=<optimized out>, num_returns=<optimized out>, params=params@entry=0x7fff9aff4870, num_params=<optimized out>, 
    last_array_pointer=4, last_sgpr=7) at si_shader.c:3764
#10 0x00007fffb5ef9d25 in create_function (ctx=ctx@entry=0x7fff9aff4f70) at si_shader.c:4046
#11 0x00007fffb5f041c2 in si_compile_tgsi_shader (sscreen=sscreen@entry=0x773330, tm=tm@entry=0x7fff94073fa0, shader=shader@entry=0x7fff9454f630, is_monolithic=is_monolithic@entry=true, 
    debug=debug@entry=0x7fff94002958) at si_shader.c:4926
#12 0x00007fffb5f04c8a in si_shader_create (sscreen=0x773330, tm=0x7fff94073fa0, shader=shader@entry=0x7fff9454f630, debug=debug@entry=0x7fff94002958) at si_shader.c:5909
#13 0x00007fffb5f10387 in si_shader_select_with_key (ctx=0x7fff940023a0, state=0x7fff94002fe0, key=0x7fff9affc800) at si_state_shaders.c:1014
#14 0x00007fffb5f104ac in si_shader_select (ctx=<optimized out>, state=<optimized out>) at si_state_shaders.c:1042
#15 0x00007fffb5f12b27 in si_update_shaders (sctx=sctx@entry=0x7fff940023a0) at si_state_shaders.c:1971
#16 0x00007fffb5f0d603 in si_draw_vbo (ctx=0x7fff940023a0, info=0x7fff9affca60) at si_state_draw.c:800
#17 0x00007fffb5bf994c in util_draw_arrays_instanced (mode=6, start=0, count=4, start_instance=0, instance_count=1, pipe=0x7fff940023a0) at util/u_draw.h:99
#18 blitter_draw (ctx=0x7fff94069390, x1=<optimized out>, y1=<optimized out>, x2=<optimized out>, y2=<optimized out>, depth=<optimized out>, num_instances=num_instances@entry=1) at util/u_blitter.c:1202
#19 0x00007fffb5bf9a4c in util_blitter_draw_rectangle (blitter=<optimized out>, x1=<optimized out>, y1=<optimized out>, x2=<optimized out>, y2=<optimized out>, depth=<optimized out>, type=<optimized out>, 
    attrib=attrib@entry=0x7fff9affcc20) at util/u_blitter.c:1226
#20 0x00007fffb5fc4639 in r600_draw_rectangle (blitter=0x7fff94069390, x1=<optimized out>, y1=0, x2=600, y2=200, depth=<optimized out>, type=<optimized out>, attrib=0x7fff9affcc20) at r600_pipe_common.c:88
#21 0x00007fffb5bfc2eb in util_blitter_blit_generic (blitter=0x7fff94069390, dst=dst@entry=0x7fff945400f0, dstbox=dstbox@entry=0x7fff9affcd60, src=src@entry=0x7fff945401c0, srcbox=0x7fff9affce40, 
    src_width0=src_width0@entry=600, src_height0=src_height0@entry=200, mask=mask@entry=63, filter=filter@entry=0, scissor=scissor@entry=0x0, alpha_blend=alpha_blend@entry=0 '\000') at util/u_blitter.c:1694
#22 0x00007fffb5ef06a7 in si_resource_copy_region (ctx=0x7fff940023a0, dst=<optimized out>, dst_level=<optimized out>, dstx=0, dsty=0, dstz=0, src=0x7fff94543140, src_level=0, src_box=<optimized out>)
    at si_blit.c:627
#23 0x00007fffb5fc92be in r600_copy_from_staging_texture (rtransfer=0x7fff945527f0, ctx=<optimized out>) at r600_texture.c:105
#24 r600_texture_transfer_unmap (ctx=<optimized out>, transfer=0x7fff945527f0) at r600_texture.c:1171
#25 0x00007fffb5ab92d1 in pipe_transfer_unmap (transfer=<optimized out>, context=<optimized out>) at ../../src/gallium/auxiliary/util/u_inlines.h:480
#26 st_texture_image_unmap (st=<optimized out>, stImage=<optimized out>, slice=<optimized out>) at state_tracker/st_texture.c:309
---Type <return> to continue, or q <return> to quit---
#27 0x00007fffb5a12f6b in store_texsubimage (ctx=ctx@entry=0x7fff94081240, texImage=texImage@entry=0x7fff94550850, xoffset=xoffset@entry=0, yoffset=yoffset@entry=0, zoffset=zoffset@entry=0, width=600, 
    height=200, depth=1, format=32993, type=5121, pixels=0x7fffa4b85000, packing=0x7fff9409c5b0, caller=0x7fffb601d075 "glTexSubImage") at main/texstore.c:1082
#28 0x00007fffb5a131e5 in _mesa_store_texsubimage (ctx=ctx@entry=0x7fff94081240, dims=dims@entry=2, texImage=texImage@entry=0x7fff94550850, xoffset=xoffset@entry=0, yoffset=yoffset@entry=0, 
    zoffset=zoffset@entry=0, width=<optimized out>, width@entry=600, height=<optimized out>, height@entry=200, depth=<optimized out>, depth@entry=1, format=<optimized out>, format@entry=32993, 
    type=<optimized out>, type@entry=5121, pixels=<optimized out>, pixels@entry=0x7fffa4b85000, packing=<optimized out>, packing@entry=0x7fff9409c5b0) at main/texstore.c:1139
#29 0x00007fffb5a79627 in st_TexSubImage (ctx=ctx@entry=0x7fff94081240, dims=dims@entry=2, texImage=texImage@entry=0x7fff94550850, xoffset=xoffset@entry=0, yoffset=yoffset@entry=0, zoffset=zoffset@entry=0, 
    width=600, height=200, depth=1, format=format@entry=32993, type=type@entry=5121, pixels=pixels@entry=0x7fffa4b85000, unpack=unpack@entry=0x7fff9409c5b0) at state_tracker/st_cb_texture.c:1896
#30 0x00007fffb5a7b283 in st_TexImage (ctx=0x7fff94081240, dims=2, texImage=0x7fff94550850, format=32993, type=5121, pixels=0x7fffa4b85000, unpack=0x7fff9409c5b0) at state_tracker/st_cb_texture.c:1920
#31 0x00007fffb5a01383 in teximage (ctx=0x7fff94081240, compressed=compressed@entry=0 '\000', dims=dims@entry=2, target=3553, level=0, internalFormat=<optimized out>, width=600, height=200, 
    depth=depth@entry=1, border=0, format=format@entry=32993, type=type@entry=5121, imageSize=imageSize@entry=0, pixels=pixels@entry=0x7fffa4b85000) at main/teximage.c:2980
#32 0x00007fffb5a02770 in _mesa_TexImage2D (target=<optimized out>, level=<optimized out>, internalFormat=<optimized out>, width=<optimized out>, height=<optimized out>, border=<optimized out>, format=32993, 
    type=5121, pixels=0x7fffa4b85000) at main/teximage.c:3019
#33 0x00007ffff705dce7 in StartSplashScreenThread(void*) () from /docker/tmp/UnrealEngine/Engine/Binaries/Linux/libUE4Editor-Core.so
#34 0x00007ffff735ed6b in SDL_RunThread (data=<optimized out>) at /home/rcl/build/2015-07-13/SDL-gui-backend/src/thread/SDL_thread.c:282
#35 0x00007ffff7379fe9 in RunThread (data=<optimized out>) at /home/rcl/build/2015-07-13/SDL-gui-backend/src/thread/pthread/SDL_systhread.c:74
#36 0x00007ffff7bc70a4 in start_thread (arg=0x7fff9afff700) at pthread_create.c:309
#37 0x00007fffeabcefed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
Comment 1 Michel Dänzer 2016-03-07 09:30:35 UTC
Looks like UE4Editor overrides some C++ memory allocation APIs, which breaks LLVM.
Comment 2 Felix Hellmann 2017-07-24 19:37:17 UTC
This still happens in current git (dd072cf4b1) with unreal editor 4.16.

Kernel 4.12.3-ARCH
Rx 480
libdrm-2.4.82

Full log output from two runs. One with default binned2 malloc and one with ansimalloc:

https://pastebin.com/tmCAaEkX
Comment 3 Thomas Kowaliczek 2017-07-29 14:25:24 UTC
Created attachment 133122 [details]
Schreenshot1
Comment 4 Thomas Kowaliczek 2017-07-29 14:25:44 UTC
Created attachment 133123 [details]
Screenshot2
Comment 5 Thomas Kowaliczek 2017-07-29 14:26:14 UTC
Screenshost are from version 4.17 after the editor startup freezed my desktop. Only mouse worked.
Comment 6 Timothee Besset 2017-07-30 17:14:46 UTC
Not likely to be a radeon bug, but here is a possible solution for UE4 4.16:

17:18 <@rcl> if 4.16, remove the linker script
17:18 <@rcl> and try again
17:19 <@rcl> drivers aren't siloed from our new/delete and are probably allocating memory through UE, a user program

(see LinuxToolChain.cs)

If someone can try that and report, that would help.
Comment 7 Felix Hellmann 2017-08-07 23:40:37 UTC
I tested with the current promoted branch (which has the linker script commented out by default). This gives me a complete desktop freeze like Thomas Kowaliczek already reported.
Comment 8 Timothee Besset 2017-08-07 23:42:48 UTC
The freeze problems are very likely this issue: https://bugs.freedesktop.org/show_bug.cgi?id=101977

I haven't seen this allocator problem in 4.16 with ubuntu 16.x, I suspect it's tied to a clang / libstdc++ / distribution combo.
Comment 9 GitLab Migration User 2019-09-25 17:54:14 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/1229.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.