Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix locking in mgw::DisplayClient() #3030

Merged
merged 1 commit into from
Sep 1, 2023
Merged

Fix locking in mgw::DisplayClient() #3030

merged 1 commit into from
Sep 1, 2023

Conversation

AlanGriffiths
Copy link
Contributor

Fixes: #2011

@codecov
Copy link

codecov bot commented Aug 31, 2023

Codecov Report

Merging #3030 (881a81a) into main (a67f858) will decrease coverage by 0.01%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main    #3030      +/-   ##
==========================================
- Coverage   77.70%   77.70%   -0.01%     
==========================================
  Files        1056     1056              
  Lines       73393    73394       +1     
==========================================
  Hits        57031    57031              
- Misses      16362    16363       +1     
Files Changed Coverage Δ
src/platforms/wayland/displayclient.cpp 0.00% <0.00%> (ø)

... and 3 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@Saviq
Copy link
Collaborator

Saviq commented Aug 31, 2023

Using the same reproducer, with mir-test-tools/22/edge/mir-pr3030 I'm now getting:

^Cpure virtual method called
terminate called without an active exception
[1]    2439928 IOT instruction (core dumped)  mir-test-tools.performance-test --gtest_filter=Hosted*

When built locally, it deadlocks in a different way.

gdb.txt
  Id   Target Id                                             Frame 
* 1    Thread 0x7f93d2708200 (LWP 2474930) "mir_performance" __GI___libc_read (nbytes=4096, buf=0x55ac5a83cc90, fd=30) at ../sysdeps/unix/sysv/linux/read.c:26
  2    Thread 0x7f93d27046c0 (LWP 2474931) "mir_perform-ust" syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
  3    Thread 0x7f93d1f036c0 (LWP 2474932) "mir_perform-ust" syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
  4    Thread 0x7f93c19476c0 (LWP 2475273) "mir_per:disk$0"  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x7f93cc0151d8)
    at ./nptl/futex-internal.c:57
  5    Thread 0x7f93937fe6c0 (LWP 2475274) "mir_perfor:sh0"  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x7f93cc851848)
    at ./nptl/futex-internal.c:57
  6    Thread 0x7f9393fff6c0 (LWP 2475275) "mir_perfor:sh1"  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x7f93cc851848)
    at ./nptl/futex-internal.c:57
  7    Thread 0x7f93bc93d6c0 (LWP 2475276) "mir_perfor:sh2"  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x7f93cc851848)
    at ./nptl/futex-internal.c:57
  8    Thread 0x7f93c11466c0 (LWP 2475277) "mir_perfor:sh3"  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x7f93cc851848)
    at ./nptl/futex-internal.c:57
  9    Thread 0x7f93c09456c0 (LWP 2475278) "mir_perfor:sh4"  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x7f93cc851848)
    at ./nptl/futex-internal.c:57
  10   Thread 0x7f93c01446c0 (LWP 2475279) "mir_perfor:sh5"  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x7f93cc851848)
    at ./nptl/futex-internal.c:57
  11   Thread 0x7f93bf9436c0 (LWP 2475280) "mir_perfor:sh6"  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x7f93cc851848)
    at ./nptl/futex-internal.c:57
  12   Thread 0x7f93bf1426c0 (LWP 2475281) "mir_perfor:sh7"  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x7f93cc851848)
    at ./nptl/futex-internal.c:57
  13   Thread 0x7f93be9416c0 (LWP 2475282) "mir_perfor:sh8"  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x7f93cc851848)
    at ./nptl/futex-internal.c:57
  14   Thread 0x7f93be1406c0 (LWP 2475283) "mir_perfor:sh9"  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x7f93cc851848)
    at ./nptl/futex-internal.c:57
  15   Thread 0x7f93bd93f6c0 (LWP 2475284) "mir_perfor:sh10" __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x7f93cc851848)
    at ./nptl/futex-internal.c:57
  16   Thread 0x7f93bd13e6c0 (LWP 2475285) "mir_perfor:sh11" __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x7f93cc851848)
    at ./nptl/futex-internal.c:57
  17   Thread 0x7f9392ffd6c0 (LWP 2475286) "mir_perf:gdrv0"  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x7f93cc0d7480)
    at ./nptl/futex-internal.c:57
  18   Thread 0x7f93927fc6c0 (LWP 2475287) "mir_perf:gdrv0"  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x7f93cc1a7290)
    at ./nptl/futex-internal.c:57
  19   Thread 0x7f9391ffb6c0 (LWP 2475288) "mir_perf:gdrv0"  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x7f93cc21d170)
    at ./nptl/futex-internal.c:57
  20   Thread 0x7f939175a6c0 (LWP 2475289) "mir_perf:gdrv0"  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x7f93cc29f630)
    at ./nptl/futex-internal.c:57
  21   Thread 0x7f9390f596c0 (LWP 2475290) "mtf/AsyncServer" __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x7f93cc09e550)
    at ./nptl/futex-internal.c:57

