Bug 106297

Summary: gnome-shell hangs hellishly because DRM_IOCTL_AMDGPU_GEM_CREATE or DRM_IOCTL_VIA_ALLOCMEM executing more than 11 seconds
Product: DRI Reporter: mikhail.v.gavrilov
Component: DRM/AMDgpuAssignee: Default DRI bug account <dri-devel>
Status: RESOLVED MOVED QA Contact:
Severity: normal    
Priority: medium    
Version: XOrg git   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
gnome-shell strace
none
gnome-shell backtrace
none
glxinfo
none
dmesg
none
gnome-shell strace none

Description mikhail.v.gavrilov 2018-04-28 15:47:18 UTC
Created attachment 139198 [details]
gnome-shell strace

gnome-shell hangs hellishly because DRM_IOCTL_AMDGPU_GEM_CREATE or DRM_IOCTL_VIA_ALLOCMEM executing more than 11 seconds


=== snip from strace ===
mmap(NULL, 434176, PROT_READ|PROT_WRITE, MAP_SHARED, 13, 0x205097000) = 0x7fca34100000 <0.000023>
ioctl(13, DRM_IOCTL_AMDGPU_GEM_CREATE or DRM_IOCTL_VIA_ALLOCMEM, 0x7ffcd4c04150) = 0 <11.567183>
ioctl(13, _IOC(_IOC_READ|_IOC_WRITE, 0x64, 0x48, 0x28), 0x7ffcd4c04160) = 0 <0.000085>
ioctl(13, DRM_IOCTL_AMDGPU_GEM_MMAP, 0x7ffcd4c04610) = 0 <0.000026>
mmap(NULL, 13885440, PROT_READ|PROT_WRITE, MAP_SHARED, 13, 0x128ecc000) = 0x7fc9f1abe000 <0.000036>
write(4, "\1\0\0\0\0\0\0\0", 8)         = 8 <0.000030>
recvmsg(60, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\33\0\0\0\1\0\24\0 \0\0\0\0\0\0\0\0\0\0\0\33\0\0\0\10\0\f\0\2\0\0\0"..., iov_len=1884}, {iov_base="", iov_len=2212}], msg_iovlen=2, msg_controllen=0, msg_flags=MSG_CMSG_CLOEXEC}, MSG_DONTWAIT|MSG_CMSG_CLOEXEC) = 332 <0.000048>
ioctl(13, _IOC(_IOC_READ|_IOC_WRITE, 0x64, 0x48, 0x28), 0x7ffcd4c04170) = 0 <0.000149>
Comment 1 mikhail.v.gavrilov 2018-04-28 15:48:38 UTC
Created attachment 139199 [details]
gnome-shell backtrace
Comment 2 mikhail.v.gavrilov 2018-04-28 15:54:10 UTC
Created attachment 139200 [details]
glxinfo
Comment 3 mikhail.v.gavrilov 2018-04-28 15:55:06 UTC
kernel:
# uname -r
4.17.0-0.rc1.git3.1.fc29.x86_64

llvm:
# rpm -qa | grep llvm | sort
llvm-debuginfo-6.0.0-11.fc29.x86_64
llvm-debugsource-6.0.0-11.fc29.x86_64
llvm-libs-6.0.0-11.fc29.i686
llvm-libs-6.0.0-11.fc29.x86_64
llvm-libs-debuginfo-6.0.0-11.fc29.x86_64

mesa:
# rpm -qa | grep mesa | sort
mesa-debuginfo-18.0.1-1.fc29.x86_64
mesa-debugsource-18.0.1-1.fc29.x86_64
mesa-dri-drivers-18.0.1-1.fc29.i686
mesa-dri-drivers-18.0.1-1.fc29.x86_64
mesa-dri-drivers-debuginfo-18.0.1-1.fc29.x86_64
mesa-filesystem-18.0.1-1.fc29.i686
mesa-filesystem-18.0.1-1.fc29.x86_64
mesa-libEGL-18.0.1-1.fc29.x86_64
mesa-libEGL-debuginfo-18.0.1-1.fc29.x86_64
mesa-libgbm-18.0.1-1.fc29.x86_64
mesa-libgbm-debuginfo-18.0.1-1.fc29.x86_64
mesa-libGL-18.0.1-1.fc29.i686
mesa-libGL-18.0.1-1.fc29.x86_64
mesa-libglapi-18.0.1-1.fc29.i686
mesa-libglapi-18.0.1-1.fc29.x86_64
mesa-libglapi-debuginfo-18.0.1-1.fc29.x86_64
mesa-libxatracker-18.0.1-1.fc29.x86_64
Comment 4 mikhail.v.gavrilov 2018-04-28 15:56:13 UTC
Created attachment 139201 [details]
dmesg
Comment 5 mikhail.v.gavrilov 2018-04-28 16:11:07 UTC
Created attachment 139202 [details]
gnome-shell strace
Comment 6 mikhail.v.gavrilov 2018-04-28 16:11:16 UTC
# readlink /proc/9228/fd/44 
socket:[269743]
Comment 7 mikhail.v.gavrilov 2018-04-28 16:15:32 UTC
some more snip with large time executing time:

writev(44, [{iov_base="\24\0\6\0\4\0@\3\6\1\0\0\6\0\0\0\0\0\0\0\377\377\377\377", iov_len=24}, {iov_base=NULL, iov_len=0}, {iov_base="", iov_len=0}], 3) = 24 <0.000027>
poll([{fd=44, events=POLLIN}], 1, -1)   = 1 ([{fd=44, revents=POLLIN}]) <50.420278>
recvmsg(44, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="A\0\361\220*> \0\3\0\202\0\35\1 \0\0\20\6\0\0\0\0\0\0\0\0\0\0\0\0\0"..., iov_len=4096}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 4096 <0.000040>


writev(44, [{iov_base="\24\0\6\0\4\0@\3\6\1\0\0\6\0\0\0\0\0\0\0\377\377\377\377", iov_len=24}, {iov_base=NULL, iov_len=0}, {iov_base="", iov_len=0}], 3) = 24 <0.000027>
poll([{fd=44, events=POLLIN}], 1, -1)   = 1 ([{fd=44, revents=POLLIN}]) <20.660729>
recvmsg(44, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="A\0\302\220\"> \0\3\0\202\0\35\1 \0\0\20\6\0\0\0\0\0\0\0\0\0\0\0\0\0", iov_len=4096}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 32 <0.000037>


mmap(NULL, 2510848, PROT_READ|PROT_WRITE, MAP_SHARED, 13, 0x18e396000) = 0x7fc9fc09a000 <0.000042>
write(4, "\1\0\0\0\0\0\0\0", 8)         = 8 <0.000019>
ioctl(13, DRM_IOCTL_AMDGPU_GEM_CREATE or DRM_IOCTL_VIA_ALLOCMEM, 0x7ffcd4c04150) = 0 <13.330551>
ioctl(13, _IOC(_IOC_READ|_IOC_WRITE, 0x64, 0x48, 0x28), 0x7ffcd4c04160) = 0 <0.000062>
ioctl(13, DRM_IOCTL_AMDGPU_GEM_MMAP, 0x7ffcd4c04610) = 0 <0.000021>
mmap(NULL, 4435968, PROT_READ|PROT_WRITE, MAP_SHARED, 13, 0x366ad5000) = 0x7fc9f63c2000 <0.000031>

epoll_wait(5, [{EPOLLIN, {u32=3087109920, u64=140508647231264}}], 32, 0) = 1 <0.000020>
recvmsg(18, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="%\0\0\0\1\0\24\0.\0\0\0\0\0\0\0\0\0\0\0%\0\0\0\10\0\f\0\2\0\0\0"..., iov_len=1600}, {iov_base="", iov_len=2496}], msg_iovlen=2, msg_controllen=0, msg_flags=MSG_CMSG_CLOEXEC}, MSG_DONTWAIT|MSG_CMSG_CLOEXEC) = 132 <0.000025>
ioctl(13, DRM_IOCTL_AMDGPU_GEM_CREATE or DRM_IOCTL_VIA_ALLOCMEM, 0x7ffcd4c04150) = 0 <12.791998>
ioctl(13, _IOC(_IOC_READ|_IOC_WRITE, 0x64, 0x48, 0x28), 0x7ffcd4c04160) = 0 <0.000072>
ioctl(13, DRM_IOCTL_AMDGPU_GEM_MMAP, 0x7ffcd4c04610) = 0 <0.000078>
mmap(NULL, 10604544, PROT_READ|PROT_WRITE, MAP_SHARED, 13, 0x167281000) = 0x7fc9ed0e9000 <0.000032>

