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

Crash when cursor rapidly changes #1347

Closed
wmww opened this issue Mar 5, 2020 · 1 comment · Fixed by #1348
Closed

Crash when cursor rapidly changes #1347

wmww opened this issue Mar 5, 2020 · 1 comment · Fixed by #1348

Comments

@wmww
Copy link
Contributor

wmww commented Mar 5, 2020

To reproduce (convoluted, I know):

  1. Add params->server_side_decorated = true; to WindowWlSurfaceRole::create_scene_surface() to force server side decorations on Wayland apps
  2. Run weston-transformed (which has no cursor)
  3. grab an SSD resize edge and resize rapidly

Expected: it works

Actual: it crashes after a while with

ERROR: /home/wmww/code/mir/src/server/scene/surface_stack.cpp(248): Throw in function virtual void mir::scene::SurfaceStack::remove_input_visualization(const std::weak_ptr<mg::Renderable> &)
Dynamic exception type: boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::runtime_error> >
std::exception::what: Attempt to remove an overlay which was never added or which has been previously removed

I suspect the problem has to do with insuficient locking in mg::SoftwareCursor::hide()

Stack trace:

Thread 15 "Mir/Input Reade" hit Catchpoint 1 (exception thrown), 0x00007ffff72b6762 in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
(gdb) bt
#0  0x00007ffff72b6762 in __cxa_throw () at /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#1  0x00007ffff7762c1d in boost::throw_exception<boost::exception_detail::error_info_injector<std::runtime_error> >(boost::exception_detail::error_info_injector<std::runtime_error> const&) (e=...)
    at /usr/include/boost/throw_exception.hpp:69
#2  0x00007ffff7761919 in boost::exception_detail::throw_exception_<std::runtime_error>(std::runtime_error const&, char const*, char const*, int)
    (x=..., current_function=0x7ffff7b749b7 "virtual void mir::scene::SurfaceStack::remove_input_visualization(const std::weak_ptr<mg::Renderable> &)", file=0x7ffff7b74a20 "/home/wmww/code/mir/src/server/scene/surface_stack.cpp", line=248) at /usr/include/boost/throw_exception.hpp:86
#3  0x00007ffff7883218 in mir::scene::SurfaceStack::remove_input_visualization(std::weak_ptr<mir::graphics::Renderable> const&) (this=0x474bf0, weak_overlay=warning: RTTI symbol not found for class 'std::_Sp_counted_ptr_inplace<mir::graphics::detail::CursorRenderable, std::allocator<mir::graphics::detail::CursorRenderable>, (__gnu_cxx::_Lock_policy)2>'
warning: RTTI symbol not found for class 'std::_Sp_counted_ptr_inplace<mir::graphics::detail::CursorRenderable, std::allocator<mir::graphics::detail::CursorRenderable>, (__gnu_cxx::_Lock_policy)2>'

std::weak_ptr<class mir::graphics::Renderable> (use count 2, weak count 1) = {...}) at /home/wmww/code/mir/src/server/scene/surface_stack.cpp:248
#4  0x00007ffff78f5b6b in mir::graphics::SoftwareCursor::show(mir::graphics::CursorImage const&) (this=0x8e0480, cursor_image=...) at /home/wmww/code/mir/src/server/graphics/software_cursor.cpp:179
#5  0x00007ffff77b47d3 in mir::input::CursorController::set_cursor_image_locked(std::unique_lock<std::mutex>&, std::shared_ptr<mir::graphics::CursorImage> const&) (this=0x4fcea0, lock=..., image=warning: RTTI symbol not found for class 'std::_Sp_counted_ptr_inplace<(anonymous namespace)::XCursorImage, std::allocator<(anonymous namespace)::XCursorImage>, (__gnu_cxx::_Lock_policy)2>'
warning: RTTI symbol not found for class 'std::_Sp_counted_ptr_inplace<(anonymous namespace)::XCursorImage, std::allocator<(anonymous namespace)::XCursorImage>, (__gnu_cxx::_Lock_policy)2>'

std::shared_ptr<class mir::graphics::CursorImage> (use count 3, weak count 1) = {...}) at /home/wmww/code/mir/src/server/input/cursor_controller.cpp:240
#6  0x00007ffff77b494d in mir::input::CursorController::update_cursor_image_locked(std::unique_lock<std::mutex>&) (this=0x4fcea0, lock=...) at /home/wmww/code/mir/src/server/input/cursor_controller.cpp:254
#7  0x00007ffff77b4a9b in mir::input::CursorController::update_cursor_image() (this=0x4fcea0) at /home/wmww/code/mir/src/server/input/cursor_controller.cpp:261
#8  0x00007ffff77b5c49 in (anonymous namespace)::UpdateCursorOnSceneChanges::scene_changed() (this=0x8e0ea0) at /home/wmww/code/mir/src/server/input/cursor_controller.cpp:152
#9  0x00007ffff7889775 in mir::scene::Observers::scene_changed()::$_5::operator()(std::shared_ptr<mir::scene::Observer> const&) const (this=0x7fffbfffdfa8, observer=warning: RTTI symbol not found for class 'std::_Sp_counted_ptr_inplace<(anonymous namespace)::UpdateCursorOnSceneChanges, std::allocator<(anonymous namespace)::UpdateCursorOnSceneChanges>, (__gnu_cxx::_Lock_policy)2>'
warning: RTTI symbol not found for class 'std::_Sp_counted_ptr_inplace<(anonymous namespace)::UpdateCursorOnSceneChanges, std::allocator<(anonymous namespace)::UpdateCursorOnSceneChanges>, (__gnu_cxx::_Lock_policy)2>'

