Screen freeze because gnome-shell waits DRM_IOCTL_SYNCOBJ_WAIT forever in Wayland mode when resource is tight
[Steps to reproduce]
(disable systemd-oomd or executing over ssh)
(below command allocates a lot of memory to stress kernel page fault)
- stress-ng --stack 0 --timeout 300
(or stress-ng --aggressive --stack 0 --verify --timeout 300 --mmapmany 0) - check the screen
Fail rate: 4/5 in clean Ubuntu 22.04
Fail rate: 2/5 after upgrading to drm-tip + latest linux-firmware
[Expected result]
Screen back to work after stress.
[Actual result]
Screen freeze after stress test.
[Additional information]
kernel version: 6.0.0-060000rc4drmtip20220910-generic
Mesa version: 22.0.5-0ubuntu0.1
Mutter version: 42.2-0ubuntu1
Gnome-shell version: 42.2-0ubuntu0.2
uname -m: x86_64
distribution: Ubuntu 22.04.1 LTS
Display connector: eDP
- Issue happens in Wayland only
- gnome-shell stuck in ioctl()
(gdb) bt
#0 __GI___ioctl (fd=fd@entry=14, request=request@entry=3223348419) at ../sysdeps/unix/sysv/linux/ioctl.c:36
#1 0x00007fcacab0eb4f in intel_ioctl (arg=0x7fffc5404d80, request=3223348419, fd=14) at ../src/intel/common/intel_gem.h:75
#2 iris_wait_syncobj (timeout_nsec=140736502713808, syncobj=<optimized out>, bufmgr=<optimized out>) at ../src/gallium/drivers/iris/iris_fence.c:229
#3 iris_wait_syncobj (bufmgr=<optimized out>, syncobj=<optimized out>, timeout_nsec=timeout_nsec@entry=9223372036854775807) at ../src/gallium/drivers/iris/iris_fence.c:215
#4 0x00007fcacab8beab in iris_get_query_result (result=0x7fffc5404e50, wait=<optimized out>, query=0x55774159b800, ctx=<optimized out>) at ../src/gallium/drivers/iris/iris_query.c:635
#5 iris_get_query_result (ctx=<optimized out>, query=0x55774159b800, wait=<optimized out>, result=0x7fffc5404e50) at ../src/gallium/drivers/iris/iris_query.c:601
#6 0x00007fcaca405e89 in tc_get_query_result (_pipe=<optimized out>, query=0x55774159b800, wait=<optimized out>, result=0x7fffc5404e50) at ../src/gallium/auxiliary/util/u_threaded_context.c:881
#7 0x00007fcaca0f0e64 in get_query_result (pipe=pipe@entry=0x55773f87bad0, q=q@entry=0x557741a0c790, wait=wait@entry=1 '\001') at ../src/mesa/main/queryobj.c:266
#8 0x00007fcaca0f1b12 in _mesa_wait_query (q=0x557741a0c790, ctx=0x55773f8af980) at ../src/mesa/main/queryobj.c:344
#9 get_query_object (ctx=0x55773f8af980, func=func@entry=0x7fcacaf28283 "glGetQueryObjecti64v", id=<optimized out>, pname=34918, ptype=ptype@entry=5134, buf=0x0, offset=140736502714192)
at ../src/mesa/main/queryobj.c:1174
#10 0x00007fcaca0f2d65 in _mesa_GetQueryObjecti64v (id=<optimized out>, pname=<optimized out>, params=<optimized out>) at ../src/mesa/main/queryobj.c:1257
#11 0x00007fcadfa39b90 in ?? () from /usr/lib/x86_64-linux-gnu/mutter-10/libmutter-cogl-10.so.0
#12 0x00007fcadfa751b9 in cogl_frame_info_get_rendering_duration_ns () from /usr/lib/x86_64-linux-gnu/mutter-10/libmutter-cogl-10.so.0
#13 0x00007fcadf8819c4 in ?? () from /lib/x86_64-linux-gnu/libmutter-10.so.0
#14 0x00007fcadfa6e7a2 in _cogl_onscreen_notify_complete () from /usr/lib/x86_64-linux-gnu/mutter-10/libmutter-cogl-10.so.0
#15 0x00007fcadf969cdd in ?? () from /lib/x86_64-linux-gnu/libmutter-10.so.0
#16 0x00007fcadf96ec7b in ?? () from /lib/x86_64-linux-gnu/libmutter-10.so.0
#17 0x00007fcadf969601 in ?? () from /lib/x86_64-linux-gnu/libmutter-10.so.0
#18 0x00007fcadf98395e in ?? () from /lib/x86_64-linux-gnu/libmutter-10.so.0
#19 0x00007fcadf96962d in ?? () from /lib/x86_64-linux-gnu/libmutter-10.so.0
#20 0x00007fcae0743c24 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#21 0x00007fcae07986f8 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#22 0x00007fcae0743293 in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#23 0x00007fcadf8d0849 in meta_context_run_main_loop () from /lib/x86_64-linux-gnu/libmutter-10.so.0
#24 0x000055773f1a4f12 in ?? ()
#25 0x00007fcadf429d90 in __libc_start_call_main (main=main@entry=0x55773f1a4a70, argc=argc@entry=1, argv=argv@entry=0x7fffc54053e8) at ../sysdeps/nptl/libc_start_call_main.h:58
#26 0x00007fcadf429e40 in __libc_start_main_impl (main=0x55773f1a4a70, argc=1, argv=0x7fffc54053e8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffc54053d8)
at ../csu/libc-start.c:392
#27 0x000055773f1a51b5 in ?? ()
intel_reg_dump.txt
(with Warning: register spec not found in '/usr/share/igt-gpu-tools/registers'. Using builtin register spec.
)
journalctl-k-i915-bug-report.txt
journalctl-i915-bug-report.txt
(with INTEL_DEBUG=bat)