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

SIGSEGV in mir::frontend::WlSeat::ConfigObserver::device_changed on input device disconnection #3601

Closed
Saviq opened this issue Sep 18, 2024 · 3 comments · Fixed by #3602
Closed
Assignees
Labels
bug triaged Triage into JIRA to plan it in

Comments

@Saviq
Copy link
Collaborator

Saviq commented Sep 18, 2024

#0  0x000075eb2898768c in mir::frontend::WlSeat::ConfigObserver::device_changed (this=0x5c6fbdb4c9a0, device=...) at /root/parts/mir/src/src/server/frontend_wayland/wl_seat.cpp:120
        keyboard_config = {value_ = {impl = {_M_t = {<std::__uniq_ptr_impl<MirKeyboardConfig::Implementation, std::default_delete<MirKeyboardConfig::Implementation> >> = {_M_t = {<std::_Tuple_impl<0, MirKeyboardConfig::Implementation*, std::default_delete<MirKeyboardConfig::Implementation> >> = {<std::_Tuple_impl<1, std::default_delete<MirKeyboardConfig::Implementation> >> = {<std::_Head_base<1, std::default_delete<MirKeyboardConfig::Implementation>, true>> = {_M_head_impl = {<No data fields>}}, <No data fields>}, <std::_Head_base<0, MirKeyboardConfig::Implementation*, false>> = {_M_head_impl = 0x7ffe491d74d0}, <No data fields>}, <No data fields>}}, <No data fields>}}}, is_set_ = 48}
#1  0x000075eb2875a770 in operator() (__closure=0x75ea9c0dd8e0, observer=...) at /root/parts/mir/src/src/server/input/default_input_device_hub.cpp:179
        dev = @0x5c6fbdb9d3a0: {<std::__shared_ptr<mir::input::Device, (__gnu_cxx::_Lock_policy)2>> = {<std::__shared_ptr_access<mir::input::Device, (__gnu_cxx::_Lock_policy)2, false, false>> = {<No data fields>}, _M_ptr = 0x0, _M_refcount = {_M_pi = 0x0}}, <No data fields>}
        __for_range = @0x5c6fbdba3e60: {<std::_Vector_base<std::shared_ptr<mir::input::Device>, std::allocator<std::shared_ptr<mir::input::Device> > >> = {_M_impl = {<std::allocator<std::shared_ptr<mir::input::Device> >> = {<std::__new_allocator<std::shared_ptr<mir::input::Device> >> = {<No data fields>}, <No data fields>}, <std::_Vector_base<std::shared_ptr<mir::input::Device>, std::allocator<std::shared_ptr<mir::input::Device> > >::_Vector_impl_data> = {_M_start = 0x5c6fbdb9d3a0, _M_finish = 0x5c6fbdb9d3b0, _M_end_of_storage = 0x5c6fbdb9d3b0}, <No data fields>}}, <No data fields>}
        __for_begin = {_M_current = 0x5c6fbdb9d3a0}
        __for_end = {_M_current = 0x5c6fbdb9d3b0}
        added = @0x5c6fbdba3e48: {<std::_Vector_base<std::shared_ptr<mir::input::Device>, std::allocator<std::shared_ptr<mir::input::Device> > >> = {_M_impl = {<std::allocator<std::shared_ptr<mir::input::Device> >> = {<std::__new_allocator<std::shared_ptr<mir::input::Device> >> = {<No data fields>}, <No data fields>}, <std::_Vector_base<std::shared_ptr<mir::input::Device>, std::allocator<std::shared_ptr<mir::input::Device> > >::_Vector_impl_data> = {_M_start = 0x0, _M_finish = 0x0, _M_end_of_storage = 0x0}, <No data fields>}}, <No data fields>}
        changed = @0x5c6fbdba3e60: {<std::_Vector_base<std::shared_ptr<mir::input::Device>, std::allocator<std::shared_ptr<mir::input::Device> > >> = {_M_impl = {<std::allocator<std::shared_ptr<mir::input::Device> >> = {<std::__new_allocator<std::shared_ptr<mir::input::Device> >> = {<No data fields>}, <No data fields>}, <std::_Vector_base<std::shared_ptr<mir::input::Device>, std::allocator<std::shared_ptr<mir::input::Device> > >::_Vector_impl_data> = {_M_start = 0x5c6fbdb9d3a0, _M_finish = 0x5c6fbdb9d3b0, _M_end_of_storage = 0x5c6fbdb9d3b0}, <No data fields>}}, <No data fields>}
        removed = @0x5c6fbdba3e78: {<std::_Vector_base<std::shared_ptr<mir::input::Device>, std::allocator<std::shared_ptr<mir::input::Device> > >> = {_M_impl = {<std::allocator<std::shared_ptr<mir::input::Device> >> = {<std::__new_allocator<std::shared_ptr<mir::input::Device> >> = {<No data fields>}, <No data fields>}, <std::_Vector_base<std::shared_ptr<mir::input::Device>, std::allocator<std::shared_ptr<mir::input::Device> > >::_Vector_impl_data> = {_M_start = 0x0, _M_finish = 0x0, _M_end_of_storage = 0x0}, <No data fields>}}, <No data fields>}