std::shared_ptr<class mir::scene::Observer> (use count 2, weak count 1) = {...}) at /home/wmww/code/mir/src/server/scene/surface_stack.cpp:502
#10 0x00007ffff7889642 in std::_Function_handler<void (std::shared_ptr<mir::scene::Observer> const&), mir::scene::Observers::scene_changed()::$_5>::_M_invoke(std::_Any_data const&, std::shared_ptr<mir::scene::Observer> const&) (__functor=..., __args=warning: RTTI symbol not found for class 'std::_Sp_counted_ptr_inplace<(anonymous namespace)::UpdateCursorOnSceneChanges, std::allocator<(anonymous namespace)::UpdateCursorOnSceneChanges>, (__gnu_cxx::_Lock_policy)2>'
warning: RTTI symbol not found for class 'std::_Sp_counted_ptr_inplace<(anonymous namespace)::UpdateCursorOnSceneChanges, std::allocator<(anonymous namespace)::UpdateCursorOnSceneChanges>, (__gnu_cxx::_Lock_policy)2>'
std::shared_ptr<class mir::scene::Observer> (use count 2, weak count 1) = {...})
    at /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/std_function.h:300
#11 0x00007ffff789429b in std::function<void (std::shared_ptr<mir::scene::Observer> const&)>::operator()(std::shared_ptr<mir::scene::Observer> const&) const (this=0x7fffbfffdfa8, __args=warning: RTTI symbol not found for class 'std::_Sp_counted_ptr_inplace<(anonymous namespace)::UpdateCursorOnSceneChanges, std::allocator<(anonymous namespace)::UpdateCursorOnSceneChanges>, (__gnu_cxx::_Lock_policy)2>'
warning: RTTI symbol not found for class 'std::_Sp_counted_ptr_inplace<(anonymous namespace)::UpdateCursorOnSceneChanges, std::allocator<(anonymous namespace)::UpdateCursorOnSceneChanges>, (__gnu_cxx::_Lock_policy)2>'

std::shared_ptr<class mir::scene::Observer> (use count 2, weak count 1) = {...}) at /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/std_function.h:688
#12 0x00007ffff788b349 in mir::ThreadSafeList<std::shared_ptr<mir::scene::Observer> >::for_each(std::function<void (std::shared_ptr<mir::scene::Observer> const&)> const&) (this=0x474d38, f=...)
    at /home/wmww/code/mir/src/include/common/mir/thread_safe_list.h:81
#13 0x00007ffff78833b5 in mir::scene::Observers::scene_changed() (this=0x474d30) at /home/wmww/code/mir/src/server/scene/surface_stack.cpp:501
#14 0x00007ffff7883370 in mir::scene::SurfaceStack::emit_scene_changed() (this=0x474bf0) at /home/wmww/code/mir/src/server/scene/surface_stack.cpp:262
#15 0x00007ffff78830cf in mir::scene::SurfaceStack::add_input_visualization(std::shared_ptr<mir::graphics::Renderable> const&) (this=0x474bf0, overlay=warning: RTTI symbol not found for class 'std::_Sp_counted_ptr_inplace<mir::graphics::detail::CursorRenderable, std::allocator<mir::graphics::detail::CursorRenderable>, (__gnu_cxx::_Lock_policy)2>'
warning: RTTI symbol not found for class 'std::_Sp_counted_ptr_inplace<mir::graphics::detail::CursorRenderable, std::allocator<mir::graphics::detail::CursorRenderable>, (__gnu_cxx::_Lock_policy)2>'