Thread 21 (Thread 0x7f9390f596c0 (LWP 2475290) "mtf/AsyncServer"):
#0  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x7f93cc09e550) at ./nptl/futex-internal.c:57
#1  __futex_abstimed_wait_common (cancel=true, private=0, abstime=0x0, clockid=0, expected=0, futex_word=0x7f93cc09e550) at ./nptl/futex-internal.c:87
#2  __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x7f93cc09e550, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at ./nptl/futex-internal.c:139
#3  0x00007f93d3490338 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x7f93cc09e500, cond=0x7f93cc09e528) at ./nptl/pthread_cond_wait.c:503
#4  ___pthread_cond_wait (cond=0x7f93cc09e528, mutex=0x7f93cc09e500) at ./nptl/pthread_cond_wait.c:627
#5  0x00007f93d3a9dd6a in mir::graphics::common::EGLContextExecutor::process_loop(mir::graphics::common::EGLContextExecutor*) (me=0x7f93cc09e4f0) at /home/michal/dev/MirServer/mir/src/platform/graphics/egl_context_executor.cpp:62
#6  0x00007f93d3a9fb04 in std::__invoke_impl<void, void (*)(mir::graphics::common::EGLContextExecutor*), mir::graphics::common::EGLContextExecutor*>(std::__invoke_other, void (*&&)(mir::graphics::common::EGLContextExecutor*), mir::graphics::common::EGLContextExecutor*&&) (__f=@0x7f93cc321600: 0x7f93d3a9dc78 <mir::graphics::common::EGLContextExecutor::process_loop(mir::graphics::common::EGLContextExecutor*)>) at /usr/include/c++/12/bits/invoke.h:61
#7  0x00007f93d3a9fa77 in std::__invoke<void (*)(mir::graphics::common::EGLContextExecutor*), mir::graphics::common::EGLContextExecutor*>(void (*&&)(mir::graphics::common::EGLContextExecutor*), mir::graphics::common::EGLContextExecutor*&&) (__fn=@0x7f93cc321600: 0x7f93d3a9dc78 <mir::graphics::common::EGLContextExecutor::process_loop(mir::graphics::common::EGLContextExecutor*)>) at /usr/include/c++/12/bits/invoke.h:96
#8  0x00007f93d3a9f9d7 in std::thread::_Invoker<std::tuple<void (*)(mir::graphics::common::EGLContextExecutor*), mir::graphics::common::EGLContextExecutor*> >::_M_invoke<0ul, 1ul>(std::_Index_tuple<0ul, 1ul>) (this=0x7f93cc3215f8) at /usr/include/c++/12/bits/std_thread.h:252
#9  0x00007f93d3a9f98c in std::thread::_Invoker<std::tuple<void (*)(mir::graphics::common::EGLContextExecutor*), mir::graphics::common::EGLContextExecutor*> >::operator()() (this=0x7f93cc3215f8) at /usr/include/c++/12/bits/std_thread.h:259
#10 0x00007f93d3a9f96c in std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (*)(mir::graphics::common::EGLContextExecutor*), mir::graphics::common::EGLContextExecutor*> > >::_M_run() (this=0x7f93cc3215f0) at /usr/include/c++/12/bits/std_thread.h:210
#11 0x00007f93d37eb3a3 in  () at /lib/x86_64-linux-gnu/libstdc++.so.6
#12 0x00007f93d3491402 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#13 0x00007f93d3520590 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 20 (Thread 0x7f939175a6c0 (LWP 2475289) "mir_perf:gdrv0"):
#0  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x7f93cc29f630) at ./nptl/futex-internal.c:57
#1  __futex_abstimed_wait_common (cancel=true, private=0, abstime=0x0, clockid=0, expected=0, futex_word=0x7f93cc29f630) at ./nptl/futex-internal.c:87
#2  __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x7f93cc29f630, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at ./nptl/futex-internal.c:139
#3  0x00007f93d3490338 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x7f93cc29f5e0, cond=0x7f93cc29f608) at ./nptl/pthread_cond_wait.c:503
#4  ___pthread_cond_wait (cond=0x7f93cc29f608, mutex=0x7f93cc29f5e0) at ./nptl/pthread_cond_wait.c:627
#5  0x00007f93ca76129d in  () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
#6  0x00007f93ca714b9b in  () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
#7  0x00007f93ca7611cb in  () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
#8  0x00007f93d3491402 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#9  0x00007f93d3520590 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 19 (Thread 0x7f9391ffb6c0 (LWP 2475288) "mir_perf:gdrv0"):
#0  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x7f93cc21d170) at ./nptl/futex-internal.c:57
#1  __futex_abstimed_wait_common (cancel=true, private=0, abstime=0x0, clockid=0, expected=0, futex_word=0x7f93cc21d170) at ./nptl/futex-internal.c:87
#2  __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x7f93cc21d170, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at ./nptl/futex-internal.c:139
#3  0x00007f93d3490338 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x7f93cc21d120, cond=0x7f93cc21d148) at ./nptl/pthread_cond_wait.c:503
#4  ___pthread_cond_wait (cond=0x7f93cc21d148, mutex=0x7f93cc21d120) at ./nptl/pthread_cond_wait.c:627
#5  0x00007f93ca76129d in  () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
#6  0x00007f93ca714b9b in  () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
#7  0x00007f93ca7611cb in  () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
#8  0x00007f93d3491402 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#9  0x00007f93d3520590 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 18 (Thread 0x7f93927fc6c0 (LWP 2475287) "mir_perf:gdrv0"):
#0  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x7f93cc1a7290) at ./nptl/futex-internal.c:57
#1  __futex_abstimed_wait_common (cancel=true, private=0, abstime=0x0, clockid=0, expected=0, futex_word=0x7f93cc1a7290) at ./nptl/futex-internal.c:87
#2  __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x7f93cc1a7290, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at ./nptl/futex-internal.c:139
#3  0x00007f93d3490338 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x7f93cc1a7240, cond=0x7f93cc1a7268) at ./nptl/pthread_cond_wait.c:503
#4  ___pthread_cond_wait (cond=0x7f93cc1a7268, mutex=0x7f93cc1a7240) at ./nptl/pthread_cond_wait.c:627
#5  0x00007f93ca76129d in  () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
#6  0x00007f93ca714b9b in  () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
#7  0x00007f93ca7611cb in  () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
#8  0x00007f93d3491402 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#9  0x00007f93d3520590 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 17 (Thread 0x7f9392ffd6c0 (LWP 2475286) "mir_perf:gdrv0"):
#0  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x7f93cc0d7480) at ./nptl/futex-internal.c:57
#1  __futex_abstimed_wait_common (cancel=true, private=0, abstime=0x0, clockid=0, expected=0, futex_word=0x7f93cc0d7480) at ./nptl/futex-internal.c:87
#2  __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x7f93cc0d7480, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at ./nptl/futex-internal.c:139
#3  0x00007f93d3490338 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x7f93cc0d7430, cond=0x7f93cc0d7458) at ./nptl/pthread_cond_wait.c:503
#4  ___pthread_cond_wait (cond=0x7f93cc0d7458, mutex=0x7f93cc0d7430) at ./nptl/pthread_cond_wait.c:627
#5  0x00007f93ca76129d in  () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
#6  0x00007f93ca714b9b in  () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
#7  0x00007f93ca7611cb in  () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
#8  0x00007f93d3491402 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#9  0x00007f93d3520590 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 16 (Thread 0x7f93bd13e6c0 (LWP 2475285) "mir_perfor:sh11"):
#0  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x7f93cc851848) at ./nptl/futex-internal.c:57
#1  __futex_abstimed_wait_common (cancel=true, private=0, abstime=0x0, clockid=0, expected=0, futex_word=0x7f93cc851848) at ./nptl/futex-internal.c:87
#2  __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x7f93cc851848, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at ./nptl/futex-internal.c:139
#3  0x00007f93d3490338 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x7f93cc8517f8, cond=0x7f93cc851820) at ./nptl/pthread_cond_wait.c:503
#4  ___pthread_cond_wait (cond=0x7f93cc851820, mutex=0x7f93cc8517f8) at ./nptl/pthread_cond_wait.c:627
#5  0x00007f93ca76129d in  () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
#6  0x00007f93ca714b9b in  () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
#7  0x00007f93ca7611cb in  () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
#8  0x00007f93d3491402 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#9  0x00007f93d3520590 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 15 (Thread 0x7f93bd93f6c0 (LWP 2475284) "mir_perfor:sh10"):
#0  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x7f93cc851848) at ./nptl/futex-internal.c:57
#1  __futex_abstimed_wait_common (cancel=true, private=0, abstime=0x0, clockid=0, expected=0, futex_word=0x7f93cc851848) at ./nptl/futex-internal.c:87
#2  __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x7f93cc851848, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at ./nptl/futex-internal.c:139
#3  0x00007f93d3490338 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x7f93cc8517f8, cond=0x7f93cc851820) at ./nptl/pthread_cond_wait.c:503
#4  ___pthread_cond_wait (cond=0x7f93cc851820, mutex=0x7f93cc8517f8) at ./nptl/pthread_cond_wait.c:627
#5  0x00007f93ca76129d in  () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
#6  0x00007f93ca714b9b in  () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
#7  0x00007f93ca7611cb in  () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
#8  0x00007f93d3491402 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#9  0x00007f93d3520590 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 14 (Thread 0x7f93be1406c0 (LWP 2475283) "mir_perfor:sh9"):
#0  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x7f93cc851848) at ./nptl/futex-internal.c:57
#1  __futex_abstimed_wait_common (cancel=true, private=0, abstime=0x0, clockid=0, expected=0, futex_word=0x7f93cc851848) at ./nptl/futex-internal.c:87
#2  __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x7f93cc851848, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at ./nptl/futex-internal.c:139
#3  0x00007f93d3490338 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x7f93cc8517f8, cond=0x7f93cc851820) at ./nptl/pthread_cond_wait.c:503
#4  ___pthread_cond_wait (cond=0x7f93cc851820, mutex=0x7f93cc8517f8) at ./nptl/pthread_cond_wait.c:627
#5  0x00007f93ca76129d in  () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
#6  0x00007f93ca714b9b in  () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
#7  0x00007f93ca7611cb in  () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
#8  0x00007f93d3491402 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#9  0x00007f93d3520590 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 13 (Thread 0x7f93be9416c0 (LWP 2475282) "mir_perfor:sh8"):
#0  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x7f93cc851848) at ./nptl/futex-internal.c:57
#1  __futex_abstimed_wait_common (cancel=true, private=0, abstime=0x0, clockid=0, expected=0, futex_word=0x7f93cc851848) at ./nptl/futex-internal.c:87
#2  __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x7f93cc851848, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at ./nptl/futex-internal.c:139
#3  0x00007f93d3490338 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x7f93cc8517f8, cond=0x7f93cc851820) at ./nptl/pthread_cond_wait.c:503
#4  ___pthread_cond_wait (cond=0x7f93cc851820, mutex=0x7f93cc8517f8) at ./nptl/pthread_cond_wait.c:627
#5  0x00007f93ca76129d in  () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
#6  0x00007f93ca714b9b in  () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
#7  0x00007f93ca7611cb in  () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
#8  0x00007f93d3491402 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#9  0x00007f93d3520590 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 12 (Thread 0x7f93bf1426c0 (LWP 2475281) "mir_perfor:sh7"):
#0  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x7f93cc851848) at ./nptl/futex-internal.c:57
#1  __futex_abstimed_wait_common (cancel=true, private=0, abstime=0x0, clockid=0, expected=0, futex_word=0x7f93cc851848) at ./nptl/futex-internal.c:87
#2  __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x7f93cc851848, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at ./nptl/futex-internal.c:139
#3  0x00007f93d3490338 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x7f93cc8517f8, cond=0x7f93cc851820) at ./nptl/pthread_cond_wait.c:503
#4  ___pthread_cond_wait (cond=0x7f93cc851820, mutex=0x7f93cc8517f8) at ./nptl/pthread_cond_wait.c:627
#5  0x00007f93ca76129d in  () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
#6  0x00007f93ca714b9b in  () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
#7  0x00007f93ca7611cb in  () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
#8  0x00007f93d3491402 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#9  0x00007f93d3520590 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 11 (Thread 0x7f93bf9436c0 (LWP 2475280) "mir_perfor:sh6"):
#0  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x7f93cc851848) at ./nptl/futex-internal.c:57
#1  __futex_abstimed_wait_common (cancel=true, private=0, abstime=0x0, clockid=0, expected=0, futex_word=0x7f93cc851848) at ./nptl/futex-internal.c:87
#2  __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x7f93cc851848, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at ./nptl/futex-internal.c:139
#3  0x00007f93d3490338 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x7f93cc8517f8, cond=0x7f93cc851820) at ./nptl/pthread_cond_wait.c:503
#4  ___pthread_cond_wait (cond=0x7f93cc851820, mutex=0x7f93cc8517f8) at ./nptl/pthread_cond_wait.c:627
#5  0x00007f93ca76129d in  () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
#6  0x00007f93ca714b9b in  () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
#7  0x00007f93ca7611cb in  () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
#8  0x00007f93d3491402 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#9  0x00007f93d3520590 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 10 (Thread 0x7f93c01446c0 (LWP 2475279) "mir_perfor:sh5"):
#0  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x7f93cc851848) at ./nptl/futex-internal.c:57
#1  __futex_abstimed_wait_common (cancel=true, private=0, abstime=0x0, clockid=0, expected=0, futex_word=0x7f93cc851848) at ./nptl/futex-internal.c:87
#2  __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x7f93cc851848, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at ./nptl/futex-internal.c:139
#3  0x00007f93d3490338 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x7f93cc8517f8, cond=0x7f93cc851820) at ./nptl/pthread_cond_wait.c:503
#4  ___pthread_cond_wait (cond=0x7f93cc851820, mutex=0x7f93cc8517f8) at ./nptl/pthread_cond_wait.c:627
#5  0x00007f93ca76129d in  () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
#6  0x00007f93ca714b9b in  () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
#7  0x00007f93ca7611cb in  () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
#8  0x00007f93d3491402 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#9  0x00007f93d3520590 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 9 (Thread 0x7f93c09456c0 (LWP 2475278) "mir_perfor:sh4"):
#0  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x7f93cc851848) at ./nptl/futex-internal.c:57
#1  __futex_abstimed_wait_common (cancel=true, private=0, abstime=0x0, clockid=0, expected=0, futex_word=0x7f93cc851848) at ./nptl/futex-internal.c:87
#2  __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x7f93cc851848, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at ./nptl/futex-internal.c:139
#3  0x00007f93d3490338 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x7f93cc8517f8, cond=0x7f93cc851820) at ./nptl/pthread_cond_wait.c:503
#4  ___pthread_cond_wait (cond=0x7f93cc851820, mutex=0x7f93cc8517f8) at ./nptl/pthread_cond_wait.c:627
#5  0x00007f93ca76129d in  () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
#6  0x00007f93ca714b9b in  () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
#7  0x00007f93ca7611cb in  () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
#8  0x00007f93d3491402 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#9  0x00007f93d3520590 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 8 (Thread 0x7f93c11466c0 (LWP 2475277) "mir_perfor:sh3"):
#0  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x7f93cc851848) at ./nptl/futex-internal.c:57
#1  __futex_abstimed_wait_common (cancel=true, private=0, abstime=0x0, clockid=0, expected=0, futex_word=0x7f93cc851848) at ./nptl/futex-internal.c:87
#2  __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x7f93cc851848, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at ./nptl/futex-internal.c:139
#3  0x00007f93d3490338 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x7f93cc8517f8, cond=0x7f93cc851820) at ./nptl/pthread_cond_wait.c:503
#4  ___pthread_cond_wait (cond=0x7f93cc851820, mutex=0x7f93cc8517f8) at ./nptl/pthread_cond_wait.c:627
#5  0x00007f93ca76129d in  () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
#6  0x00007f93ca714b9b in  () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
#7  0x00007f93ca7611cb in  () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
#8  0x00007f93d3491402 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#9  0x00007f93d3520590 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 7 (Thread 0x7f93bc93d6c0 (LWP 2475276) "mir_perfor:sh2"):
#0  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x7f93cc851848) at ./nptl/futex-internal.c:57
#1  __futex_abstimed_wait_common (cancel=true, private=0, abstime=0x0, clockid=0, expected=0, futex_word=0x7f93cc851848) at ./nptl/futex-internal.c:87
#2  __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x7f93cc851848, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at ./nptl/futex-internal.c:139
#3  0x00007f93d3490338 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x7f93cc8517f8, cond=0x7f93cc851820) at ./nptl/pthread_cond_wait.c:503
#4  ___pthread_cond_wait (cond=0x7f93cc851820, mutex=0x7f93cc8517f8) at ./nptl/pthread_cond_wait.c:627
#5  0x00007f93ca76129d in  () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
#6  0x00007f93ca714b9b in  () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
#7  0x00007f93ca7611cb in  () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
#8  0x00007f93d3491402 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#9  0x00007f93d3520590 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 6 (Thread 0x7f9393fff6c0 (LWP 2475275) "mir_perfor:sh1"):
#0  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x7f93cc851848) at ./nptl/futex-internal.c:57
#1  __futex_abstimed_wait_common (cancel=true, private=0, abstime=0x0, clockid=0, expected=0, futex_word=0x7f93cc851848) at ./nptl/futex-internal.c:87
#2  __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x7f93cc851848, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at ./nptl/futex-internal.c:139
#3  0x00007f93d3490338 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x7f93cc8517f8, cond=0x7f93cc851820) at ./nptl/pthread_cond_wait.c:503
#4  ___pthread_cond_wait (cond=0x7f93cc851820, mutex=0x7f93cc8517f8) at ./nptl/pthread_cond_wait.c:627
#5  0x00007f93ca76129d in  () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
#6  0x00007f93ca714b9b in  () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
#7  0x00007f93ca7611cb in  () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
#8  0x00007f93d3491402 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#9  0x00007f93d3520590 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 5 (Thread 0x7f93937fe6c0 (LWP 2475274) "mir_perfor:sh0"):
#0  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x7f93cc851848) at ./nptl/futex-internal.c:57
#1  __futex_abstimed_wait_common (cancel=true, private=0, abstime=0x0, clockid=0, expected=0, futex_word=0x7f93cc851848) at ./nptl/futex-internal.c:87
#2  __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x7f93cc851848, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at ./nptl/futex-internal.c:139
#3  0x00007f93d3490338 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x7f93cc8517f8, cond=0x7f93cc851820) at ./nptl/pthread_cond_wait.c:503
#4  ___pthread_cond_wait (cond=0x7f93cc851820, mutex=0x7f93cc8517f8) at ./nptl/pthread_cond_wait.c:627
#5  0x00007f93ca76129d in  () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
#6  0x00007f93ca714b9b in  () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
#7  0x00007f93ca7611cb in  () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
#8  0x00007f93d3491402 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#9  0x00007f93d3520590 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 4 (Thread 0x7f93c19476c0 (LWP 2475273) "mir_per:disk$0"):
#0  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x7f93cc0151d8) at ./nptl/futex-internal.c:57
#1  __futex_abstimed_wait_common (cancel=true, private=0, abstime=0x0, clockid=0, expected=0, futex_word=0x7f93cc0151d8) at ./nptl/futex-internal.c:87
#2  __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x7f93cc0151d8, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at ./nptl/futex-internal.c:139
#3  0x00007f93d3490338 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x7f93cc015188, cond=0x7f93cc0151b0) at ./nptl/pthread_cond_wait.c:503
#4  ___pthread_cond_wait (cond=0x7f93cc0151b0, mutex=0x7f93cc015188) at ./nptl/pthread_cond_wait.c:627
#5  0x00007f93ca76129d in  () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
#6  0x00007f93ca714b9b in  () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
#7  0x00007f93ca7611cb in  () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
#8  0x00007f93d3491402 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#9  0x00007f93d3520590 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 3 (Thread 0x7f93d1f036c0 (LWP 2474932) "mir_perform-ust"):
#0  syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
#1  0x00007f93d2dbc83d in  () at /lib/x86_64-linux-gnu/liblttng-ust.so.1
#2  0x00007f93d3491402 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#3  0x00007f93d3520590 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 2 (Thread 0x7f93d27046c0 (LWP 2474931) "mir_perform-ust"):
#0  syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
#1  0x00007f93d2dbc83d in  () at /lib/x86_64-linux-gnu/liblttng-ust.so.1
#2  0x00007f93d3491402 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#3  0x00007f93d3520590 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 1 (Thread 0x7f93d2708200 (LWP 2474930) "mir_performance"):
#0  __GI___libc_read (nbytes=4096, buf=0x55ac5a83cc90, fd=30) at ../sysdeps/unix/sysv/linux/read.c:26
#1  __GI___libc_read (fd=30, buf=0x55ac5a83cc90, nbytes=4096) at ../sysdeps/unix/sysv/linux/read.c:24
#2  0x00007f93d3489596 in _IO_new_file_underflow (fp=0x55ac5a839530) at ./libio/libioP.h:947
#3  0x00007f93d348a6c6 in __GI__IO_default_uflow (fp=0x55ac5a839530) at ./libio/libioP.h:947
#4  0x00007f93d347cf9a in __GI__IO_getline_info (fp=fp@entry=0x55ac5a839530, buf=buf@entry=0x7fff54499bf0 "[build] <default>:", '=' <repeats 37 times>, "\n", n=n@entry=1023, delim=delim@entry=10, extract_delim=extract_delim@entry=1, eof=eof@entry=0x0) at ./libio/iogetline.c:60
#5  0x00007f93d347d09c in __GI__IO_getline (fp=fp@entry=0x55ac5a839530, buf=buf@entry=0x7fff54499bf0 "[build] <default>:", '=' <repeats 37 times>, "\n", n=n@entry=1023, delim=delim@entry=10, extract_delim=extract_delim@entry=1) at ./libio/iogetline.c:34
#6  0x00007f93d347bf82 in _IO_fgets (buf=0x7fff54499bf0 "[build] <default>:", '=' <repeats 37 times>, "\n", n=1024, fp=0x55ac5a839530) at ./libio/iofgets.c:53
#7  0x000055ac59a76179 in mir::test::Popen::get_line(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (this=0x7fff5449a040, line="") at /home/michal/dev/MirServer/mir/tests/mir_test/popen.cpp:43
#8  0x000055ac59a641a4 in (anonymous namespace)::AbstractGLMark2Test::run_glmark2(char const*) (this=0x55ac5a7d5a30, args=0x55ac59abe040 "") at /home/michal/dev/MirServer/mir/tests/performance-tests/test_glmark2-es2.cpp:76
#9  0x000055ac59a65fb9 in (anonymous namespace)::HostedGLMark2Wayland_windowed_Test::TestBody() (this=0x55ac5a7d5a30) at /home/michal/dev/MirServer/mir/tests/performance-tests/test_glmark2-es2.cpp:308
#10 0x000055ac59abc3ff in void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) ()
#11 0x000055ac59aacd56 in testing::Test::Run() ()
#12 0x000055ac59aacf15 in testing::TestInfo::Run() ()
#13 0x000055ac59aad4e9 in testing::TestSuite::Run() ()
#14 0x000055ac59ab29df in testing::internal::UnitTestImpl::RunAllTests() ()
#15 0x000055ac59abc9c7 in bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) ()
#16 0x000055ac59aacfd5 in testing::UnitTest::Run() ()
#17 0x000055ac59a7ed21 in RUN_ALL_TESTS() () at /usr/include/gtest/gtest.h:2293
#18 0x000055ac59a7ec6e in mir_test_framework::main(int, char**) (argc=1, argv=0x7fff5449a8c8) at /home/michal/dev/MirServer/mir/tests/mir_test_framework/command_line_server_configuration.cpp:59
#19 0x000055ac59a89438 in main(int, char**) (argc=2, argv=0x7fff5449a8c8) at /home/michal/dev/MirServer/mir/tests/mir_test_framework/main.cpp:30
Warning: the current language does not match this frame.
Detaching from program: /home/michal/dev/MirServer/mir/build-Debug/bin/mir_performance_tests.bin, process 2474930
[Inferior 1 (process 2474930) detached]

This may well be a separate shutdown issue that just gets surfaced through this fix.

@AlanGriffiths
Copy link
Contributor Author

I cannot reproduce the deadlock you see. I repeatedly get:

$ mir-test-tools.performance-test --gtest_filter=Hosted*
WARNING: some of these tests (GLMark2Xwayland.*) fail with the x11 interface connected
Running main() from main.cpp
Note: Google Test filter = Hosted*
[==========] Running 2 tests from 1 test suite.
[----------] Global test environment set-up.
[----------] 2 tests from HostedGLMark2Wayland
[ RUN      ] HostedGLMark2Wayland.fullscreen
Saving host output to: /tmp/HostedGLMark2Wayland_fullscreen_host.log
Saving server logs to: /tmp/HostedGLMark2Wayland_fullscreen_server.log
Saving GLMark2 detailed results to: /tmp/HostedGLMark2Wayland_fullscreen.log
^CMir fatal error: Critical error in Wayland platform: /root/parts/mir/src/src/platforms/wayland/display.cpp(290): Throw in function void mir::graphics::wayland::Display::run()
Dynamic exception type: boost::wrapexcept<std::system_error>
std::exception::what: Failed to read Wayland events: Broken pipe


!!! Fatal signal received. Attempting cleanup, but deadlock may occur
Mir fatal error: Unsupported attempt to continue after a fatal signal: SIGABRT
Aborted