mmap(NULL, 5177344, PROT_READ|PROT_WRITE, MAP_SHARED, 13, 0x22aa35000) = 0x7fc9f1bf0000 <0.000031>
ioctl(13, DRM_IOCTL_AMDGPU_GEM_CREATE or DRM_IOCTL_VIA_ALLOCMEM, 0x7ffcd4c04150) = 0 <10.536264>
ioctl(13, _IOC(_IOC_READ|_IOC_WRITE, 0x64, 0x48, 0x28), 0x7ffcd4c04160) = 0 <0.000175>
ioctl(13, DRM_IOCTL_AMDGPU_GEM_MMAP, 0x7ffcd4c04610) = 0 <0.000203>
mmap(NULL, 2318336, PROT_READ|PROT_WRITE, MAP_SHARED, 13, 0x1609ec000) = 0x7fc9fcbc9000 <0.000041>

epoll_wait(5, [{EPOLLIN, {u32=3087109920, u64=140508647231264}}], 32, 0) = 1 <0.000016>
recvmsg(18, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\33\0\0\0\1\0\24\0 \0\0\0\0\0\0\0\0\0\0\0\33\0\0\0\10\0\f\0\2\0\0\0"..., iov_len=3376}, {iov_base="", iov_len=720}], msg_iovlen=2, msg_controllen=0, msg_flags=MSG_CMSG_CLOEXEC}, MSG_DONTWAIT|MSG_CMSG_CLOEXEC) = 188 <0.000021>
ioctl(13, DRM_IOCTL_AMDGPU_GEM_CREATE or DRM_IOCTL_VIA_ALLOCMEM, 0x7ffcd4c04150) = 0 <25.560096>
ioctl(13, _IOC(_IOC_READ|_IOC_WRITE, 0x64, 0x48, 0x28), 0x7ffcd4c04160) = 0 <0.000098>
ioctl(13, DRM_IOCTL_AMDGPU_GEM_MMAP, 0x7ffcd4c04610) = 0 <0.000034>
mmap(NULL, 4435968, PROT_READ|PROT_WRITE, MAP_SHARED, 13, 0x38ca63000) = 0x7fc9f186a000 <0.000036>
Comment 8 mikhail.v.gavrilov 2018-04-28 16:29:09 UTC
# lspci
00:00.0 Host bridge: Intel Corporation 4th Gen Core Processor DRAM Controller (rev 06)
00:14.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB xHCI (rev 04)
00:16.0 Communication controller: Intel Corporation 8 Series/C220 Series Chipset Family MEI Controller #1 (rev 04)
00:1b.0 Audio device: Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #1 (rev d4)
00:1c.2 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #3 (rev d4)
00:1c.3 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #4 (rev d4)
00:1c.4 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #5 (rev d4)
00:1f.0 ISA bridge: Intel Corporation Z87 Express LPC Controller (rev 04)
00:1f.2 SATA controller: Intel Corporation 8 Series/C220 Series Chipset Family 6-port SATA Controller 1 [AHCI mode] (rev 04)
00:1f.3 SMBus: Intel Corporation 8 Series/C220 Series Chipset Family SMBus Controller (rev 04)
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 06)
03:00.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 41)
05:00.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 1470 (rev c3)
06:00.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 1471
07:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Vega 10 XT [Radeon RX Vega 64] (rev c3)
07:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Device aaf8
Comment 9 Michel Dänzer 2018-04-30 09:21:40 UTC
Does

https://patchwork.freedesktop.org/patch/218931/

help?
Comment 10 Martin Peres 2019-11-19 08:37:01 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/drm/amd/issues/363.

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.