std::shared_ptr<class mir::graphics::Renderable> (use count 3, weak count 0) = {...}) at /home/wmww/code/mir/src/server/scene/surface_stack.cpp:236
#16 0x00007ffff78f5a38 in mir::graphics::SoftwareCursor::show(mir::graphics::CursorImage const&) (this=0x8e0480, cursor_image=...) at /home/wmww/code/mir/src/server/graphics/software_cursor.cpp:168
#17 0x00007ffff77b47d3 in mir::input::CursorController::set_cursor_image_locked(std::unique_lock<std::mutex>&, std::shared_ptr<mir::graphics::CursorImage> const&) (this=0x4fcea0, lock=..., image=warning: RTTI symbol not found for class 'std::_Sp_counted_ptr_inplace<(anonymous namespace)::XCursorImage, std::allocator<(anonymous namespace)::XCursorImage>, (__gnu_cxx::_Lock_policy)2>'
warning: RTTI symbol not found for class 'std::_Sp_counted_ptr_inplace<(anonymous namespace)::XCursorImage, std::allocator<(anonymous namespace)::XCursorImage>, (__gnu_cxx::_Lock_policy)2>'

std::shared_ptr<class mir::graphics::CursorImage> (use count 3, weak count 0) = {...}) at /home/wmww/code/mir/src/server/input/cursor_controller.cpp:240
#18 0x00007ffff77b4901 in mir::input::CursorController::update_cursor_image_locked(std::unique_lock<std::mutex>&) (this=0x4fcea0, lock=...) at /home/wmww/code/mir/src/server/input/cursor_controller.cpp:250
#19 0x00007ffff77b4b5c in mir::input::CursorController::cursor_moved_to(float, float) (this=0x4fcea0, abs_x=674, abs_y=607) at /home/wmww/code/mir/src/server/input/cursor_controller.cpp:273
#20 0x00007ffff78018a1 in mir::input::SeatInputDeviceTracker::update_cursor(MirPointerEvent const*) (this=0x4fe418, event=0x7fffb80211a0)
    at /home/wmww/code/mir/src/server/input/seat_input_device_tracker.cpp:261
#21 0x00007ffff78014c2 in mir::input::SeatInputDeviceTracker::update_seat_properties(MirInputEvent const*) (this=0x4fe418, event=0x7fffb80211a0)
    at /home/wmww/code/mir/src/server/input/seat_input_device_tracker.cpp:151
#22 0x00007ffff78010a3 in mir::input::SeatInputDeviceTracker::dispatch(std::shared_ptr<MirEvent> const&) (this=0x4fe418, event=warning: RTTI symbol not found for class 'std::_Sp_counted_deleter<MirEvent*, void (*)(MirEvent*), std::allocator<void>, (__gnu_cxx::_Lock_policy)2>'
warning: RTTI symbol not found for class 'std::_Sp_counted_deleter<MirEvent*, void (*)(MirEvent*), std::allocator<void>, (__gnu_cxx::_Lock_policy)2>'
std::shared_ptr<struct MirEvent> (use count 1, weak count 0) = {...})
    at /home/wmww/code/mir/src/server/input/seat_input_device_tracker.cpp:99
#23 0x00007ffff77a6486 in mir::input::BasicSeat::dispatch_event(std::shared_ptr<MirEvent> const&) (this=0x4fe410, event=warning: RTTI symbol not found for class 'std::_Sp_counted_deleter<MirEvent*, void (*)(MirEvent*), std::allocator<void>, (__gnu_cxx::_Lock_policy)2>'
warning: RTTI symbol not found for class 'std::_Sp_counted_deleter<MirEvent*, void (*)(MirEvent*), std::allocator<void>, (__gnu_cxx::_Lock_policy)2>'
std::shared_ptr<struct MirEvent> (use count 1, weak count 0) = {...})
    at /home/wmww/code/mir/src/server/input/basic_seat.cpp:204
#24 0x00007ffff77dbfde in mir::input::DefaultInputDeviceHub::RegisteredDevice::handle_input(std::shared_ptr<MirEvent> const&) (this=0x7fffb8013bb0, event=warning: RTTI symbol not found for class 'std::_Sp_counted_deleter<MirEvent*, void (*)(MirEvent*), std::allocator<void>, (__gnu_cxx::_Lock_policy)2>'
warning: RTTI symbol not found for class 'std::_Sp_counted_deleter<MirEvent*, void (*)(MirEvent*), std::allocator<void>, (__gnu_cxx::_Lock_policy)2>'

std::shared_ptr<struct MirEvent> (use count 1, weak count 0) = {...}) at /home/wmww/code/mir/src/server/input/default_input_device_hub.cpp:291
#25 0x00007ffff48734ba in mir::input::X::XInputDevice::pointer_motion(std::chrono::duration<long, std::ratio<1l, 1000000000l> >, mir::geometry::Point const&, mir::geometry::Displacement)
    (this=0x8efbf0, event_time=..., pos=..., scroll=...) at /home/wmww/code/mir/src/platforms/mesa/server/x11/input/input_device.cpp:218
#26 0x00007ffff4870181 in mir::input::X::XInputPlatform::process_input_event() (this=0x8efaa0) at /home/wmww/code/mir/src/platforms/mesa/server/x11/input/input_platform.cpp:283
#27 0x00007ffff4870bf8 in mir::input::X::XInputPlatform::XInputPlatform(std::shared_ptr<mir::input::InputDeviceRegistry> const&, std::shared_ptr<_XDisplay> const&)::$_0::operator()() const (this=0x96d768)
    at /home/wmww/code/mir/src/platforms/mesa/server/x11/input/input_platform.cpp:75
#28 0x00007ffff4870abd in std::_Function_handler<void (), mir::input::X::XInputPlatform::XInputPlatform(std::shared_ptr<mir::input::InputDeviceRegistry> const&, std::shared_ptr<_XDisplay> const&)::$_0>::_M_invoke(std::_Any_data const&) (__functor=...) at /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/std_function.h:300
--Type <RET> for more, q to quit, c to continue without paging--
#29 0x00007ffff744c2fe in std::function<void ()>::operator()() const (this=0x96d768) at /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/std_function.h:688
#30 0x00007ffff7451b50 in mir::dispatch::ReadableFd::dispatch(unsigned int) (this=0x96d750, events=1) at /home/wmww/code/mir/src/common/dispatch/readable_fd.cpp:38
#31 0x00007ffff744e780 in mir::dispatch::MultiplexingDispatchable::dispatch(unsigned int) (this=0x96e050, events=1) at /home/wmww/code/mir/src/common/dispatch/multiplexing_dispatchable.cpp:140
#32 0x00007ffff744e780 in mir::dispatch::MultiplexingDispatchable::dispatch(unsigned int) (this=0x8f0610, events=1) at /home/wmww/code/mir/src/common/dispatch/multiplexing_dispatchable.cpp:140
#33 0x00007ffff7452347 in (anonymous namespace)::dispatch_loop(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::shared_ptr<mir::dispatch::ThreadedDispatcher::ThreadShutdownRequestHandler>, std::shared_ptr<mir::dispatch::Dispatchable>, std::function<void ()> const&)Python Exception <class 'gdb.error'> There is no member named _M_dataplus.: 
 (name=, thread_register=warning: RTTI symbol not found for class 'std::_Sp_counted_ptr_inplace<mir::dispatch::ThreadedDispatcher::ThreadShutdownRequestHandler, std::allocator<mir::dispatch::ThreadedDispatcher::ThreadShutdownRequestHandler>, (__gnu_cxx::_Lock_policy)2>'
warning: RTTI symbol not found for class 'std::_Sp_counted_ptr_inplace<mir::dispatch::ThreadedDispatcher::ThreadShutdownRequestHandler, std::allocator<mir::dispatch::ThreadedDispatcher::ThreadShutdownRequestHandler>, (__gnu_cxx::_Lock_policy)2>'

std::shared_ptr<class mir::dispatch::ThreadedDispatcher::ThreadShutdownRequestHandler> (use count 4, weak count 0) = {...}, dispatcher=warning: RTTI symbol not found for class 'std::_Sp_counted_ptr_inplace<mir::dispatch::MultiplexingDispatchable, std::allocator<mir::dispatch::MultiplexingDispatchable>, (__gnu_cxx::_Lock_policy)2>'
warning: RTTI symbol not found for class 'std::_Sp_counted_ptr_inplace<mir::dispatch::MultiplexingDispatchable, std::allocator<mir::dispatch::MultiplexingDispatchable>, (__gnu_cxx::_Lock_policy)2>'

std::shared_ptr<class mir::dispatch::Dispatchable> (use count 2, weak count 0) = {...}, exception_handler=...) at /home/wmww/code/mir/src/common/dispatch/threaded_dispatcher.cpp:211
#34 0x00007ffff745d8c2 in std::__invoke_impl<void, void (*)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::shared_ptr<mir::dispatch::ThreadedDispatcher::ThreadShutdownRequestHandler>, std::shared_ptr<mir::dispatch::Dispatchable>, std::function<void ()> const&), std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::shared_ptr<mir::dispatch::ThreadedDispatcher::ThreadShutdownRequestHandler>, std::shared_ptr<mir::dispatch::MultiplexingDispatchable>, std::function<void ()> >(std::__invoke_other, void (*&&)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::shared_ptr<mir::dispatch::ThreadedDispatcher::ThreadShutdownRequestHandler>, std::shared_ptr<mir::dispatch::Dispatchable>, std::function<void ()> const&), std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&, std::shared_ptr<mir::dispatch::ThreadedDispatcher::ThreadShutdownRequestHandler>&&, std::shared_ptr<mir::dispatch::MultiplexingDispatchable>&&, std::function<void ()>&&) (__f=
    @0x8f0768: 0x7ffff7452120 <(anonymous namespace)::dispatch_loop(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::shared_ptr<mir::dispatch::ThreadedDispatcher::ThreadShutdownRequestHandler>, std::shared_ptr<mir::dispatch::Dispatchable>, std::function<void ()> const&)>, __args=..., __args=..., __args=..., __args=...)
    at /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/invoke.h:60