#2  0x000075eb28761439 in std::__invoke_impl<void, mir::input::ExternalInputDeviceHub::Internal::changes_complete()::<lambda()>::<lambda(const std::shared_ptr<mir::input::InputDeviceObserver>&)>&, const std::shared_ptr<mir::input::InputDeviceObserver>&>(std::__invoke_other, struct {...} &) (__f=...) at /usr/include/c++/13/bits/invoke.h:61
No locals.
#3  0x000075eb2875fd97 in std::__invoke_r<void, mir::input::ExternalInputDeviceHub::Internal::changes_complete()::<lambda()>::<lambda(const std::shared_ptr<mir::input::InputDeviceObserver>&)>&, const std::shared_ptr<mir::input::InputDeviceObserver>&>(struct {...} &) (__fn=...) at /usr/include/c++/13/bits/invoke.h:111
No locals.
#4  0x000075eb2875eb7e in std::_Function_handler<void(const std::shared_ptr<mir::input::InputDeviceObserver>&), mir::input::ExternalInputDeviceHub::Internal::changes_complete()::<lambda()>::<lambda(const std::shared_ptr<mir::input::InputDeviceObserver>&)> >::_M_invoke(const std::_Any_data &, const std::shared_ptr<mir::input::InputDeviceObserver> &) (__functor=..., __args#0=...) at /usr/include/c++/13/bits/std_function.h:290
No locals.
#5  0x000075eb2876c055 in std::function<void(std::shared_ptr<mir::input::InputDeviceObserver> const&)>::operator() (this=0x7ffe491d76f0, __args#0=...) at /usr/include/c++/13/bits/std_function.h:591
No locals.
#6  0x000075eb287689ea in mir::ThreadSafeList<std::shared_ptr<mir::input::InputDeviceObserver> >::for_each (this=0x5c6fbd8cf8a8, f=...) at /root/parts/mir/src/src/include/common/mir/thread_safe_list.h:78
        copy_of_element = {<std::__shared_ptr<mir::input::InputDeviceObserver, (__gnu_cxx::_Lock_policy)2>> = {<std::__shared_ptr_access<mir::input::InputDeviceObserver, (__gnu_cxx::_Lock_policy)2, false, false>> = {<No data fields>}, _M_ptr = 0x5c6fbdb4c9a0, _M_refcount = {_M_pi = 0x5c6fbdb4c990}}, <No data fields>}
        lock = {mutex = @0x5c6fbd8cf8a8}
        current_item = 0x5c6fbd8cf8a8

gdb.txt

@Saviq Saviq added bug triaged Triage into JIRA to plan it in labels Sep 18, 2024
@AlanGriffiths
Copy link
Contributor

You just unplug an input device and "boom"?

@Saviq
Copy link
Collaborator Author

Saviq commented Sep 19, 2024

On a VT, yes.

@AlanGriffiths
Copy link
Contributor

Weird. I regularly plug/unplug a docking station without trouble.

But I found a USB mouse and... "boom!"

github-merge-queue bot pushed a commit that referenced this issue Sep 19, 2024
Fix some dubious assumption in DefaultInputDeviceHub.

Fixes: #3601
Saviq added a commit that referenced this issue Sep 19, 2024
Fix some dubious assumption in DefaultInputDeviceHub.

Fixes: #3601
@Saviq Saviq mentioned this issue Sep 19, 2024
Saviq added a commit that referenced this issue Sep 27, 2024
Enhancements:
. Allow to specify an app id for when running on the wayland platform #3614

Bugs fixed:
. SIGSEGV on input device disconnection #3601
. Frame fails to enforce fullscreen on wpe-webkit-mir-kiosk #3600
. Chromium unmaximises when focus is lost #3592
. Apps constantly resizing #3573
. Our fork/exec spawning is unsafe #3494
. Revert "Fix random leak" #3609
. Smoke tests are failing #3610
Saviq added a commit that referenced this issue Sep 27, 2024
Enhancements:
. Allow to specify an app id for when running on the wayland platform #3614

Bugs fixed:
. SIGSEGV on input device disconnection #3601
. Frame fails to enforce fullscreen on wpe-webkit-mir-kiosk #3600
. Chromium unmaximises when focus is lost #3592
. Apps constantly resizing #3573
. Our fork/exec spawning is unsafe #3494
. Revert "Fix random leak" #3609
. Smoke tests are failing #3610
github-merge-queue bot pushed a commit that referenced this issue Sep 30, 2024
>  Release 2.18.2
>
>  Enhancements:
>  - #3614
>  - #3617
>
>  Bugs fixed:
>   - #3601
>   - #3600
>   - #3592
>   - #3573
>   - #3494
>   - #3609
>   - #3610
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug triaged Triage into JIRA to plan it in
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants