canonical / mir

The Mir compositor
GNU General Public License v2.0
643 stars 103 forks source link

nvidia app closing russian roulette #3672

Open tarek-y-ismail opened 1 week ago

tarek-y-ismail commented 1 week ago

This seems to happen with multiple applications, but the most common crashes occur with firefox (unsnapped) and kgx.

With an external monitor hooked up to my nvidia GPU, there's a random chance that Mir will freeze (not crash) upon closing a window of one the aforementioned applications (among others, but those two are the two I most open and close windows with). @AlanGriffiths confirmed that this doesn't happen on his machine which doesn't use nvidia graphics.

I tried both inspecting a coredump and running mir under a debugger with and without cleanup signal handling code disabled. It appears that no signal is raised when the bug is triggered as gdb doesn't stop, I have to manually stop using ctrl + c. The stack trace doesn't contain any immediately suspicious functions. Logs also don't show any errors.

How I disabled signal handling / cleanup code **This is just an educated guess, so it might be wrong.** ```diff @@ -34,7 +34,6 @@ namespace { -constexpr std::array const fatal_error_signals = {SIGQUIT, SIGABRT, SIGFPE, SIGSEGV, SIGBUS }; std::weak_ptr weak_emergency_cleanup; @@ -210,17 +209,6 @@ void mir::run_mir( server_ptr->stop(); }; - struct sigaction old_action; - if ((sigaction(SIGHUP, nullptr, &old_action) == 0) && (old_action.sa_handler == SIG_IGN)) - { - // If our parent process is ignoring SIGHUP (e.g. is nohup) then we do the same - main_loop->register_signal_handler({SIGINT, SIGTERM}, terminator); - } - else - { - main_loop->register_signal_handler({SIGINT, SIGHUP, SIGTERM}, terminator); - } - FatalErrorStrategy fatal_error_strategy{config.the_fatal_error_strategy()}; DisplayServer server(config); @@ -228,53 +216,6 @@ void mir::run_mir( weak_emergency_cleanup = config.the_emergency_cleanup(); - static std::atomic concurrent_calls{0}; - - auto const raii = raii::paired_calls( - [&]() - { - if (!concurrent_calls++) - { - for (auto sig : fatal_error_signals) - { - struct sigaction sig_handler_desc; - sigfillset(&sig_handler_desc.sa_mask); - sig_handler_desc.sa_flags = SA_SIGINFO; - sig_handler_desc.sa_sigaction = &fatal_signal_cleanup; - - if (sigaction(sig, &sig_handler_desc, old_handlers.initialiser_for_signal(sig))) - { - using namespace std::string_literals; - BOOST_THROW_EXCEPTION(( - std::system_error{ - errno, - std::system_category(), - "Failed to install signal handler for "s + signum_to_string(sig) - })); - } - } - } - }, - [&]() - { - if (!--concurrent_calls) - { - for (auto sig : fatal_error_signals) - { - if (sigaction(sig, old_handlers.at(sig), nullptr)) - { - using namespace std::string_literals; - BOOST_THROW_EXCEPTION(( - std::system_error{ - errno, - std::system_category(), - "Failed to install signal handler for "s + signum_to_string(sig) - })); - } - } - } - }); - mir::ThreadPoolExecutor::set_unhandled_exception_handler(&terminate_with_current_exception); init(server); ```
tarek-y-ismail commented 4 days ago

What we know so far:

  1. The crash happens if there's any content on the external monitor. So --display-config=clone or --display-config=sidebyside exhibit the issue. But --display-config=single doesn't.
  2. The crash sometimes breaks things so bad the magic sysreqs don't work and I have to force shutdown
  3. Looking at coredump stack traces, there isn't one place where Mir always crashes. If we ignore threads that are external to us, usually there are some threads called from Mir and into OpenGL.
  4. Some apps like xterm don't exhibit this crash.
  5. It doesn't matter if alt+f4 or ctrl+d is used with kgx.