#35 0x00007ffff745d721 in std::__invoke<void (*)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::shared_ptr<mir::dispatch::ThreadedDispatcher::ThreadShutdownRequestHandler>, std::shared_ptr<mir::dispatch::Dispatchable>, std::function<void ()> const&), std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::shared_ptr<mir::dispatch::ThreadedDispatcher::ThreadShutdownRequestHandler>, std::shared_ptr<mir::dispatch::MultiplexingDispatchable>, std::function<void ()> >(void (*&&)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::shared_ptr<mir::dispatch::ThreadedDispatcher::ThreadShutdownRequestHandler>, std::shared_ptr<mir::dispatch::Dispatchable>, std::function<void ()> const&), std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&, std::shared_ptr<mir::dispatch::ThreadedDispatcher::ThreadShutdownRequestHandler>&&, std::shared_ptr<mir::dispatch::MultiplexingDispatchable>&&, std::function<void ()>&&)
    (__fn=
    @0x8f0768: 0x7ffff7452120 <(anonymous namespace)::dispatch_loop(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::shared_ptr<mir::dispatch::ThreadedDispatcher::ThreadShutdownRequestHandler>, std::shared_ptr<mir::dispatch::Dispatchable>, std::function<void ()> const&)>, __args=..., __args=..., __args=..., __args=...)
    at /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/invoke.h:95
#36 0x00007ffff745d6a0 in std::thread::_Invoker<std::tuple<void (*)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::shared_ptr<mir::dispatch::ThreadedDispatcher::ThreadShutdownRequestHandler>, std::shared_ptr<mir::dispatch::Dispatchable>, std::function<void ()> const&), std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::shared_ptr<mir::dispatch::ThreadedDispatcher::ThreadShutdownRequestHandler>, std::shared_ptr<mir::dispatch::MultiplexingDispatchable>, std::function<void ()> > >::_M_invoke<0ul, 1ul, 2ul, 3ul, 4ul>(std::_Index_tuple<0ul, 1ul, 2ul, 3ul, 4ul>) (this=0x8f0708) at /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/thread:244
#37 0x00007ffff745d605 in std::thread::_Invoker<std::tuple<void (*)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::shared_ptr<mir::dispatch::ThreadedDispatcher::ThreadShutdownRequestHandler>, std::shared_ptr<mir::dispatch::Dispatchable>, std::function<void ()> const&), std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::shared_ptr<mir::dispatch::ThreadedDispatcher::ThreadShutdownRequestHandler>, std::shared_ptr<mir::dispatch::MultiplexingDispatchable>, std::function<void ()> > >::operator()() (this=0x8f0708)
    at /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/thread:251
#38 0x00007ffff745cd7e in std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (*)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::shared_ptr<mir::dispatch::ThreadedDispatcher::ThreadShutdownRequestHandler>, std::shared_ptr<mir::dispatch::Dispatchable>, std::function<void ()> const&), std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::shared_ptr<mir::dispatch::ThreadedDispatcher::ThreadShutdownRequestHandler>, std::shared_ptr<mir::dispatch::MultiplexingDispatchable>, std::function<void ()> > > >::_M_run() (this=0x8f0700)
    at /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/thread:195
#39 0x00007ffff72e2cb4 in  () at /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#40 0x00007ffff740d669 in start_thread (arg=<optimized out>) at pthread_create.c:479
#41 0x00007ffff7122333 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
@wmww
Copy link
Contributor Author

wmww commented Mar 5, 2020

Another, similar trace:

#0  0x00007ffff72b8762 in __cxa_throw () at /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#1  0x00007ffff7764b3d in boost::throw_exception<boost::exception_detail::error_info_injector<std::runtime_error> >(boost::exception_detail::error_info_injector<std::runtime_error> const&) (e=...)
    at /usr/include/boost/throw_exception.hpp:69
#2  0x00007ffff7763839 in boost::exception_detail::throw_exception_<std::runtime_error>(std::runtime_error const&, char const*, char const*, int)
    (x=..., current_function=0x7ffff7b74d5f "virtual void mir::scene::SurfaceStack::remove_input_visualization(const std::weak_ptr<mg::Renderable> &)", file=0x7ffff7b74dc8 "/home/wmww/code/mir/src/server/scene/surface_stack.cpp", line=248) at /usr/include/boost/throw_exception.hpp:86
#3  0x00007ffff7883a78 in mir::scene::SurfaceStack::remove_input_visualization(std::weak_ptr<mir::graphics::Renderable> const&) (this=0x474bf0, weak_overlay=warning: RTTI symbol not found for class 'std::_Sp_counted_ptr_inplace<mir::graphics::detail::CursorRenderable, std::allocator<mir::graphics::detail::CursorRenderable>, (__gnu_cxx::_Lock_policy)2>'
warning: RTTI symbol not found for class 'std::_Sp_counted_ptr_inplace<mir::graphics::detail::CursorRenderable, std::allocator<mir::graphics::detail::CursorRenderable>, (__gnu_cxx::_Lock_policy)2>'

std::weak_ptr<class mir::graphics::Renderable> (use count 3, weak count 1) = {...}) at /home/wmww/code/mir/src/server/scene/surface_stack.cpp:248
#4  0x00007ffff78f6725 in mir::graphics::SoftwareCursor::hide() (this=0x8e0000) at /home/wmww/code/mir/src/server/graphics/software_cursor.cpp:221
#5  0x00007ffff77b6713 in mir::input::CursorController::set_cursor_image_locked(std::unique_lock<std::mutex>&, std::shared_ptr<mir::graphics::CursorImage> const&) (this=0x4f9340, lock=..., image=
    std::shared_ptr<class mir::graphics::CursorImage> (empty) = {...}) at /home/wmww/code/mir/src/server/input/cursor_controller.cpp:242
#6  0x00007ffff77b6821 in mir::input::CursorController::update_cursor_image_locked(std::unique_lock<std::mutex>&) (this=0x4f9340, lock=...) at /home/wmww/code/mir/src/server/input/cursor_controller.cpp:250
#7  0x00007ffff77b6a7c in mir::input::CursorController::cursor_moved_to(float, float) (this=0x4f9340, abs_x=462, abs_y=587) at /home/wmww/code/mir/src/server/input/cursor_controller.cpp:273
#8  0x00007ffff78037c1 in mir::input::SeatInputDeviceTracker::update_cursor(MirPointerEvent const*) (this=0x502a18, event=0x7fffb803a0c0)
    at /home/wmww/code/mir/src/server/input/seat_input_device_tracker.cpp:261
#9  0x00007ffff78033e2 in mir::input::SeatInputDeviceTracker::update_seat_properties(MirInputEvent const*) (this=0x502a18, event=0x7fffb803a0c0)
    at /home/wmww/code/mir/src/server/input/seat_input_device_tracker.cpp:151
#10 0x00007ffff7802fc3 in mir::input::SeatInputDeviceTracker::dispatch(std::shared_ptr<MirEvent> const&) (this=0x502a18, event=warning: RTTI symbol not found for class 'std::_Sp_counted_deleter<MirEvent*, void (*)(MirEvent*), std::allocator<void>, (__gnu_cxx::_Lock_policy)2>'
warning: RTTI symbol not found for class 'std::_Sp_counted_deleter<MirEvent*, void (*)(MirEvent*), std::allocator<void>, (__gnu_cxx::_Lock_policy)2>'
std::shared_ptr<struct MirEvent> (use count 1, weak count 0) = {...})
    at /home/wmww/code/mir/src/server/input/seat_input_device_tracker.cpp:99
#11 0x00007ffff77a83a6 in mir::input::BasicSeat::dispatch_event(std::shared_ptr<MirEvent> const&) (this=0x502a10, event=warning: RTTI symbol not found for class 'std::_Sp_counted_deleter<MirEvent*, void (*)(MirEvent*), std::allocator<void>, (__gnu_cxx::_Lock_policy)2>'
warning: RTTI symbol not found for class 'std::_Sp_counted_deleter<MirEvent*, void (*)(MirEvent*), std::allocator<void>, (__gnu_cxx::_Lock_policy)2>'
std::shared_ptr<struct MirEvent> (use count 1, weak count 0) = {...})
    at /home/wmww/code/mir/src/server/input/basic_seat.cpp:204
#12 0x00007ffff77ddefe in mir::input::DefaultInputDeviceHub::RegisteredDevice::handle_input(std::shared_ptr<MirEvent> const&) (this=0x7fffb8019230, event=warning: RTTI symbol not found for class 'std::_Sp_counted_deleter<MirEvent*, void (*)(MirEvent*), std::allocator<void>, (__gnu_cxx::_Lock_policy)2>'
warning: RTTI symbol not found for class 'std::_Sp_counted_deleter<MirEvent*, void (*)(MirEvent*), std::allocator<void>, (__gnu_cxx::_Lock_policy)2>'

std::shared_ptr<struct MirEvent> (use count 1, weak count 0) = {...}) at /home/wmww/code/mir/src/server/input/default_input_device_hub.cpp:291
#13 0x00007ffff486545a in mir::input::X::XInputDevice::pointer_motion(std::chrono::duration<long, std::ratio<1l, 1000000000l> >, mir::geometry::Point const&, mir::geometry::Displacement)
    (this=0x8ef840, event_time=..., pos=..., scroll=...) at /home/wmww/code/mir/src/platforms/mesa/server/x11/input/input_device.cpp:218
