Mir

Mir-on-Mir deadlocks

Bug #1700126 reported by Alan Griffiths
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mir
Fix Released
High
Alan Griffiths

Bug Description

Running lp:mir on Zesty: lockup in miral-shell.

1. Use mir_demo_shell as a host:
   $ sudo mir_demo_server --arw-file --vt 4 --window-manager system-compositor

2. Run miral-shell as a guest:
   $ miral-app --host /tmp/mir_socket

3. Start egltriangle & eglplasma and start switching, resizing, maximizing etc. After a while it seems the "RPC thread" starts making blocking calls to the client API.

(gdb) info threads
  Id Target Id Frame
* 1 Thread 0x7f1811eafc80 (LWP 4525) "miral-shell" 0x00007f181036e18d in poll () at ../sysdeps/unix/syscall-template.S:84
  2 Thread 0x7f180a305700 (LWP 4526) "RPC Thread" pthread_cond_wait@@GLIBC_2.3.2 ()
    at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
  3 Thread 0x7f1803fff700 (LWP 4532) "Mir/Snapshot" pthread_cond_wait@@GLIBC_2.3.2 ()
    at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
  4 Thread 0x7f18037fe700 (LWP 4533) "Mir/Comp" pthread_cond_wait@@GLIBC_2.3.2 ()
    at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
  5 Thread 0x7f1802ffd700 (LWP 4534) "Mir/Input Reade" 0x00007f181036e18d in poll () at ../sysdeps/unix/syscall-template.S:84
  6 Thread 0x7f18027fc700 (LWP 4535) "Mir/IPC" pthread_cond_wait@@GLIBC_2.3.2 ()
    at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
  7 Thread 0x7f1801ffb700 (LWP 4536) "Mir/IPC" pthread_cond_wait@@GLIBC_2.3.2 ()
    at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
  8 Thread 0x7f18017fa700 (LWP 4537) "RPC Thread" 0x00007f181036e18d in poll () at ../sysdeps/unix/syscall-template.S:84
  9 Thread 0x7f1800ff9700 (LWP 4538) "miral-shell" pthread_cond_wait@@GLIBC_2.3.2 ()
    at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
(gdb) t 2
[Switching to thread 2 (Thread 0x7f180a305700 (LWP 4526))]
#0 pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
185 ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: No such file or directory.
(gdb) bt
#0 0x00007f180f842510 in pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1 0x00007f181090580c in std::condition_variable::wait(std::unique_lock<std::mutex>&) () at /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#2 0x00007f1810e3c18b in wait () at /usr/include/c++/6/condition_variable:99
#3 0x00007f1810e3c18b in wait_for_result (this=0x7f180a303e00) at ./src/client/mir_render_surface_api.cpp:43
#4 0x00007f1810e3c18b in mir_connection_create_render_surface_sync (connection=<optimised out>, width=<optimised out>, height=<optimised out>) at ./src/client/mir_render_surface_api.cpp:126
#5 0x00007f180ffc4f67 in set_cursor_image (image=..., this=0x55c1dbfb8540)
    at ./src/server/graphics/nested/mir_client_host_connection.cpp:177
#6 0x00007f180ffc4f67 in set_cursor_image (this=0x55c1dbd70940, image=...)
    at ./src/server/graphics/nested/mir_client_host_connection.cpp:491
#7 0x00007f180ffcc076 in mir::input::CursorController::update_cursor_image_locked(std::unique_lock<std::mutex>&) [clone .constprop.589] (this=this@entry=0x55c1dbe82f10, lock=...) at ./src/server/input/cursor_controller.cpp:248
#8 0x00007f180ff2487c in update_cursor_image (this=0x55c1dbe82f10) at ./src/server/input/cursor_controller.cpp:259
#9 0x00007f180ff3c1c3 in std::function<void (std::shared_ptr<mir::scene::SurfaceObserver> const&)>::operator()(std::shared_ptr<mir::scene::SurfaceObserver> const&) const () at /usr/include/c++/6/functional:2127
#10 0x00007f180ff3c1c3 in for_each (this=<optimised out>, f=...) at ./src/include/common/mir/thread_safe_list.h:81
#11 0x00007f180ff3cf11 in mir::scene::SurfaceObservers::moved_to(mir::geometry::Point const&) (this=<optimised out>, top_left=...)
    at ./src/server/scene/basic_surface.cpp:65
#12 0x00007f1811aaf378 in miral::Window::move_to(mir::geometry::Point) (this=<optimised out>, top_left=...) at ./miral/window.cpp:74
#13 0x00007f1811abe071 in miral::BasicWindowManager::move_tree(miral::WindowInfo&, mir::geometry::Displacement) (this=this@entry=0x55c1dbfdf540, root=..., movement=...) at ./miral/basic_window_manager.cpp:807
#14 0x00007f1811abb507 in miral::BasicWindowManager::place_and_size(miral::WindowInfo&, mir::geometry::Point const&, mir::geometry::Size const&) (this=this@entry=0x55c1dbfdf540, root=..., new_pos=..., new_size=...) at ./miral/basic_window_manager.cpp:999
#15 0x00007f1811abe831 in miral::BasicWindowManager::modify_window(miral::WindowInfo&, miral::WindowSpecification const&) (this=0x55c1dbfdf540, window_info=..., modifications=...) at ./miral/basic_window_manager.cpp:933

Tags: nested

Related branches

tags: added: nested
Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :

Fix committed into lp:mir at revision None, scheduled for release in mir, milestone 0.27.0

Changed in mir:
status: In Progress → Fix Committed
Changed in mir:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.