@Saviq
Copy link
Collaborator

Saviq commented Aug 31, 2023

With "built locally" I meant:

<fix-2011> $ ./build-Debug/bin/mir_performance_tests --gtest_filter=Hosted*
LD_LIBRARY_PATH=./build-Debug/bin/../lib/
MIR_SERVER_PLATFORM_PATH=./build-Debug/bin/../lib/server-modules/
exec=./build-Debug/bin/mir_performance_tests.bin
Running main() from main.cpp
Note: Google Test filter = Hosted*
[==========] Running 2 tests from 1 test suite.
[----------] Global test environment set-up.
[----------] 2 tests from HostedGLMark2Wayland
[ RUN      ] HostedGLMark2Wayland.fullscreen
Saving host output to: /tmp/HostedGLMark2Wayland_fullscreen_host.log
Saving server logs to: /tmp/HostedGLMark2Wayland_fullscreen_server.log
Saving GLMark2 detailed results to: /tmp/HostedGLMark2Wayland_fullscreen.log
^C
^C
^C[1]    2589244 killed     ./build-Debug/bin/mir_performance_tests --gtest_filter=Hosted*

@Saviq
Copy link
Collaborator

Saviq commented Aug 31, 2023

The "pure virtual…" one I get when cancelling quite quickly after glmark2 starts.