#14 0x00007ffff4862121 in mir::input::X::XInputPlatform::process_input_event() (this=0x8ef6f0) at /home/wmww/code/mir/src/platforms/mesa/server/x11/input/input_platform.cpp:283
#15 0x00007ffff4862b98 in mir::input::X::XInputPlatform::XInputPlatform(std::shared_ptr<mir::input::InputDeviceRegistry> const&, std::shared_ptr<_XDisplay> const&)::$_0::operator()() const (this=0x96d458)
    at /home/wmww/code/mir/src/platforms/mesa/server/x11/input/input_platform.cpp:75
#16 0x00007ffff4862a5d in std::_Function_handler<void (), mir::input::X::XInputPlatform::XInputPlatform(std::shared_ptr<mir::input::InputDeviceRegistry> const&, std::shared_ptr<_XDisplay> const&)::$_0>::_M_invoke(std::_Any_data const&) (__functor=...) at /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/std_function.h:300
#17 0x00007ffff744e2fe in std::function<void ()>::operator()() const (this=0x96d458) at /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/std_function.h:688
#18 0x00007ffff7453b50 in mir::dispatch::ReadableFd::dispatch(unsigned int) (this=0x96d440, events=1) at /home/wmww/code/mir/src/common/dispatch/readable_fd.cpp:38
#19 0x00007ffff7450780 in mir::dispatch::MultiplexingDispatchable::dispatch(unsigned int) (this=0x8ed710, events=1) at /home/wmww/code/mir/src/common/dispatch/multiplexing_dispatchable.cpp:140
#20 0x00007ffff7450780 in mir::dispatch::MultiplexingDispatchable::dispatch(unsigned int) (this=0x8f0260, events=1) at /home/wmww/code/mir/src/common/dispatch/multiplexing_dispatchable.cpp:140
#21 0x00007ffff7454347 in (anonymous namespace)::dispatch_loop(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::shared_ptr<mir::dispatch::ThreadedDispatcher::ThreadShutdownRequestHandler>, std::shared_ptr<mir::dispatch::Dispatchable>, std::function<void ()> const&)Python Exception <class 'gdb.error'> There is no member named _M_dataplus.: 
 (name=, thread_register=warning: RTTI symbol not found for class 'std::_Sp_counted_ptr_inplace<mir::dispatch::ThreadedDispatcher::ThreadShutdownRequestHandler, std::allocator<mir::dispatch::ThreadedDispatcher::ThreadShutdownRequestHandler>, (__gnu_cxx::_Lock_policy)2>'
warning: RTTI symbol not found for class 'std::_Sp_counted_ptr_inplace<mir::dispatch::ThreadedDispatcher::ThreadShutdownRequestHandler, std::allocator<mir::dispatch::ThreadedDispatcher::ThreadShutdownRequestHandler>, (__gnu_cxx::_Lock_policy)2>'

std::shared_ptr<class mir::dispatch::ThreadedDispatcher::ThreadShutdownRequestHandler> (use count 4, weak count 0) = {...}, dispatcher=warning: RTTI symbol not found for class 'std::_Sp_counted_ptr_inplace<mir::dispatch::MultiplexingDispatchable, std::allocator<mir::dispatch::MultiplexingDispatchable>, (__gnu_cxx::_Lock_policy)2>'
warning: RTTI symbol not found for class 'std::_Sp_counted_ptr_inplace<mir::dispatch::MultiplexingDispatchable, std::allocator<mir::dispatch::MultiplexingDispatchable>, (__gnu_cxx::_Lock_policy)2>'

std::shared_ptr<class mir::dispatch::Dispatchable> (use count 2, weak count 0) = {...}, exception_handler=...) at /home/wmww/code/mir/src/common/dispatch/threaded_dispatcher.cpp:211
#22 0x00007ffff745f8c2 in std::__invoke_impl<void, void (*)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::shared_ptr<mir::dispatch::ThreadedDispatcher::ThreadShutdownRequestHandler>, std::shared_ptr<mir::dispatch::Dispatchable>, std::function<void ()> const&), std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::shared_ptr<mir::dispatch::ThreadedDispatcher::ThreadShutdownRequestHandler>, std::shared_ptr<mir::dispatch::MultiplexingDispatchable>, std::function<void ()> >(std::__invoke_other, void (*&&)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::shared_ptr<mir::dispatch::ThreadedDispatcher::ThreadShutdownRequestHandler>, std::shared_ptr<mir::dispatch::Dispatchable>, std::function<void ()> const&), std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&, std::shared_ptr<mir::dispatch::ThreadedDispatcher::ThreadShutdownRequestHandler>&&, std::shared_ptr<mir::dispatch::MultiplexingDispatchable>&&, std::function<void ()>&&) (__f=
    @0x8f03b8: 0x7ffff7454120 <(anonymous namespace)::dispatch_loop(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::shared_ptr<mir::dispatch::ThreadedDispatcher::ThreadShutdownRequestHandler>, std::shared_ptr<mir::dispatch::Dispatchable>, std::function<void ()> const&)>, __args=..., __args=..., __args=..., __args=...)
    at /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/invoke.h:60