Coredump stack trace sample (signal handling / cleanup code disabled) Notable threads are: 1, 29, and 14. ``` Thread 30 (Thread 0x7fb7ae4006c0 (LWP 11804)): #0 futex_wait (private=0, expected=2, futex_word=0x599d2b579530) at ../sysdeps/nptl/futex-internal.h:146 #1 __GI___lll_lock_wait (futex=futex@entry=0x599d2b579530, private=0) at ./nptl/lowlevellock.c:49 #2 0x00007fb7fd0a00f1 in lll_mutex_lock_optimized (mutex=0x599d2b579530) at ./nptl/pthread_mutex_lock.c:48 #3 ___pthread_mutex_lock (mutex=0x599d2b579530) at ./nptl/pthread_mutex_lock.c:93 #4 0x00007fb7f90b9a35 in ??? () at /lib/x86_64-linux-gnu/libEGL_nvidia.so.0 #5 0x00007fb7f906fb7b in ??? () at /lib/x86_64-linux-gnu/libEGL_nvidia.so.0 #6 0x00007fb7f90bfcce in ??? () at /lib/x86_64-linux-gnu/libEGL_nvidia.so.0 #7 0x00007fb7fd09ca94 in start_thread (arg=) at ./nptl/pthread_create.c:447 #8 0x00007fb7fd129c3c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78 Thread 29 (Thread 0x7fb7c74006c0 (LWP 11517)): #0 futex_wait (private=0, expected=2, futex_word=0x599d2b579530) at ../sysdeps/nptl/futex-internal.h:146 #1 __GI___lll_lock_wait (futex=futex@entry=0x599d2b579530, private=0) at ./nptl/lowlevellock.c:49 #2 0x00007fb7fd0a00f1 in lll_mutex_lock_optimized (mutex=0x599d2b579530) at ./nptl/pthread_mutex_lock.c:48 #3 ___pthread_mutex_lock (mutex=0x599d2b579530) at ./nptl/pthread_mutex_lock.c:93 #4 0x00007fb7fb362a25 in ??? () at /lib/x86_64-linux-gnu/libnvidia-glsi.so.550.120 #5 0x00007fb7fb36e1ee in _nv004glsi () at /lib/x86_64-linux-gnu/libnvidia-glsi.so.550.120 #6 0x00007fb7f2bf2701 in ??? () at /lib/x86_64-linux-gnu/libnvidia-eglcore.so.550.120 #7 0x00007fb7f29c8b21 in ??? () at /lib/x86_64-linux-gnu/libnvidia-eglcore.so.550.120 #8 0x00007fb7fc26ae25 in (anonymous namespace)::BoundEGLStream::TextureHandle::bind (this=0x7fb79020da80) at /home/tarek/code-projects/mir/src/platforms/eglstream-kms/server/buffer_allocator.cpp:203 #9 0x00007fb7fc26c2b8 in (anonymous namespace)::EGLStreamBuffer::bind (this=0x7fb79020da50) at /home/tarek/code-projects/mir/src/platforms/eglstream-kms/server/buffer_allocator.cpp:466 #10 0x00007fb7fe569042 in mir::renderer::gl::Renderer::draw (this=0x7fb79c371830, renderable=...) at /home/tarek/code-projects/mir/src/renderers/gl/renderer.cpp:502 #11 0x00007fb7fe5685ac in mir::renderer::gl::Renderer::render (this=0x7fb79c371830, renderables=std::vector of length 7, capacity 7 = {...}) at /home/tarek/code-projects/mir/src/renderers/gl/renderer.cpp:366 #12 0x00007fb7fe297b0d in mir::compositor::DefaultDisplayBufferCompositor::composite (this=0x7fb790205200, scene_elements=...) at /home/tarek/code-projects/mir/src/server/compositor/default_display_buffer_compositor.cpp:121 #13 0x00007fb7fe2a088d in mir::compositor::CompositingFunctor::operator() (this=0x599d2c926a10) at /home/tarek/code-projects/mir/src/server/compositor/multi_threaded_compositor.cpp:153 #14 0x00007fb7fe2a690f in std::__invoke_impl (__f=...) at /usr/include/c++/13/bits/invoke.h:61 #15 0x00007fb7fe2a6781 in std::__invoke (__fn=...) at /usr/include/c++/13/bits/invoke.h:96 #16 0x00007fb7fe2a609e in std::reference_wrapper::operator()<>() const (this=0x599d2bd21730) at /usr/include/c++/13/bits/refwrap.h:359 #17 0x00007fb7fe2a5568 in std::__invoke_impl&> (__f=...) at /usr/include/c++/13/bits/invoke.h:61 #18 0x00007fb7fe2a4766 in std::__invoke_r&> (__fn=...) at /usr/include/c++/13/bits/invoke.h:111 #19 0x00007fb7fe2a37fe in std::_Function_handler >::_M_invoke(std::_Any_data const&) (__functor=...) at /usr/include/c++/13/bits/std_function.h:290 #20 0x00007fb7fe8a47e0 in std::function::operator()() const (this=0x599d2bd21730) at /usr/include/c++/13/bits/std_function.h:591 #21 0x00007fb7fe8bb00f in operator() (__closure=0x599d2bd21710) at /home/tarek/code-projects/mir/src/common/thread_pool_executor.cpp:204 #22 0x00007fb7fe8bd67e in std::__invoke_impl&&)::&>(std::__invoke_other, struct {...} &) (__f=...) at /usr/include/c++/13/bits/invoke.h:61 #23 0x00007fb7fe8bcf1f in std::__invoke_r&&)::&>(struct {...} &) (__fn=...) at /usr/include/c++/13/bits/invoke.h:111 #24 0x00007fb7fe8bc59a in std::_Function_handler&&):: >::_M_invoke(const std::_Any_data &) (__functor=...) at /usr/include/c++/13/bits/std_function.h:290 #25 0x00007fb7fe8a47e0 in std::function::operator()() const (this=0x7fb7c73ff270) at /usr/include/c++/13/bits/std_function.h:591 #26 0x00007fb7fe8babb0 in (anonymous namespace)::Worker::work_loop (me=0x599d2b55b950, shutdown_channel=...) at /home/tarek/code-projects/mir/src/common/thread_pool_executor.cpp:122 #27 0x00007fb7fe8be6c5 in std::__invoke_impl*>&&), (anonymous namespace)::Worker*, std::promise*> > (__f=@0x599d2ca77e38: 0x7fb7fe8baae1 <(anonymous namespace)::Worker::work_loop((anonymous namespace)::Worker*, std::promise*>&&)>) at /usr/include/c++/13/bits/invoke.h:61 #28 0x00007fb7fe8be63b in std::__invoke*>&&), (anonymous namespace)::Worker*, std::promise*> > (__fn=@0x599d2ca77e38: 0x7fb7fe8baae1 <(anonymous namespace)::Worker::work_loop((anonymous namespace)::Worker*, std::promise*>&&)>) at /usr/include/c++/13/bits/invoke.h:96 #29 0x00007fb7fe8be553 in std::thread::_Invoker*>&&), (anonymous namespace)::Worker*, std::promise*> > >::_M_invoke<0, 1, 2> (this=0x599d2ca77e18) at /usr/include/c++/13/bits/std_thread.h:292 #30 0x00007fb7fe8be4d6 in std::thread::_Invoker*>&&), (anonymous namespace)::Worker*, std::promise*> > >::operator() (this=0x599d2ca77e18) at /usr/include/c++/13/bits/std_thread.h:299 #31 0x00007fb7fe8be4a0 in std::thread::_State_impl*>&&), (anonymous namespace)::Worker*, std::promise*> > > >::_M_run (this=0x599d2ca77e10) at /usr/include/c++/13/bits/std_thread.h:244 #32 0x00007fb7fd4ecdb4 in ??? () at /lib/x86_64-linux-gnu/libstdc++.so.6 #33 0x00007fb7fd09ca94 in start_thread (arg=) at ./nptl/pthread_create.c:447 #34 0x00007fb7fd129c3c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78 Thread 28 (Thread 0x7fb7974006c0 (LWP 11800)): #0 0x00007fb7fd12bc1a in __libc_recv (flags=, len=56, buf=0x7fb7973ff0d0, fd=161) at ../sysdeps/unix/sysv/linux/recv.c:28 #1 __libc_recv (fd=161, buf=0x7fb7973ff0d0, len=56, flags=0) at ../sysdeps/unix/sysv/linux/recv.c:23 #2 0x00007fb7f9079c33 in ??? () at /lib/x86_64-linux-gnu/libEGL_nvidia.so.0 #3 0x00007fb7f907a9fd in ??? () at /lib/x86_64-linux-gnu/libEGL_nvidia.so.0 #4 0x00007fb7f906fb5d in ??? () at /lib/x86_64-linux-gnu/libEGL_nvidia.so.0 #5 0x00007fb7f90bfcce in ??? () at /lib/x86_64-linux-gnu/libEGL_nvidia.so.0 #6 0x00007fb7fd09ca94 in start_thread (arg=) at ./nptl/pthread_create.c:447 #7 0x00007fb7fd129c3c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78 Thread 27 (Thread 0x7fb7a2a006c0 (LWP 11793)): #0 0x00007fb7fd12bc1a in __libc_recv (flags=, len=56, buf=0x7fb7a29ff0d0, fd=155) at ../sysdeps/unix/sysv/linux/recv.c:28 #1 __libc_recv (fd=155, buf=0x7fb7a29ff0d0, len=56, flags=0) at ../sysdeps/unix/sysv/linux/recv.c:23 #2 0x00007fb7f9079c33 in ??? () at /lib/x86_64-linux-gnu/libEGL_nvidia.so.0 #3 0x00007fb7f907a9fd in ??? () at /lib/x86_64-linux-gnu/libEGL_nvidia.so.0 #4 0x00007fb7f906fb5d in ??? () at /lib/x86_64-linux-gnu/libEGL_nvidia.so.0 #5 0x00007fb7f90bfcce in ??? () at /lib/x86_64-linux-gnu/libEGL_nvidia.so.0 #6 0x00007fb7fd09ca94 in start_thread (arg=) at ./nptl/pthread_create.c:447 #7 0x00007fb7fd129c3c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78 Thread 26 (Thread 0x7fb7a10006c0 (LWP 11796)): #0 0x00007fb7fd12bc1a in __libc_recv (flags=, len=56, buf=0x7fb7a0fff0d0, fd=158) at ../sysdeps/unix/sysv/linux/recv.c:28 #1 __libc_recv (fd=158, buf=0x7fb7a0fff0d0, len=56, flags=0) at ../sysdeps/unix/sysv/linux/recv.c:23 #2 0x00007fb7f9079c33 in ??? () at /lib/x86_64-linux-gnu/libEGL_nvidia.so.0 #3 0x00007fb7f907a9fd in ??? () at /lib/x86_64-linux-gnu/libEGL_nvidia.so.0 #4 0x00007fb7f906fb5d in ??? () at /lib/x86_64-linux-gnu/libEGL_nvidia.so.0 #5 0x00007fb7f90bfcce in ??? () at /lib/x86_64-linux-gnu/libEGL_nvidia.so.0 #6 0x00007fb7fd09ca94 in start_thread (arg=) at ./nptl/pthread_create.c:447 #7 0x00007fb7fd129c3c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78 Thread 25 (Thread 0x7fb796a006c0 (LWP 11802)): #0 0x00007fb7fd12bc1a in __libc_recv (flags=, len=56, buf=0x7fb7969ff0d0, fd=162) at ../sysdeps/unix/sysv/linux/recv.c:28 #1 __libc_recv (fd=162, buf=0x7fb7969ff0d0, len=56, flags=0) at ../sysdeps/unix/sysv/linux/recv.c:23 #2 0x00007fb7f9079c33 in ??? () at /lib/x86_64-linux-gnu/libEGL_nvidia.so.0 #3 0x00007fb7f907a9fd in ??? () at /lib/x86_64-linux-gnu/libEGL_nvidia.so.0 #4 0x00007fb7f906fb5d in ??? () at /lib/x86_64-linux-gnu/libEGL_nvidia.so.0 #5 0x00007fb7f90bfcce in ??? () at /lib/x86_64-linux-gnu/libEGL_nvidia.so.0 #6 0x00007fb7fd09ca94 in start_thread (arg=) at ./nptl/pthread_create.c:447 #7 0x00007fb7fd129c3c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78 Thread 24 (Thread 0x7fb7c4e006c0 (LWP 11522)): #0 0x00007fb7fd11b4cd in __GI___poll (fds=0x7fb7c4dff1b0, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29 #1 0x00007fb7fe8a84fb in (anonymous namespace)::dispatch_loop(const std::string &, std::shared_ptr, std::shared_ptr, const std::function &) (name="Mir/X11 Spawner", thread_register=std::shared_ptr (use count 4, weak count 0) = {...}, dispatcher=std::shared_ptr (use count 2, weak count 0) = {...}, exception_handler=...) at /home/tarek/code-projects/mir/src/common/dispatch/threaded_dispatcher.cpp:199 #2 0x00007fb7fe8b1bce in std::__invoke_impl, std::allocator > const&, std::shared_ptr, std::shared_ptr, std::function const&), std::__cxx11::basic_string, std::allocator >, std::shared_ptr, std::shared_ptr, std::function >(std::__invoke_other, void (*&&)(std::__cxx11::basic_string, std::allocator > const&, std::shared_ptr, std::shared_ptr, std::function const&), std::__cxx11::basic_string, std::allocator >&&, std::shared_ptr&&, std::shared_ptr&&, std::function&&) (__f=@0x599d2c937438: 0x7fb7fe8a83cd <(anonymous namespace)::dispatch_loop(const std::string &, std::shared_ptr, std::shared_ptr, const std::function &)>) at /usr/include/c++/13/bits/invoke.h:61 #3 0x00007fb7fe8b19f2 in std::__invoke, std::allocator > const&, std::shared_ptr, std::shared_ptr, std::function const&), std::__cxx11::basic_string, std::allocator >, std::shared_ptr, std::shared_ptr, std::function >(void (*&&)(std::__cxx11::basic_string, std::allocator > const&, std::shared_ptr, std::shared_ptr, std::function const&), std::__cxx11::basic_string, std::allocator >&&, std::shared_ptr&&, std::shared_ptr&&, std::function&&) (__fn=@0x599d2c937438: 0x7fb7fe8a83cd <(anonymous namespace)::dispatch_loop(const std::string &, std::shared_ptr, std::shared_ptr, const std::function &)>) at /usr/include/c++/13/bits/invoke.h:96 #4 0x00007fb7fe8b1853 in std::thread::_Invoker, std::allocator > const&, std::shared_ptr, std::shared_ptr, std::function const&), std::__cxx11::basic_string, std::allocator >, std::shared_ptr, std::shared_ptr, std::function > >::_M_invoke<0ul, 1ul, 2ul, 3ul, 4ul>(std::_Index_tuple<0ul, 1ul, 2ul, 3ul, 4ul>) (this=0x599d2c9373d8) at /usr/include/c++/13/bits/std_thread.h:292 #5 0x00007fb7fe8b1778 in std::thread::_Invoker, std::allocator > const&, std::shared_ptr, std::shared_ptr, std::function const&), std::__cxx11::basic_string, std::allocator >, std::shared_ptr, std::shared_ptr, std::function > >::operator()() (this=0x599d2c9373d8) at /usr/include/c++/13/bits/std_thread.h:299 #6 0x00007fb7fe8b1428 in std::thread::_State_impl, std::allocator > const&, std::shared_ptr, std::shared_ptr, std::function const&), std::__cxx11::basic_string, std::allocator >, std::shared_ptr, std::shared_ptr, std::function > > >::_M_run() (this=0x599d2c9373d0) at /usr/include/c++/13/bits/std_thread.h:244 #7 0x00007fb7fd4ecdb4 in ??? () at /lib/x86_64-linux-gnu/libstdc++.so.6 #8 0x00007fb7fd09ca94 in start_thread (arg=) at ./nptl/pthread_create.c:447 #9 0x00007fb7fd129c3c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78 Thread 23 (Thread 0x7fb7a1a006c0 (LWP 11794)): #0 0x00007fb7fd098d61 in __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x599d2b68a9ec) at ./nptl/futex-internal.c:57 #1 __futex_abstimed_wait_common (cancel=true, private=0, abstime=0x0, clockid=0, expected=0, futex_word=0x599d2b68a9ec) at ./nptl/futex-internal.c:87 #2 __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x599d2b68a9ec, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at ./nptl/futex-internal.c:139 #3 0x00007fb7fd09b7dd in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x599d2b579530, cond=0x599d2b68a9c0) at ./nptl/pthread_cond_wait.c:503 #4 ___pthread_cond_wait (cond=0x599d2b68a9c0, mutex=0x599d2b579530) at ./nptl/pthread_cond_wait.c:627 #5 0x00007fb7f90b9c38 in ??? () at /lib/x86_64-linux-gnu/libEGL_nvidia.so.0 #6 0x00007fb7f90855d8 in ??? () at /lib/x86_64-linux-gnu/libEGL_nvidia.so.0 #7 0x00007fb7f90bfcce in ??? () at /lib/x86_64-linux-gnu/libEGL_nvidia.so.0 #8 0x00007fb7fd09ca94 in start_thread (arg=) at ./nptl/pthread_create.c:447 #9 0x00007fb7fd129c3c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78 Thread 22 (Thread 0x7fb7ba0006c0 (LWP 11526)): #0 0x00007fb7fd11b4cd in __GI___poll (fds=0x7fb7b9fff368, nfds=1, timeout=300000) at ../sysdeps/unix/sysv/linux/poll.c:29 #1 0x00007fb7f2bf6a07 in ??? () at /lib/x86_64-linux-gnu/libnvidia-eglcore.so.550.120 #2 0x00007fb7f2bf4fba in ??? () at /lib/x86_64-linux-gnu/libnvidia-eglcore.so.550.120 #3 0x00007fb7fd09ca94 in start_thread (arg=) at ./nptl/pthread_create.c:447 #4 0x00007fb7fd129c3c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78 Thread 21 (Thread 0x7fb797e006c0 (LWP 11798)): #0 0x00007fb7fd12bc1a in __libc_recv (flags=, len=56, buf=0x7fb797dff0d0, fd=159) at ../sysdeps/unix/sysv/linux/recv.c:28 #1 __libc_recv (fd=159, buf=0x7fb797dff0d0, len=56, flags=0) at ../sysdeps/unix/sysv/linux/recv.c:23 #2 0x00007fb7f9079c33 in ??? () at /lib/x86_64-linux-gnu/libEGL_nvidia.so.0 #3 0x00007fb7f907a9fd in ??? () at /lib/x86_64-linux-gnu/libEGL_nvidia.so.0 #4 0x00007fb7f906fb5d in ??? () at /lib/x86_64-linux-gnu/libEGL_nvidia.so.0 #5 0x00007fb7f90bfcce in ??? () at /lib/x86_64-linux-gnu/libEGL_nvidia.so.0 #6 0x00007fb7fd09ca94 in start_thread (arg=) at ./nptl/pthread_create.c:447 #7 0x00007fb7fd129c3c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78 Thread 20 (Thread 0x7fb7c62006c0 (LWP 11827)): #0 0x00007fb7fd11b4cd in __GI___poll (fds=0x7fb7c61ff1b0, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29 #1 0x00007fb7fe8a84fb in (anonymous namespace)::dispatch_loop(const std::string &, std::shared_ptr, std::shared_ptr, const std::function &) (name="Mir/Input Reader", thread_register=std::shared_ptr (use count 4, weak count 0) = {...}, dispatcher=std::shared_ptr (use count 2, weak count 0) = {...}, exception_handler=...) at /home/tarek/code-projects/mir/src/common/dispatch/threaded_dispatcher.cpp:199 #2 0x00007fb7fe8b1bce in std::__invoke_impl, std::allocator > const&, std::shared_ptr, std::shared_ptr, std::function const&), std::__cxx11::basic_string, std::allocator >, std::shared_ptr, std::shared_ptr, std::function >(std::__invoke_other, void (*&&)(std::__cxx11::basic_string, std::allocator > const&, std::shared_ptr, std::shared_ptr, std::function const&), std::__cxx11::basic_string, std::allocator >&&, std::shared_ptr&&, std::shared_ptr&&, std::function&&) (__f=@0x599d2ca83b58: 0x7fb7fe8a83cd <(anonymous namespace)::dispatch_loop(const std::string &, std::shared_ptr, std::shared_ptr, const std::function &)>) at /usr/include/c++/13/bits/invoke.h:61 #3 0x00007fb7fe8b19f2 in std::__invoke, std::allocator > const&, std::shared_ptr, std::shared_ptr, std::function const&), std::__cxx11::basic_string, std::allocator >, std::shared_ptr, std::shared_ptr, std::function >(void (*&&)(std::__cxx11::basic_string, std::allocator > const&, std::shared_ptr, std::shared_ptr, std::function const&), std::__cxx11::basic_string, std::allocator >&&, std::shared_ptr&&, std::shared_ptr&&, std::function&&) (__fn=@0x599d2ca83b58: 0x7fb7fe8a83cd <(anonymous namespace)::dispatch_loop(const std::string &, std::shared_ptr, std::shared_ptr, const std::function &)>) at /usr/include/c++/13/bits/invoke.h:96 #4 0x00007fb7fe8b1853 in std::thread::_Invoker, std::allocator > const&, std::shared_ptr, std::shared_ptr, std::function const&), std::__cxx11::basic_string, std::allocator >, std::shared_ptr, std::shared_ptr, std::function > >::_M_invoke<0ul, 1ul, 2ul, 3ul, 4ul>(std::_Index_tuple<0ul, 1ul, 2ul, 3ul, 4ul>) (this=0x599d2ca83af8) at /usr/include/c++/13/bits/std_thread.h:292 #5 0x00007fb7fe8b1778 in std::thread::_Invoker, std::allocator > const&, std::shared_ptr, std::shared_ptr, std::function const&), std::__cxx11::basic_string, std::allocator >, std::shared_ptr, std::shared_ptr, std::function > >::operator()() (this=0x599d2ca83af8) at /usr/include/c++/13/bits/std_thread.h:299 #6 0x00007fb7fe8b1428 in std::thread::_State_impl, std::allocator > const&, std::shared_ptr, std::shared_ptr, std::function const&), std::__cxx11::basic_string, std::allocator >, std::shared_ptr, std::shared_ptr, std::function > > >::_M_run() (this=0x599d2ca83af0) at /usr/include/c++/13/bits/std_thread.h:244 #7 0x00007fb7fd4ecdb4 in ??? () at /lib/x86_64-linux-gnu/libstdc++.so.6 #8 0x00007fb7fd09ca94 in start_thread (arg=) at ./nptl/pthread_create.c:447 #9 0x00007fb7fd129c3c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78 Thread 19 (Thread 0x7fb7c58006c0 (LWP 11828)): #0 0x00007fb7fd12a042 in epoll_wait (epfd=47, events=0x7fb7c57ff080, maxevents=32, timeout=-1) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30 #1 0x00007fb7fdb973ab in wl_event_loop_dispatch () at /lib/x86_64-linux-gnu/libwayland-server.so.0 #2 0x00007fb7fdb97c45 in wl_display_run () at /lib/x86_64-linux-gnu/libwayland-server.so.0 #3 0x00007fb7fe32d4e3 in operator() (__closure=0x7fb778001368, d=0x599d2c8b0250) at /home/tarek/code-projects/mir/src/server/frontend_wayland/wayland_connector.cpp:419 #4 0x00007fb7fe32fb80 in std::__invoke_impl, wl_display*>(std::__invoke_other, struct {...} &&) (__f=...) at /usr/include/c++/13/bits/invoke.h:61 #5 0x00007fb7fe32fb25 in std::__invoke, wl_display*>(struct {...} &&) (__fn=...) at /usr/include/c++/13/bits/invoke.h:96 #6 0x00007fb7fe32fa95 in std::thread::_Invoker, wl_display*> >::_M_invoke<0, 1>(std::_Index_tuple<0, 1>) (this=0x7fb778001368) at /usr/include/c++/13/bits/std_thread.h:292 #7 0x00007fb7fe32fa4e in std::thread::_Invoker, wl_display*> >::operator()(void) (this=0x7fb778001368) at /usr/include/c++/13/bits/std_thread.h:299 #8 0x00007fb7fe32fa32 in std::thread::_State_impl, wl_display*> > >::_M_run(void) (this=0x7fb778001360) at /usr/include/c++/13/bits/std_thread.h:244 #9 0x00007fb7fd4ecdb4 in ??? () at /lib/x86_64-linux-gnu/libstdc++.so.6 #10 0x00007fb7fd09ca94 in start_thread (arg=) at ./nptl/pthread_create.c:447 #11 0x00007fb7fd129c3c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78 Thread 18 (Thread 0x7fb7fa8006c0 (LWP 11475)): #0 0x00007fb7fd11b4cd in __GI___poll (fds=0x599d2b566a60, nfds=2, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29 #1 0x00007fb7fd89066e in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 #2 0x00007fb7fd830a53 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 #3 0x00007fb7fd830aa9 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 #4 0x00007fb7fd85fc82 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 #5 0x00007fb7fd09ca94 in start_thread (arg=) at ./nptl/pthread_create.c:447 #6 0x00007fb7fd129c3c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78 Thread 17 (Thread 0x7fb7e52006c0 (LWP 11506)): #0 0x00007fb7fd098d61 in __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x599d2b85dfd8) at ./nptl/futex-internal.c:57 #1 __futex_abstimed_wait_common (cancel=true, private=0, abstime=0x0, clockid=0, expected=0, futex_word=0x599d2b85dfd8) at ./nptl/futex-internal.c:87 #2 __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x599d2b85dfd8, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at ./nptl/futex-internal.c:139 #3 0x00007fb7fd09b7dd in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x599d2b85df80, cond=0x599d2b85dfb0) at ./nptl/pthread_cond_wait.c:503 #4 ___pthread_cond_wait (cond=0x599d2b85dfb0, mutex=0x599d2b85df80) at ./nptl/pthread_cond_wait.c:627 #5 0x00007fb7d1f1d7cd in ??? () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so #6 0x00007fb7d1efcaab in ??? () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so #7 0x00007fb7d1f1d6fc in ??? () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so #8 0x00007fb7fd09ca94 in start_thread (arg=) at ./nptl/pthread_create.c:447 #9 0x00007fb7fd129c3c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78 Thread 16 (Thread 0x7fb7db8006c0 (LWP 11496)): #0 0x00007fb7fd098d61 in __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x599d2b5e8288) at ./nptl/futex-internal.c:57 #1 __futex_abstimed_wait_common (cancel=true, private=0, abstime=0x0, clockid=0, expected=0, futex_word=0x599d2b5e8288) at ./nptl/futex-internal.c:87 #2 __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x599d2b5e8288, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at ./nptl/futex-internal.c:139 #3 0x00007fb7fd09b7dd in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x599d2b5e8230, cond=0x599d2b5e8260) at ./nptl/pthread_cond_wait.c:503 #4 ___pthread_cond_wait (cond=0x599d2b5e8260, mutex=0x599d2b5e8230) at ./nptl/pthread_cond_wait.c:627 #5 0x00007fb7d1f1d7cd in ??? () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so #6 0x00007fb7d1efcaab in ??? () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so #7 0x00007fb7d1f1d6fc in ??? () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so #8 0x00007fb7fd09ca94 in start_thread (arg=) at ./nptl/pthread_create.c:447 #9 0x00007fb7fd129c3c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78 Thread 15 (Thread 0x7fb7baa006c0 (LWP 11525)): #0 syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38 #1 0x00007fb7fe8c4bdb in std::__detail::__platform_wait (__addr=0x7fb7fe901b80 , __val=405) at /usr/include/c++/13/bits/atomic_wait.h:113 #2 0x00007fb7fe8c4ab6 in std::__detail::__waiter_pool::_M_do_wait (this=0x7fb7fe901b40 , __addr=0x7fb7fe901b80 , __old=405) at /usr/include/c++/13/bits/atomic_wait.h:267 #3 0x00007fb7fe8c4f36 in std::__detail::__waiter >::_M_do_wait_v::wait(bool, std::memory_order) const::{lambda()#1}>(bool, std::__atomic_base::wait(bool, std::memory_order) const::{lambda()#1}) (this=0x7fb7ba9ff1b0, __old=false, __vfn=...) at /usr/include/c++/13/bits/atomic_wait.h:396 #4 0x00007fb7fe8c4e32 in std::__atomic_wait_address_v::wait(bool, std::memory_order) const::{lambda()#1}>(bool const*, bool, std::__atomic_base::wait(bool, std::memory_order) const::{lambda()#1}) (__addr=0x7fb79000e118, __old=false, __vfn=...) at /usr/include/c++/13/bits/atomic_wait.h:426 #5 0x00007fb7fe8c4b25 in std::__atomic_base::wait (__m=std::memory_order::seq_cst, __old=false, this=0x7fb79000e118) at /usr/include/c++/13/bits/atomic_base.h:613 #6 std::atomic::wait (this=0x7fb79000e118, __old=false, __m=std::memory_order::seq_cst) at /usr/include/c++/13/atomic:170 #7 0x00007fb7fe8c4920 in mir::Signal::wait (this=0x7fb79000e118) at /home/tarek/code-projects/mir/src/common/signal.cpp:32 #8 0x00007fb7fe8bab73 in (anonymous namespace)::Worker::work_loop (me=0x7fb79000e0f0, shutdown_channel=...) at /home/tarek/code-projects/mir/src/common/thread_pool_executor.cpp:119 #9 0x00007fb7fe8be6c5 in std::__invoke_impl*>&&), (anonymous namespace)::Worker*, std::promise*> > (__f=@0x7fb79000e1c8: 0x7fb7fe8baae1 <(anonymous namespace)::Worker::work_loop((anonymous namespace)::Worker*, std::promise*>&&)>) at /usr/include/c++/13/bits/invoke.h:61 #10 0x00007fb7fe8be63b in std::__invoke*>&&), (anonymous namespace)::Worker*, std::promise*> > (__fn=@0x7fb79000e1c8: 0x7fb7fe8baae1 <(anonymous namespace)::Worker::work_loop((anonymous namespace)::Worker*, std::promise*>&&)>) at /usr/include/c++/13/bits/invoke.h:96 #11 0x00007fb7fe8be553 in std::thread::_Invoker*>&&), (anonymous namespace)::Worker*, std::promise*> > >::_M_invoke<0, 1, 2> (this=0x7fb79000e1a8) at /usr/include/c++/13/bits/std_thread.h:292 #12 0x00007fb7fe8be4d6 in std::thread::_Invoker*>&&), (anonymous namespace)::Worker*, std::promise*> > >::operator() (this=0x7fb79000e1a8) at /usr/include/c++/13/bits/std_thread.h:299 #13 0x00007fb7fe8be4a0 in std::thread::_State_impl*>&&), (anonymous namespace)::Worker*, std::promise*> > > >::_M_run (this=0x7fb79000e1a0) at /usr/include/c++/13/bits/std_thread.h:244 #14 0x00007fb7fd4ecdb4 in ??? () at /lib/x86_64-linux-gnu/libstdc++.so.6 #15 0x00007fb7fd09ca94 in start_thread (arg=) at ./nptl/pthread_create.c:447 #16 0x00007fb7fd129c3c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78 Warning: the current language does not match this frame. Thread 14 (Thread 0x7fb7c7e006c0 (LWP 11516)): #0 futex_wait (private=0, expected=2, futex_word=0x599d2b579530) at ../sysdeps/nptl/futex-internal.h:146 #1 __GI___lll_lock_wait (futex=futex@entry=0x599d2b579530, private=0) at ./nptl/lowlevellock.c:49 #2 0x00007fb7fd0a00f1 in lll_mutex_lock_optimized (mutex=0x599d2b579530) at ./nptl/pthread_mutex_lock.c:48 #3 ___pthread_mutex_lock (mutex=0x599d2b579530) at ./nptl/pthread_mutex_lock.c:93 #4 0x00007fb7fb362a25 in ??? () at /lib/x86_64-linux-gnu/libnvidia-glsi.so.550.120 #5 0x00007fb7fb36e1ee in _nv004glsi () at /lib/x86_64-linux-gnu/libnvidia-glsi.so.550.120 #6 0x00007fb7f2bf2701 in ??? () at /lib/x86_64-linux-gnu/libnvidia-eglcore.so.550.120 #7 0x00007fb7f2cd880f in ??? () at /lib/x86_64-linux-gnu/libnvidia-eglcore.so.550.120 #8 0x00007fb7f2c8bad3 in ??? () at /lib/x86_64-linux-gnu/libnvidia-eglcore.so.550.120 #9 0x00007fb7f28bf67a in ??? () at /lib/x86_64-linux-gnu/libnvidia-eglcore.so.550.120 #10 0x00007fb7f28bfef2 in ??? () at /lib/x86_64-linux-gnu/libnvidia-eglcore.so.550.120 #11 0x00007fb7fc2a3bc9 in mir::graphics::common::CPUCopyOutputSurface::Impl::commit (this=0x7fb7a47ca950) at /home/tarek/code-projects/mir/src/platforms/common/server/cpu_copy_output_surface.cpp:301 #12 0x00007fb7fc2a2fcb in mir::graphics::common::CPUCopyOutputSurface::commit (this=0x7fb7a47de470) at /home/tarek/code-projects/mir/src/platforms/common/server/cpu_copy_output_surface.cpp:182 #13 0x00007fb7fe5685f8 in mir::renderer::gl::Renderer::render (this=0x7fb7a450cbb0, renderables=std::vector of length 2, capacity 2 = {...}) at /home/tarek/code-projects/mir/src/renderers/gl/renderer.cpp:369 #14 0x00007fb7fe297b0d in mir::compositor::DefaultDisplayBufferCompositor::composite (this=0x7fb7a4521f20, scene_elements=...) at /home/tarek/code-projects/mir/src/server/compositor/default_display_buffer_compositor.cpp:121 #15 0x00007fb7fe2a088d in mir::compositor::CompositingFunctor::operator() (this=0x599d2ca8a6f0) at /home/tarek/code-projects/mir/src/server/compositor/multi_threaded_compositor.cpp:153 #16 0x00007fb7fe2a690f in std::__invoke_impl (__f=...) at /usr/include/c++/13/bits/invoke.h:61 #17 0x00007fb7fe2a6781 in std::__invoke (__fn=...) at /usr/include/c++/13/bits/invoke.h:96 #18 0x00007fb7fe2a609e in std::reference_wrapper::operator()<>() const (this=0x599d2c916430) at /usr/include/c++/13/bits/refwrap.h:359 #19 0x00007fb7fe2a5568 in std::__invoke_impl&> (__f=...) at /usr/include/c++/13/bits/invoke.h:61 #20 0x00007fb7fe2a4766 in std::__invoke_r&> (__fn=...) at /usr/include/c++/13/bits/invoke.h:111 #21 0x00007fb7fe2a37fe in std::_Function_handler >::_M_invoke(std::_Any_data const&) (__functor=...) at /usr/include/c++/13/bits/std_function.h:290 #22 0x00007fb7fe8a47e0 in std::function::operator()() const (this=0x599d2c916430) at /usr/include/c++/13/bits/std_function.h:591 #23 0x00007fb7fe8bb00f in operator() (__closure=0x599d2c916410) at /home/tarek/code-projects/mir/src/common/thread_pool_executor.cpp:204 #24 0x00007fb7fe8bd67e in std::__invoke_impl&&)::&>(std::__invoke_other, struct {...} &) (__f=...) at /usr/include/c++/13/bits/invoke.h:61 #25 0x00007fb7fe8bcf1f in std::__invoke_r&&)::&>(struct {...} &) (__fn=...) at /usr/include/c++/13/bits/invoke.h:111 #26 0x00007fb7fe8bc59a in std::_Function_handler&&):: >::_M_invoke(const std::_Any_data &) (__functor=...) at /usr/include/c++/13/bits/std_function.h:290 #27 0x00007fb7fe8a47e0 in std::function::operator()() const (this=0x7fb7c7dff270) at /usr/include/c++/13/bits/std_function.h:591 #28 0x00007fb7fe8babb0 in (anonymous namespace)::Worker::work_loop (me=0x599d2b574f70, shutdown_channel=...) at /home/tarek/code-projects/mir/src/common/thread_pool_executor.cpp:122 #29 0x00007fb7fe8be6c5 in std::__invoke_impl*>&&), (anonymous namespace)::Worker*, std::promise*> > (__f=@0x599d2c96cab8: 0x7fb7fe8baae1 <(anonymous namespace)::Worker::work_loop((anonymous namespace)::Worker*, std::promise*>&&)>) at /usr/include/c++/13/bits/invoke.h:61 #30 0x00007fb7fe8be63b in std::__invoke*>&&), (anonymous namespace)::Worker*, std::promise*> > (__fn=@0x599d2c96cab8: 0x7fb7fe8baae1 <(anonymous namespace)::Worker::work_loop((anonymous namespace)::Worker*, std::promise*>&&)>) at /usr/include/c++/13/bits/invoke.h:96 #31 0x00007fb7fe8be553 in std::thread::_Invoker*>&&), (anonymous namespace)::Worker*, std::promise*> > >::_M_invoke<0, 1, 2> (this=0x599d2c96ca98) at /usr/include/c++/13/bits/std_thread.h:292 #32 0x00007fb7fe8be4d6 in std::thread::_Invoker*>&&), (anonymous namespace)::Worker*, std::promise*> > >::operator() (this=0x599d2c96ca98) at /usr/include/c++/13/bits/std_thread.h:299 #33 0x00007fb7fe8be4a0 in std::thread::_State_impl*>&&), (anonymous namespace)::Worker*, std::promise*> > > >::_M_run (this=0x599d2c96ca90) at /usr/include/c++/13/bits/std_thread.h:244 #34 0x00007fb7fd4ecdb4 in ??? () at /lib/x86_64-linux-gnu/libstdc++.so.6 #35 0x00007fb7fd09ca94 in start_thread (arg=) at ./nptl/pthread_create.c:447 #36 0x00007fb7fd129c3c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78 Thread 13 (Thread 0x7fb7e48006c0 (LWP 11507)): #0 0x00007fb7fd098d61 in __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x599d2baa7110) at ./nptl/futex-internal.c:57 #1 __futex_abstimed_wait_common (cancel=true, private=0, abstime=0x0, clockid=0, expected=0, futex_word=0x599d2baa7110) at ./nptl/futex-internal.c:87 #2 __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x599d2baa7110, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at ./nptl/futex-internal.c:139 #3 0x00007fb7fd09b7dd in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x599d2baa70b8, cond=0x599d2baa70e8) at ./nptl/pthread_cond_wait.c:503 #4 ___pthread_cond_wait (cond=0x599d2baa70e8, mutex=0x599d2baa70b8) at ./nptl/pthread_cond_wait.c:627 #5 0x00007fb7d1f1d7cd in ??? () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so #6 0x00007fb7d1efcaab in ??? () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so #7 0x00007fb7d1f1d6fc in ??? () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so #8 0x00007fb7fd09ca94 in start_thread (arg=) at ./nptl/pthread_create.c:447 #9 0x00007fb7fd129c3c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78 Thread 12 (Thread 0x7fb7e3e006c0 (LWP 11508)): #0 0x00007fb7fd098d61 in __futex_abstimed_wait_common64 (private=32695, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x599d2b6a53b4) at ./nptl/futex-internal.c:57 #1 __futex_abstimed_wait_common (cancel=true, private=32695, abstime=0x0, clockid=0, expected=0, futex_word=0x599d2b6a53b4) at ./nptl/futex-internal.c:87 #2 __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x599d2b6a53b4, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at ./nptl/futex-internal.c:139 #3 0x00007fb7fd09b7dd in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x599d2b6a5360, cond=0x599d2b6a5388) at ./nptl/pthread_cond_wait.c:503 #4 ___pthread_cond_wait (cond=0x599d2b6a5388, mutex=0x599d2b6a5360) at ./nptl/pthread_cond_wait.c:627 #5 0x00007fb7fdd9e072 in mir::graphics::common::EGLContextExecutor::process_loop (me=0x599d2b6a5350) at /home/tarek/code-projects/mir/src/platform/graphics/egl_context_executor.cpp:62 #6 0x00007fb7fdd9fd16 in std::__invoke_impl (__f=@0x599d2b8037f0: 0x7fb7fdd9df80 ) at /usr/include/c++/13/bits/invoke.h:61 #7 0x00007fb7fdd9fc89 in std::__invoke (__fn=@0x599d2b8037f0: 0x7fb7fdd9df80 ) at /usr/include/c++/13/bits/invoke.h:96 #8 0x00007fb7fdd9fbe9 in std::thread::_Invoker >::_M_invoke<0ul, 1ul> (this=0x599d2b8037e8) at /usr/include/c++/13/bits/std_thread.h:292 #9 0x00007fb7fdd9fb9e in std::thread::_Invoker >::operator() (this=0x599d2b8037e8) at /usr/include/c++/13/bits/std_thread.h:299 #10 0x00007fb7fdd9fb7e in std::thread::_State_impl > >::_M_run (this=0x599d2b8037e0) at /usr/include/c++/13/bits/std_thread.h:244 #11 0x00007fb7fd4ecdb4 in ??? () at /lib/x86_64-linux-gnu/libstdc++.so.6 #12 0x00007fb7fd09ca94 in start_thread (arg=) at ./nptl/pthread_create.c:447 #13 0x00007fb7fd129c3c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78 Thread 11 (Thread 0x7fb7bbe006c0 (LWP 11523)): #0 0x00007fb7fd11b4cd in __GI___poll (fds=0x7fb7bbdff140, nfds=2, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29 #1 0x0000599d29d7a136 in DecorationProvider::operator() (this=0x599d2bd21d40, display=0x7fb784000b70) at /home/tarek/code-projects/mir/examples/example-server-lib/decoration_provider.cpp:418 #2 0x0000599d29d72bde in miral::InternalClientLauncher::launch(DecorationProvider&) const::{lambda(wl_display*)#1}::operator()(wl_display*) const (__closure=0x599d2b5f0f48, display=0x7fb784000b70) at /home/tarek/code-projects/mir/include/miral/miral/internal_client.h:73 #3 0x0000599d29d76e0a in std::__invoke_impl(DecorationProvider&) const::{lambda(wl_display*)#1}&, wl_display*>(std::__invoke_other, miral::InternalClientLauncher::launch(DecorationProvider&) const::{lambda(wl_display*)#1}&, wl_display*&&) (__f=...) at /usr/include/c++/13/bits/invoke.h:61 #4 0x0000599d29d75eb5 in std::__invoke_r(DecorationProvider&) const::{lambda(wl_display*)#1}&, wl_display*>(miral::InternalClientLauncher::launch(DecorationProvider&) const::{lambda(wl_display*)#1}&, wl_display*&&) (__fn=...) at /usr/include/c++/13/bits/invoke.h:111 #5 0x0000599d29d74880 in std::_Function_handler(DecorationProvider&) const::{lambda(wl_display*)#1}>::_M_invoke(std::_Any_data const&, wl_display*&&) (__functor=..., __args#0=@0x7fb7bbdff250: 0x7fb784000b70) at /usr/include/c++/13/bits/std_function.h:290 #6 0x00007fb7fea73ba5 in std::function::operator()(wl_display*) const (this=0x599d2b5f0f48, __args#0=0x7fb784000b70) at /usr/include/c++/13/bits/std_function.h:591 #7 0x00007fb7fea730a9 in WlInternalClientRunner::run(mir::Server&)::{lambda()#1}::operator()() const (__closure=0x7fb7e80044b8) at /home/tarek/code-projects/mir/src/miral/internal_client.cpp:128 #8 0x00007fb7fea7537e in std::__invoke_impl::run(mir::Server&)::{lambda()#1}>(std::__invoke_other, WlInternalClientRunner::run(mir::Server&)::{lambda()#1}&&) (__f=...) at /usr/include/c++/13/bits/invoke.h:61 #9 0x00007fb7fea752f4 in std::__invoke::run(mir::Server&)::{lambda()#1}>(WlInternalClientRunner::run(mir::Server&)::{lambda()#1}&&) (__fn=...) at /usr/include/c++/13/bits/invoke.h:96 #10 0x00007fb7fea75236 in std::thread::_Invoker::run(mir::Server&)::{lambda()#1}> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) (this=0x7fb7e80044b8) at /usr/include/c++/13/bits/std_thread.h:292 #11 0x00007fb7fea751d6 in std::thread::_Invoker::run(mir::Server&)::{lambda()#1}> >::operator()() (this=0x7fb7e80044b8) at /usr/include/c++/13/bits/std_thread.h:299 #12 0x00007fb7fea75196 in std::thread::_State_impl::run(mir::Server&)::{lambda()#1}> > >::_M_run() (this=0x7fb7e80044b0) at /usr/include/c++/13/bits/std_thread.h:244 #13 0x00007fb7fd4ecdb4 in ??? () at /lib/x86_64-linux-gnu/libstdc++.so.6 #14 0x00007fb7fd09ca94 in start_thread (arg=) at ./nptl/pthread_create.c:447 #15 0x00007fb7fd129c3c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78 Thread 10 (Thread 0x7fb7d0c006c0 (LWP 11512)): #0 0x00007fb7fd098d61 in __futex_abstimed_wait_common64 (private=32695, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x599d2b676960) at ./nptl/futex-internal.c:57 #1 __futex_abstimed_wait_common (cancel=true, private=32695, abstime=0x0, clockid=0, expected=0, futex_word=0x599d2b676960) at ./nptl/futex-internal.c:87 #2 __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x599d2b676960, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at ./nptl/futex-internal.c:139 #3 0x00007fb7fd09b7dd in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x599d2b676910, cond=0x599d2b676938) at ./nptl/pthread_cond_wait.c:503 #4 ___pthread_cond_wait (cond=0x599d2b676938, mutex=0x599d2b676910) at ./nptl/pthread_cond_wait.c:627 #5 0x00007fb7fdd9e072 in mir::graphics::common::EGLContextExecutor::process_loop (me=0x599d2b676900) at /home/tarek/code-projects/mir/src/platform/graphics/egl_context_executor.cpp:62 #6 0x00007fb7fdd9fd16 in std::__invoke_impl (__f=@0x599d2bebe370: 0x7fb7fdd9df80 ) at /usr/include/c++/13/bits/invoke.h:61 #7 0x00007fb7fdd9fc89 in std::__invoke (__fn=@0x599d2bebe370: 0x7fb7fdd9df80 ) at /usr/include/c++/13/bits/invoke.h:96 #8 0x00007fb7fdd9fbe9 in std::thread::_Invoker >::_M_invoke<0ul, 1ul> (this=0x599d2bebe368) at /usr/include/c++/13/bits/std_thread.h:292 #9 0x00007fb7fdd9fb9e in std::thread::_Invoker >::operator() (this=0x599d2bebe368) at /usr/include/c++/13/bits/std_thread.h:299 #10 0x00007fb7fdd9fb7e in std::thread::_State_impl > >::_M_run (this=0x599d2bebe360) at /usr/include/c++/13/bits/std_thread.h:244 #11 0x00007fb7fd4ecdb4 in ??? () at /lib/x86_64-linux-gnu/libstdc++.so.6 #12 0x00007fb7fd09ca94 in start_thread (arg=) at ./nptl/pthread_create.c:447 #13 0x00007fb7fd129c3c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78 Thread 9 (Thread 0x7fb7d90006c0 (LWP 11509)): #0 0x00007fb7fd098d61 in __futex_abstimed_wait_common64 (private=32695, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x599d2bd21190) at ./nptl/futex-internal.c:57 #1 __futex_abstimed_wait_common (cancel=true, private=32695, abstime=0x0, clockid=0, expected=0, futex_word=0x599d2bd21190) at ./nptl/futex-internal.c:87 #2 __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x599d2bd21190, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at ./nptl/futex-internal.c:139 #3 0x00007fb7fd09b7dd in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x599d2bd21140, cond=0x599d2bd21168) at ./nptl/pthread_cond_wait.c:503 #4 ___pthread_cond_wait (cond=0x599d2bd21168, mutex=0x599d2bd21140) at ./nptl/pthread_cond_wait.c:627 #5 0x00007fb7fc2c7019 in std::condition_variable::wait >(std::unique_lock &, struct {...}) (this=0x599d2bd21168, __lock=..., __p=...) at /usr/include/c++/13/condition_variable:105 #6 0x00007fb7fc2c683a in mir::graphics::kms::ThreadedDRMEventHandler::event_loop (this=0x599d2bd21120) at /home/tarek/code-projects/mir/src/platforms/common/server/kms-utils/threaded_drm_event_handler.cpp:181 #7 0x00007fb7fc2c6097 in operator() (__closure=0x599d2bd1eb08) at /home/tarek/code-projects/mir/src/platforms/common/server/kms-utils/threaded_drm_event_handler.cpp:88 #8 0x00007fb7fc2c75dc in std::__invoke_impl >(std::__invoke_other, struct {...} &&) (__f=...) at /usr/include/c++/13/bits/invoke.h:61 #9 0x00007fb7fc2c759f in std::__invoke >(struct {...} &&) (__fn=...) at /usr/include/c++/13/bits/invoke.h:96 #10 0x00007fb7fc2c754c in std::thread::_Invoker > >::_M_invoke<0>(std::_Index_tuple<0>) (this=0x599d2bd1eb08) at /usr/include/c++/13/bits/std_thread.h:292 #11 0x00007fb7fc2c7520 in std::thread::_Invoker > >::operator()(void) (this=0x599d2bd1eb08) at /usr/include/c++/13/bits/std_thread.h:299 #12 0x00007fb7fc2c7504 in std::thread::_State_impl > > >::_M_run(void) (this=0x599d2bd1eb00) at /usr/include/c++/13/bits/std_thread.h:244 #13 0x00007fb7fd4ecdb4 in ??? () at /lib/x86_64-linux-gnu/libstdc++.so.6 #14 0x00007fb7fd09ca94 in start_thread (arg=) at ./nptl/pthread_create.c:447 #15 0x00007fb7fd129c3c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78 Thread 8 (Thread 0x7fb7dae006c0 (LWP 11497)): #0 0x00007fb7fd098d61 in __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x599d2b7efbe0) at ./nptl/futex-internal.c:57 #1 __futex_abstimed_wait_common (cancel=true, private=0, abstime=0x0, clockid=0, expected=0, futex_word=0x599d2b7efbe0) at ./nptl/futex-internal.c:87 #2 __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x599d2b7efbe0, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at ./nptl/futex-internal.c:139 #3 0x00007fb7fd09b7dd in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x599d2b7efb88, cond=0x599d2b7efbb8) at ./nptl/pthread_cond_wait.c:503 #4 ___pthread_cond_wait (cond=0x599d2b7efbb8, mutex=0x599d2b7efb88) at ./nptl/pthread_cond_wait.c:627 #5 0x00007fb7d1f1d7cd in ??? () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so #6 0x00007fb7d1efcaab in ??? () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so #7 0x00007fb7d1f1d6fc in ??? () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so #8 0x00007fb7fd09ca94 in start_thread (arg=) at ./nptl/pthread_create.c:447 #9 0x00007fb7fd129c3c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78 Thread 7 (Thread 0x7fb7da4006c0 (LWP 11504)): #0 0x00007fb7fd098d61 in __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x599d2b84e128) at ./nptl/futex-internal.c:57 #1 __futex_abstimed_wait_common (cancel=true, private=0, abstime=0x0, clockid=0, expected=0, futex_word=0x599d2b84e128) at ./nptl/futex-internal.c:87 #2 __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x599d2b84e128, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at ./nptl/futex-internal.c:139 #3 0x00007fb7fd09b7dd in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x599d2b84e0d0, cond=0x599d2b84e100) at ./nptl/pthread_cond_wait.c:503 #4 ___pthread_cond_wait (cond=0x599d2b84e100, mutex=0x599d2b84e0d0) at ./nptl/pthread_cond_wait.c:627 #5 0x00007fb7d1f1d7cd in ??? () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so #6 0x00007fb7d1efcaab in ??? () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so #7 0x00007fb7d1f1d6fc in ??? () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so #8 0x00007fb7fd09ca94 in start_thread (arg=) at ./nptl/pthread_create.c:447 #9 0x00007fb7fd129c3c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78 Thread 6 (Thread 0x7fb7f9e006c0 (LWP 11476)): #0 0x00007fb7fd11b4cd in __GI___poll (fds=0x7fb7e8000b90, nfds=3, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29 #1 0x00007fb7fd89066e in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 #2 0x00007fb7fd831f77 in g_main_loop_run () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 #3 0x00007fb7fdf4a422 in ??? () at /lib/x86_64-linux-gnu/libgio-2.0.so.0 #4 0x00007fb7fd85fc82 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 #5 0x00007fb7fd09ca94 in start_thread (arg=) at ./nptl/pthread_create.c:447 #6 0x00007fb7fd129c3c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78 Thread 5 (Thread 0x7fb7fc2006c0 (LWP 11473)): #0 syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38 #1 0x00007fb7fda4d2fe in ??? () at /lib/x86_64-linux-gnu/liblttng-ust.so.1 #2 0x00007fb7fd09ca94 in start_thread (arg=) at ./nptl/pthread_create.c:447 #3 0x00007fb7fd129c3c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78 Thread 4 (Thread 0x7fb7fcc006c0 (LWP 11472)): #0 syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38 #1 0x00007fb7fda4d2fe in ??? () at /lib/x86_64-linux-gnu/liblttng-ust.so.1 #2 0x00007fb7fd09ca94 in start_thread (arg=) at ./nptl/pthread_create.c:447 #3 0x00007fb7fd129c3c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78 Thread 3 (Thread 0x7fb7d9a006c0 (LWP 11505)): #0 0x00007fb7fd098d61 in __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x599d2b880bc0) at ./nptl/futex-internal.c:57 #1 __futex_abstimed_wait_common (cancel=true, private=0, abstime=0x0, clockid=0, expected=0, futex_word=0x599d2b880bc0) at ./nptl/futex-internal.c:87 #2 __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x599d2b880bc0, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at ./nptl/futex-internal.c:139 #3 0x00007fb7fd09b7dd in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x599d2b880b68, cond=0x599d2b880b98) at ./nptl/pthread_cond_wait.c:503 #4 ___pthread_cond_wait (cond=0x599d2b880b98, mutex=0x599d2b880b68) at ./nptl/pthread_cond_wait.c:627 #5 0x00007fb7d1f1d7cd in ??? () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so #6 0x00007fb7d1efcaab in ??? () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so #7 0x00007fb7d1f1d6fc in ??? () at /usr/lib/x86_64-linux-gnu/dri/iris_dri.so #8 0x00007fb7fd09ca94 in start_thread (arg=) at ./nptl/pthread_create.c:447 #9 0x00007fb7fd129c3c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78 Thread 2 (Thread 0x7fb7fb2006c0 (LWP 11474)): #0 syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38 #1 0x00007fb7fd88a40d in g_cond_wait () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 #2 0x00007fb7fd7fb52b in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 #3 0x00007fb7fd863043 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 #4 0x00007fb7fd85fc82 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 #5 0x00007fb7fd09ca94 in start_thread (arg=) at ./nptl/pthread_create.c:447 #6 0x00007fb7fd129c3c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78 Thread 1 (Thread 0x7fb7fccac240 (LWP 11470)): #0 syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38 #1 0x00007fb7fd4e744b in std::__atomic_futex_unsigned_base::_M_futex_wait_until_steady(unsigned int*, unsigned int, bool, std::chrono::duration >, std::chrono::duration >) () at /lib/x86_64-linux-gnu/libstdc++.so.6 #2 0x00007fb7fe2a6589 in std::__atomic_futex_unsigned<2147483648u>::_M_load_and_test_until_steady (this=0x7fb7901cb300, __assumed=0, __operand=1, __equal=true, __mo=std::memory_order::acquire, __has_timeout=true, __s=std::chrono::duration = { 1062s }, __ns=std::chrono::duration = { 821900792ns }) at /usr/include/c++/13/bits/atomic_futex.h:139 #3 0x00007fb7fe2a5dae in std::__atomic_futex_unsigned<2147483648u>::_M_load_and_test_until_impl > > (this=0x7fb7901cb300, __assumed=0, __operand=1, __equal=true, __mo=std::memory_order::acquire, __atime=std::chrono::_V2::steady_clock time_point = { 1062821900792ns }) at /usr/include/c++/13/bits/atomic_futex.h:189 #4 0x00007fb7fe2a3263 in std::__atomic_futex_unsigned<2147483648u>::_M_load_when_equal_until > > (__atime=, __mo=std::memory_order::acquire, __val=1, this=0x7fb7901cb300) at /usr/include/c++/13/bits/atomic_futex.h:269 #5 std::__atomic_futex_unsigned<2147483648u>::_M_load_when_equal_for > (__rtime=std::chrono::duration = { 10s }, __mo=std::memory_order::acquire, __val=1, this=0x7fb7901cb300) at /usr/include/c++/13/bits/atomic_futex.h:222 #6 std::__future_base::_State_baseV2::wait_for > (this=0x7fb7901cb2f0, __rel=std::chrono::duration = { 10s }) at /usr/include/c++/13/future:371 #7 0x00007fb7fe2a1bb4 in std::__basic_future::wait_for > (this=0x599d2ca8a788, __rel=std::chrono::duration = { 10s }) at /usr/include/c++/13/future:724 #8 0x00007fb7fe2a0e8b in mir::compositor::CompositingFunctor::wait_until_stopped (this=0x599d2ca8a6f0) at /home/tarek/code-projects/mir/src/server/compositor/multi_threaded_compositor.cpp:218 #9 0x00007fb7fe29e09b in mir::compositor::MultiThreadedCompositor::destroy_compositing_threads (this=0x599d2c55a800) at /home/tarek/code-projects/mir/src/server/compositor/multi_threaded_compositor.cpp:380 #10 0x00007fb7fe29db77 in mir::compositor::MultiThreadedCompositor::stop (this=0x599d2c55a800) at /home/tarek/code-projects/mir/src/server/compositor/multi_threaded_compositor.cpp:333 #11 0x00007fb7fe230e18 in operator() (__closure=0x7ffc38d79a20) at /home/tarek/code-projects/mir/src/server/scene/mediating_display_changer.cpp:455 #12 0x00007fb7fe236f3a in std::__invoke_impl&)::&>(std::__invoke_other, struct {...} &) (__f=...) at /usr/include/c++/13/bits/invoke.h:61 #13 0x00007fb7fe2356e4 in std::__invoke_r&)::&>(struct {...} &) (__fn=...) at /usr/include/c++/13/bits/invoke.h:111 #14 0x00007fb7fe233a09 in std::_Function_handler&):: >::_M_invoke(const std::_Any_data &) (__functor=...) at /usr/include/c++/13/bits/std_function.h:290 #15 0x00007fb7fe0b6ade in std::function::operator()() const (this=0x7ffc38d79a20) at /usr/include/c++/13/bits/std_function.h:591 #16 0x00007fb7fe22e9b8 in (anonymous namespace)::ApplyNowAndRevertOnScopeExit::ApplyNowAndRevertOnScopeExit(const std::function &, const std::function &) (this=0x7ffc38d79a00, apply=..., revert=...) at /home/tarek/code-projects/mir/src/server/scene/mediating_display_changer.cpp:92 #17 0x00007fb7fe231097 in mir::scene::MediatingDisplayChanger::apply_config (this=0x599d2b5e4420, conf=std::shared_ptr (use count 2, weak count 0) = {...}) at /home/tarek/code-projects/mir/src/server/scene/mediating_display_changer.cpp:456 #18 0x00007fb7fe2315e6 in mir::scene::MediatingDisplayChanger::apply_base_config (this=0x599d2b5e4420) at /home/tarek/code-projects/mir/src/server/scene/mediating_display_changer.cpp:498 #19 0x00007fb7fe230330 in operator() (__closure=0x599d2c9350d8) at /home/tarek/code-projects/mir/src/server/scene/mediating_display_changer.cpp:337 #20 0x00007fb7fe2365fc in std::__invoke_impl&)::&>(std::__invoke_other, struct {...} &) (__f=...) at /usr/include/c++/13/bits/invoke.h:61 #21 0x00007fb7fe2349cc in std::__invoke_r&)::&>(struct {...} &) (__fn=...) at /usr/include/c++/13/bits/invoke.h:111 #22 0x00007fb7fe233293 in std::_Function_handler&):: >::_M_invoke(const std::_Any_data &) (__functor=...) at /usr/include/c++/13/bits/std_function.h:290 #23 0x00007fb7fe0b6ade in std::function::operator()() const (this=0x599d2c9350d8) at /usr/include/c++/13/bits/std_function.h:591 #24 0x00007fb7fe0cc93a in operator() (__closure=0x599d2c9350d0) at /home/tarek/code-projects/mir/src/server/glib_main_loop.cpp:251 #25 0x00007fb7fe0d1a36 in std::__invoke_impl&>(std::__invoke_other, struct {...} &) (__f=...) at /usr/include/c++/13/bits/invoke.h:61 #26 0x00007fb7fe0d061c in std::__invoke_r&>(struct {...} &) (__fn=...) at /usr/include/c++/13/bits/invoke.h:111 #27 0x00007fb7fe0cf0af in std::_Function_handler >::_M_invoke(const std::_Any_data &) (__functor=...) at /usr/include/c++/13/bits/std_function.h:290 #28 0x00007fb7fe0b6ade in std::function::operator()() const (this=0x599d2c8c6cc8) at /usr/include/c++/13/bits/std_function.h:591 #29 0x00007fb7fe0db042 in ServerActionGSource::dispatch (source=0x599d2c8c6c60) at /home/tarek/code-projects/mir/src/server/glib_main_loop_sources.cpp:222 #30 0x00007fb7fd8315b5 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 #31 0x00007fb7fd890717 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 #32 0x00007fb7fd830a53 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 #33 0x00007fb7fe0cbba5 in mir::GLibMainLoop::run (this=0x599d2b556770) at /home/tarek/code-projects/mir/src/server/glib_main_loop.cpp:142 #34 0x00007fb7fe0b40e6 in mir::DisplayServer::run (this=0x7ffc38d79eb0) at /home/tarek/code-projects/mir/src/server/display_server.cpp:241 #35 0x00007fb7fe0aba01 in mir::run_mir(mir::ServerConfiguration&, std::function, std::function const&) (config=..., init=..., terminator_=...) at /home/tarek/code-projects/mir/src/server/run_mir.cpp:220 #36 0x00007fb7fe0e9160 in mir::Server::run (this=0x599d2b52da80) at /home/tarek/code-projects/mir/src/server/server.cpp:410 #37 0x00007fb7fea771d6 in miral::MirRunner::Self::run_with(std::initializer_list >) (this=0x599d2b52bef0, options=std::initializer_list of length 14 = {...}) at /home/tarek/code-projects/mir/src/miral/runner.cpp:183 #38 0x00007fb7fea77a11 in miral::MirRunner::run_with(std::initializer_list >) (this=0x7ffc38d7a0f0, options=std::initializer_list of length 14 = {...}) at /home/tarek/code-projects/mir/src/miral/runner.cpp:254 #39 0x0000599d29d565f2 in main (argc=1, argv=0x7ffc38d7a738) at /home/tarek/code-projects/mir/examples/miral-shell/shell_main.cpp:136 ```
tarek-y-ismail commented 4 days ago