@Saviq
Copy link
Collaborator

Saviq commented Aug 31, 2023

Just in case it matters, the outer server is using the x11 platform here.

@AlanGriffiths
Copy link
Contributor Author

Anyway, this does fix the deadlock seen in #2011. Extract from the gdb log in the report:

#7  mir::graphics::wayland::DisplayClient::display_configuration (this=0x7feac0021d58) at ./src/platforms/wayland/displayclient.cpp:968
#8  mir::graphics::wayland::Display::configuration (this=0x7feac0021d50) at ./src/platforms/wayland/display.cpp:116
#9  0x00007feac879e121 in mir::DisplayServer::Private::configure_display (this=0x7feac0000dd0) at ./src/server/display_server.cpp:191
#10 mir::DisplayServer::Private::Private(mir::ServerConfiguration&)::{lambda()#1}::operator()() const (__closure=<optimized out>) at ./src/server/display_server.cpp:91
#11 std::__invoke_impl<void, mir::DisplayServer::Private::Private(mir::ServerConfiguration&)::{lambda()#1}&>(std::__invoke_other, mir::DisplayServer::Private::Private(mir::ServerConfiguration&)::{lambda()#1}&) (__f=...) at /usr/include/c++/11/bits/invoke.h:61
#12 std::__invoke_r<void, mir::DisplayServer::Private::Private(mir::ServerConfiguration&)::{lambda()#1}&>(mir::DisplayServer::Private::Private(mir::ServerConfiguration&)::{lambda()#1}&) (__fn=...) at /usr/include/c++/11/bits/invoke.h:111
#13 std::_Function_handler<void (), mir::DisplayServer::Private::Private(mir::ServerConfiguration&)::{lambda()#1}>::_M_invoke(std::_Any_data const&) (__functor=...) at /usr/include/c++/11/bits/std_function.h:290
#14 0x00007feac5a5e481 in std::function<void ()>::operator()() const (this=0x7fea6c0018d0) at /usr/include/c++/11/bits/std_function.h:590
#15 mir::graphics::wayland::DisplayClient::on_display_config_changed (this=0x7feac0021d58) at ./src/platforms/wayland/displayclient.cpp:560
#16 0x00007feac5a5f798 in mir::graphics::wayland::DisplayClient::remove_global (data=0x7feac0021d58, id=<optimized out>) at ./src/platforms/wayland/displayclient.cpp:650

I've yet to reproduce the deadlock(s) you are now seeing, but this is correct and needed. Can we land it?

@AlanGriffiths
Copy link
Contributor Author

I've managed to reproduce

...
Saving server logs to: /tmp/HostedGLMark2Wayland_windowed_server.log
Saving GLMark2 detailed results to: /tmp/HostedGLMark2Wayland_windowed.log
^Cpure virtual method called
terminate called without an active exception
Aborted

With a local build, so can confirm it is a failure mode. However, it doesn't cause a hang, and isn't directly related this PR.

Copy link
Collaborator

@Saviq Saviq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've yet to reproduce the deadlock(s) you are now seeing, but this is correct and needed. Can we land it?

Oh of course, just wanted to make sure we don't overlook things.

Will spawn separate issues.

@AlanGriffiths AlanGriffiths added this pull request to the merge queue Sep 1, 2023
Merged via the queue into main with commit 7d67a33 Sep 1, 2023
32 checks passed
@AlanGriffiths AlanGriffiths deleted the fix-2011 branch September 1, 2023 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

stop_server() failed to stop server in mir_performance_tests
2 participants