#23 0x00007ffff745f721 in std::__invoke<void (*)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::shared_ptr<mir::dispatch::ThreadedDispatcher::ThreadShutdownRequestHandler>, std::shared_ptr<mir::dispatch::Dispatchable>, std::function<void ()> const&), std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::shared_ptr<mir::dispatch::ThreadedDispa--Type <RET> for more, q to quit, c to continue without paging--
tcher::ThreadShutdownRequestHandler>, std::shared_ptr<mir::dispatch::MultiplexingDispatchable>, std::function<void ()> >(void (*&&)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::shared_ptr<mir::dispatch::ThreadedDispatcher::ThreadShutdownRequestHandler>, std::shared_ptr<mir::dispatch::Dispatchable>, std::function<void ()> const&), std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&, std::shared_ptr<mir::dispatch::ThreadedDispatcher::ThreadShutdownRequestHandler>&&, std::shared_ptr<mir::dispatch::MultiplexingDispatchable>&&, std::function<void ()>&&)
    (__fn=
    @0x8f03b8: 0x7ffff7454120 <(anonymous namespace)::dispatch_loop(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::shared_ptr<mir::dispatch::ThreadedDispatcher::ThreadShutdownRequestHandler>, std::shared_ptr<mir::dispatch::Dispatchable>, std::function<void ()> const&)>, __args=..., __args=..., __args=..., __args=...)
    at /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/invoke.h:95
#24 0x00007ffff745f6a0 in std::thread::_Invoker<std::tuple<void (*)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::shared_ptr<mir::dispatch::ThreadedDispatcher::ThreadShutdownRequestHandler>, std::shared_ptr<mir::dispatch::Dispatchable>, std::function<void ()> const&), std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::shared_ptr<mir::dispatch::ThreadedDispatcher::ThreadShutdownRequestHandler>, std::shared_ptr<mir::dispatch::MultiplexingDispatchable>, std::function<void ()> > >::_M_invoke<0ul, 1ul, 2ul, 3ul, 4ul>(std::_Index_tuple<0ul, 1ul, 2ul, 3ul, 4ul>) (this=0x8f0358) at /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/thread:244
#25 0x00007ffff745f605 in std::thread::_Invoker<std::tuple<void (*)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::shared_ptr<mir::dispatch::ThreadedDispatcher::ThreadShutdownRequestHandler>, std::shared_ptr<mir::dispatch::Dispatchable>, std::function<void ()> const&), std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::shared_ptr<mir::dispatch::ThreadedDispatcher::ThreadShutdownRequestHandler>, std::shared_ptr<mir::dispatch::MultiplexingDispatchable>, std::function<void ()> > >::operator()() (this=0x8f0358)
    at /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/thread:251
#26 0x00007ffff745ed7e in std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (*)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::shared_ptr<mir::dispatch::ThreadedDispatcher::ThreadShutdownRequestHandler>, std::shared_ptr<mir::dispatch::Dispatchable>, std::function<void ()> const&), std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::shared_ptr<mir::dispatch::ThreadedDispatcher::ThreadShutdownRequestHandler>, std::shared_ptr<mir::dispatch::MultiplexingDispatchable>, std::function<void ()> > > >::_M_run() (this=0x8f0350)
    at /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/thread:195
#27 0x00007ffff72e4cb4 in  () at /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#28 0x00007ffff740f669 in start_thread (arg=<optimized out>) at pthread_create.c:479
#29 0x00007ffff7124333 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

@bors bors bot closed this as completed in 97e9dd1 Mar 9, 2020
wmww added a commit that referenced this issue Apr 2, 2020
1348: Safely show and hide software cursor r=AlanGriffiths a=wmww

Fixes #1347 

1355: Enable `--display-config` for Mir-on-X r=wmww a=AlanGriffiths

Enable `--display-config` for Mir-on-X. (Fixes: #1326)

Note: if you test, using "--display config clone" with this exposes the race that #1354 addresses.

Co-authored-by: William Wold <wm@wmww.sh>
Co-authored-by: Alan Griffiths <alan@octopull.co.uk>
wmww added a commit that referenced this issue Apr 3, 2020
1348: Safely show and hide software cursor r=AlanGriffiths a=wmww

Fixes #1347

1355: Enable `--display-config` for Mir-on-X r=wmww a=AlanGriffiths

Enable `--display-config` for Mir-on-X. (Fixes: #1326)

Note: if you test, using "--display config clone" with this exposes the race that #1354 addresses.

Co-authored-by: William Wold <wm@wmww.sh>
Co-authored-by: Alan Griffiths <alan@octopull.co.uk>
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 a pull request may close this issue.

1 participant