Closed valpackett closed 8 months ago
Yeah, it still has to do with reload_dynamic_plugins
→ ~wayfire_expo
This didn't happen before the last git pull.. maybe "close all views even if unmapped" is somehow involved? though why would plugin reload be involved? why is plugin reload even happening??
upd: debug build hints at vector??
ASan doesn't catch anything before the segfault..
anyway with the expo plugin unloaded, at least the trace is related to zoom animation
=================================================================
==55273==ERROR: AddressSanitizer: SEGV on unknown address 0x0008f65d2bf0 (pc 0x0008f65d2bf0 bp 0x7fffffffac50 sp 0x7fffffffac38 T0)
==55273==The signal is caused by a READ memory access.
#0 0x8f65d2bf0 (<unknown module>)
#1 0x8fa14b1ea in zoom_animation::~zoom_animation() /home/greg/src/github.com/WayfireWM/wayfire/build/../plugins/animate/basic_animations.hpp:136:5
#2 0x8fa14b2bb in zoom_animation::~zoom_animation() /home/greg/src/github.com/WayfireWM/wayfire/build/../plugins/animate/basic_animations.hpp:134:5
#3 0x8fa13f2f1 in std::__1::default_delete<animation_base>::operator()(animation_base*) const /usr/include/c++/v1/memory:2363:5
#4 0x8fa13f11a in std::__1::unique_ptr<animation_base, std::__1::default_delete<animation_base> >::reset(animation_base*) /usr/include/c++/v1/memory:2618:7
#5 0x8fa141550 in animation_hook<zoom_animation>::~animation_hook() /home/greg/src/github.com/WayfireWM/wayfire/build/../plugins/animate/animate.cpp:123:25
#6 0x8fa1416ab in animation_hook<zoom_animation>::~animation_hook() /home/greg/src/github.com/WayfireWM/wayfire/build/../plugins/animate/animate.cpp:115:5
#7 0x734351 in std::__1::default_delete<wf::custom_data_t>::operator()(wf::custom_data_t*) const /usr/include/c++/v1/memory:2363:5
#8 0x7067aa in std::__1::unique_ptr<wf::custom_data_t, std::__1::default_delete<wf::custom_data_t> >::reset(wf::custom_data_t*) /usr/include/c++/v1/memory:2618:7
#9 0x6f4ca6 in wf::object_base_t::erase_data(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) /home/greg/src/github.com/WayfireWM/wayfire/build/../src/core/object.cpp:177:10
#10 0x8fa1418dc in animation_hook<zoom_animation>::stop_hook(bool) /home/greg/src/github.com/WayfireWM/wayfire/build/../plugins/animate/animate.cpp:111:15
#11 0x8fa115ede in cleanup_views_on_output(wf::output_t*) /home/greg/src/github.com/WayfireWM/wayfire/build/../plugins/animate/animate.cpp:146:42
#12 0x8fa118204 in wayfire_animation::fini() /home/greg/src/github.com/WayfireWM/wayfire/build/../plugins/animate/animate.cpp:308:9
#13 0xb7d243 in plugin_manager::destroy_plugin(std::__1::unique_ptr<wf::plugin_interface_t, std::__1::default_delete<wf::plugin_interface_t> >&) /home/greg/src/github.com/WayfireWM/wayfire/build/../src/output/plugin-loader.cpp:80:8
#14 0xb7bc98 in plugin_manager::reload_dynamic_plugins() /home/greg/src/github.com/WayfireWM/wayfire/build/../src/output/plugin-loader.cpp:217:13
#15 0xb859a5 in plugin_manager::plugin_manager(wf::output_t*)::$_0::operator()() const::'lambda'()::operator()() const /home/greg/src/github.com/WayfireWM/wayfire/build/../src/output/plugin-loader.cpp:42:47
#16 0xb8593c in decltype(std::__1::forward<plugin_manager::plugin_manager(wf::output_t*)::$_0::operator()() const::'lambda'()&>(fp)()) std::__1::__invoke<plugin_manager::plugin_manager(wf::output_t*)::$_0::operator()() const::'lambda'()&>(plugin_manager::plugin_manager(wf::output_t*)::$_0::operator()() const::'lambda'()&) /usr/include/c++/v1/type_traits:3539:1
#17 0xb858ec in void std::__1::__invoke_void_return_wrapper<void>::__call<plugin_manager::plugin_manager(wf::output_t*)::$_0::operator()() const::'lambda'()&>(plugin_manager::plugin_manager(wf::output_t*)::$_0::operator()() const::'lambda'()&) /usr/include/c++/v1/__functional_base:348:9
#18 0xb858bc in std::__1::__function::__alloc_func<plugin_manager::plugin_manager(wf::output_t*)::$_0::operator()() const::'lambda'(), std::__1::allocator<plugin_manager::plugin_manager(wf::output_t*)::$_0::operator()() const::'lambda'()>, void ()>::operator()() /usr/include/c++/v1/functional:1540:16
#19 0xb82fcd in std::__1::__function::__func<plugin_manager::plugin_manager(wf::output_t*)::$_0::operator()() const::'lambda'(), std::__1::allocator<plugin_manager::plugin_manager(wf::output_t*)::$_0::operator()() const::'lambda'()>, void ()>::operator()() /usr/include/c++/v1/functional:1714:12
#20 0x64a2cd in std::__1::__function::__value_func<void ()>::operator()() const /usr/include/c++/v1/functional:1867:16
#21 0x632844 in std::__1::function<void ()>::operator()() const /usr/include/c++/v1/functional:2473:12
#22 0x656f81 in wf::wl_idle_call::execute() /home/greg/src/github.com/WayfireWM/wayfire/build/../src/util.cpp:576:9
#23 0x656cbc in handle_idle_listener(void*) /home/greg/src/github.com/WayfireWM/wayfire/build/../src/util.cpp:459:11
#24 0x802904686 in wl_event_loop_dispatch (/usr/local/lib/libwayland-server.so.0+0xe686)
#25 0x80290197c in wl_display_run (/usr/local/lib/libwayland-server.so.0+0xb97c)
#26 0x62e1eb in main /home/greg/src/github.com/WayfireWM/wayfire/build/../src/main.cpp:393:5
#27 0x59fa5e in _start /usr/src/lib/csu/amd64/crt1_c.c:75:7
#28 0x8012d9007 (<unknown module>)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV (<unknown module>)
==55273==ABORTING
I can see how destroying the zoom animation plugin while the zoom animation is playing is a bad idea :D
I still have no clue why plugins are being reloaded… Probably my gsettings plugin causing config reload. Why would it do that specifically when closing qt dialogs? idk. QGnomePlatform somehow touching all dconf settings?? lol
Okay, so there's actually A LOT of stuff that doesn't like the config being reloaded in that time.
Changing zoom_animation
to use a name for the transformer like the other animation in that file (probably should be done anyway!? why doesn't the observer thing work hmm) AND disabling lots of plugins (vswitch,vswipe,expo,cube) avoids the crash. These plugins crash in various places like destruction of duration_t
derived classes, etc.
Soooo I guess trying to make everything compatible with the plugins being unloaded while an animation is playing is futile, and we really should make sure that "idle" means actually everything is idle, not just the wayland event loop!
UPD oh another thought. My reproducer for this is quite convoluted if you're not me: you need to have my gsettings plugin active, run FreeCAD (natively on wayland, which needs my fix in Coin that landed recently; git master if that matters; with modern ui plugin if that matters; with QGnomePlatform platformtheme which most likely matters), run the "open file" dialog and cancel it. What we really need to test robustness is a "chaos monkey" plugin that would hook into all the events and randomly decide to do various unexpected things like reloading the config and… and… other actions?
update: QGnomePlatform does not matter; commenting out change notification subscription in GSettings doesn't help. I guess it's actually Qt file-open dialog touching the wayfire ini file somehow?? maybe libinotify
not working exactly like linux inotify..
or it's inotify_add_watch(fd, config_dir.c_str(), IN_CREATE)
reacting to ~/.config/QtProject.conf
!!
(Wayfire shouldn't explode in this situation regardless, it's just interesting to find what causes it)
or it's
inotify_add_watch(fd, config_dir.c_str(), IN_CREATE)
reacting to~/.config/QtProject.conf
!!(Wayfire shouldn't explode in this situation regardless, it's just interesting to find what causes it)
Interesting, if the config file changed, we shouldn't updatee anything at all? Maybe here something is reacting to config-reload
, which should make it easy to find the real culprit.
plugin_manager::plugin_manager(wf::output_t*)::$_0::operator()() const::'lambda'()::operator()() const
idle_reaload_plugins.run_once([&] () {reload_dynamic_plugins(); });
reacting to the plugins
option change…
Oh, because reading it from the file is different than what wf-gsettings has set, and it's intentionally trying to unload all the things. Not "reload for some reason" *facepalm*
Ahhhh, I see. Then this is a duplicate of #682 :)
Hmm, actually, maybe not. Wayfire shouldn't crash even in this case ...
Should be fixed in #2142
Just crashed after accepting a dialog box in a Qt5 application (FreeCAD) using the return key.
This is all happening in destructors in
exit
?? After signal_handler caught a signal inreload_dynamic_plugins
?? I guess the real cause of the crash is obscured >_< I guess I should turn ASan back on.irrelevant trace
``` * thread #1, name = 'wayfire', stop reason = signal SIGSEGV * frame #0: 0x0000000000316bbe wayfire`wf::safe_list_t