https://bugs.kde.org/show_bug.cgi?id=432643
Tomasz Lemiech <szpaj...@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |szpaj...@gmail.com --- Comment #21 from Tomasz Lemiech <szpaj...@gmail.com> --- Same thing here. Gentoo, no systemd, plasma-workspace-5.22.5, kdeconnect-21.04.3. Here is what happens: - ksmserver sends SmsDie to its clients (including kdeconnectd) - kdeconnectd exits correctly and immediately gets restarted via dbus (requested by plasmashell) - the new kdeconnectd instance connects to ksmserver with a new client ID - ksmserver wants to kill it, but SmsDie times out (here comes the 10-sec delay) - finally everything quits. So it's not the original kdeconnectd process which is causing the problem, but the new one, which came up after the first one exited. Presumably it's a race condition of some sort - the process might not yet be ready to handle messages from ksmserver (or maybe the message callbacks are not yet registered). Never mind - at this stage it does not respond to SmsDie. Given the fact that ksmserver was about to shut down itself and was in the process of killing its clients, I think it shouldn't have accepted the new client in the first place. Otherwise if the new client had responded to SmsDie properly, it could have been restarted once again and in theory this could loop multiple times preventing ksmserver from emptying its client list completely. Attached patch (ksmserver_reject_new_clients_when_in_killing_state.diff) does what the file name says. Works for me, no more hangs on exit. Logs before (note the different client IDs of the initial kdeconnectd instance and the one which fails to respond to SmsDie): org.kde.kf5.ksmserver: New client properties: "/usr/lib64/libexec/kdeconnectd" ( 10e0656c69000163664139800000190510004 ) org.kde.kf5.ksmserver: New client properties: "/usr/lib64/libexec/kdeconnectd" ( 10e0656c69000163664139800000190510004 ) org.kde.kf5.ksmserver: New client properties: "/usr/lib64/libexec/kdeconnectd" ( 10e0656c69000163664139800000190510004 ) org.kde.kf5.ksmserver: New client properties: "/usr/lib64/libexec/kdeconnectd" ( 10e0656c69000163664139800000190510004 ) (...) org.kde.kf5.ksmserver: Starting killing clients (...) org.kde.kf5.ksmserver: startKilling: client "/usr/lib64/libexec/kdeconnectd" ( 10e0656c69000163664139800000190510004 ) (...) org.kde.kf5.ksmserver: We killed all clients. We have now clients.count()= 7 (...) org.kde.kf5.ksmserver: New client properties: "/usr/lib64/libexec/kdeconnectd" ( 10e0656c69000163664141600000190510008 ) org.kde.kf5.ksmserver: New client properties: "/usr/lib64/libexec/kdeconnectd" ( 10e0656c69000163664141600000190510008 ) org.kde.kf5.ksmserver: New client properties: "/usr/lib64/libexec/kdeconnectd" ( 10e0656c69000163664141600000190510008 ) org.kde.kf5.ksmserver: New client properties: "/usr/lib64/libexec/kdeconnectd" ( 10e0656c69000163664141600000190510008 ) org.kde.kf5.ksmserver: SmsDie timeout, client "/usr/lib64/libexec/kdeconnectd" ( 10e0656c69000163664141600000190510008 ) Logs after (the new kdeconnectd instance tries to connect but gets rejected): org.kde.kf5.ksmserver: New client properties: "/usr/lib64/libexec/kdeconnectd" ( 10e0656c69000163664088900000157090004 ) org.kde.kf5.ksmserver: New client properties: "/usr/lib64/libexec/kdeconnectd" ( 10e0656c69000163664088900000157090004 ) org.kde.kf5.ksmserver: New client properties: "/usr/lib64/libexec/kdeconnectd" ( 10e0656c69000163664088900000157090004 ) org.kde.kf5.ksmserver: New client properties: "/usr/lib64/libexec/kdeconnectd" ( 10e0656c69000163664088900000157090004 ) (...) org.kde.kf5.ksmserver: Starting killing clients (...) org.kde.kf5.ksmserver: startKilling: client "/usr/lib64/libexec/kdeconnectd" ( 10e0656c69000163664088900000157090004 ) (...) org.kde.kf5.ksmserver: We killed all clients. We have now clients.count()= 11 (...) org.kde.kf5.ksmserver: Connection rejected: ksmserver is shutting down -- You are receiving this mail because: You are watching all bug changes.