@RAOF Can you check out the stack trace and see if there are any suspicious threads/codepaths?

tarek-y-ismail commented 3 days ago

Combing through more stack traces, I accidentally stumbled upon the destructor of EGLStreamTextureConsumer, which is called during the destruction of WlSurface (which is what triggers this bug). Commenting out eglDestroyStreamKHR seems to resolve this bug.

Now, leaking resources is obviously not the solution. So I'll try looking around for a bit to see if I can get things to work on my own.

tarek-y-ismail commented 3 days ago

The stream is created using eglCreateStreamAttribNV and destroyed by calling eglDestroyStreamKHR (sus?). Trying eglCreateStreamKHR and friends completely breaks window creation (predictably). @RAOF any hints for this?

tarek-y-ismail commented 12 hours ago

Maybe delegate eglDestroyStreamKHR and glDeleteTextures to an common::EGLContextExecutor (egl_delegate)

Edit: Didn't work. Still haven't checked out whether it breaks in the same places or not.

diff --git a/src/platforms/eglstream-kms/server/buffer_allocator.cpp b/src/platforms/eglstream-kms/server/buffer_allocator.cpp
index 919dfe4ae5..7188dfbc5f 100644
--- a/src/platforms/eglstream-kms/server/buffer_allocator.cpp
+++ b/src/platforms/eglstream-kms/server/buffer_allocator.cpp
@@ -106,11 +106,12 @@ GLuint gen_texture_handle()

 struct EGLStreamTextureConsumer
 {
-    EGLStreamTextureConsumer(std::shared_ptr<mir::renderer::gl::Context> ctx, EGLStreamKHR&& stream)
+    EGLStreamTextureConsumer(std::shared_ptr<mir::renderer::gl::Context> ctx, EGLStreamKHR&& stream, std::shared_ptr<mgc::EGLContextExecutor> egl_delegate)
         : dpy{eglGetCurrentDisplay()},
           stream{std::move(stream)},
           texture{gen_texture_handle()},
-          ctx{std::move(ctx)}
+          ctx{std::move(ctx)},
+          egl_delegate{egl_delegate}
     {
         glActiveTexture(GL_TEXTURE0);
         glBindTexture(GL_TEXTURE_EXTERNAL_OES, texture);
@@ -129,23 +130,19 @@ struct EGLStreamTextureConsumer

     ~EGLStreamTextureConsumer()
     {
-        bool const need_context = eglGetCurrentContext() == EGL_NO_CONTEXT;
-        if (need_context)
-        {
-            ctx->make_current();
-        }
-        /* eglDestroyStreamKHR(dpy, stream); */
-        glDeleteTextures(1, &texture);
-        if (need_context)
-        {
-            ctx->release_current();
-        }
+        egl_delegate->spawn(
+            [dpy = this->dpy, stream = std::move(this->stream), texture = texture]
+            {
+                eglDestroyStreamKHR(dpy, stream);
+                glDeleteTextures(1, &texture);
+            });
     }

     EGLDisplay const dpy;
     EGLStreamKHR const stream;
     GLuint const texture;
     std::shared_ptr<mir::renderer::gl::Context> const ctx;
+    std::shared_ptr<mgc::EGLContextExecutor> egl_delegate;
 };

 struct Sync
@@ -174,7 +171,7 @@ struct Sync

 struct BoundEGLStream
 {
-    static void associate_stream(wl_resource* buffer, std::shared_ptr<mir::renderer::gl::Context> ctx, EGLStreamKHR stream)
+    static void associate_stream(wl_resource* buffer, std::shared_ptr<mir::renderer::gl::Context> ctx, EGLStreamKHR stream, std::shared_ptr<mgc::EGLContextExecutor> egl_delegate)
     {
         BoundEGLStream* me;
         if (auto notifier = wl_resource_get_destroy_listener(buffer, &on_buffer_destroyed))
@@ -192,7 +189,7 @@ struct BoundEGLStream
             wl_resource_add_destroy_listener(buffer, &me->destruction_listener);
         }

-        me->producer = std::make_shared<EGLStreamTextureConsumer>(std::move(ctx), std::move(stream));
+        me->producer = std::make_shared<EGLStreamTextureConsumer>(std::move(ctx), std::move(stream), egl_delegate);
     }

     class TextureHandle
@@ -308,7 +305,7 @@ try
         BOOST_THROW_EXCEPTION((mg::egl_error("Failed to create EGLStream from Wayland buffer")));
     }

-    BoundEGLStream::associate_stream(buffer, allocator->wayland_ctx, stream);
+    BoundEGLStream::associate_stream(buffer, allocator->wayland_ctx, stream, allocator->egl_delegate);

     allocator->wayland_ctx->release_current();
 }
tarek-y-ismail commented 11 hours ago

The workaround of leaking resources "works", but also crashes/freezes (refuses to open any new windows) once VRAM is full.