Bugzilla – Bug 206641
knetworkmanager deadlocks with kwallet
Last modified: 2007-07-12 12:14:39 UTC
When I log in to my KDE, the tray icon of knetworkmanager does not show up - there is just a gray space between other icons where it should be. After I log out and log in again, the icon is there.
Please try whether the following commands succeed when you encounter the described behavior at login: - `nm-tool` - `lshal`
I can't reproduce the problem, but it happens for me too. And this is no problem of dbus or networkmanager, but a dead lock with kwallet. (gdb) where #0 0xffffe410 in __kernel_vsyscall () #1 0xb716c2b3 in __read_nocancel () from /lib/libpthread.so.0 #2 0xb6c7986e in _kde_IceTransSocketRead () from /opt/kde3/lib/libDCOP.so.4 #3 0xb6c7953f in _kde_IceTransRead () from /opt/kde3/lib/libDCOP.so.4 #4 0xb6c7302f in _kde_IceRead () from /opt/kde3/lib/libDCOP.so.4 #5 0xb6c77b9f in KDE_IceProcessMessages () from /opt/kde3/lib/libDCOP.so.4 #6 0xb6c63429 in DCOPClient::callInternal () from /opt/kde3/lib/libDCOP.so.4 #7 0xb6c6370d in DCOPClient::callInternal () from /opt/kde3/lib/libDCOP.so.4 #8 0xb6c68157 in DCOPClient::call () from /opt/kde3/lib/libDCOP.so.4 #9 0xb6c6af96 in DCOPRef::callInternal () from /opt/kde3/lib/libDCOP.so.4 #10 0xb6c6b0ae in DCOPRef::callInternal () from /opt/kde3/lib/libDCOP.so.4 #11 0xb6c3220f in KWallet::Wallet::openWallet () from /opt/kde3/lib/libkwalletclient.so.1 #12 0xb67a7385 in KNetworkManagerStorage::credentials () from /opt/kde3/lib/libkdeinit_knetworkmanager.so #13 0xb67b2394 in KNetworkManagerStorage::networkProperties () from /opt/kde3/lib/libkdeinit_knetworkmanager.so #14 0xb67b26d8 in NetworkManagerInfo::getNetworkProperties () from /opt/kde3/lib/libkdeinit_knetworkmanager.so #15 0xb67b279c in NetworkManagerInfoDBus::getNetworkProperties () from /opt/kde3/lib/libkdeinit_knetworkmanager.so #16 0xb67b36bb in DBusConnection::networkManagerInfoMessageHandler () from /opt/kde3/lib/libkdeinit_knetworkmanager.so #17 0xb673162b in _dbus_object_tree_dispatch_and_unlock () from /usr/lib/libdbus-1.so.2 #18 0xb67245f7 in dbus_connection_dispatch () from /usr/lib/libdbus-1.so.2 #19 0xb675a333 in DBusQt::Connection::dispatchRead () from /usr/lib/libdbus-qt-1.so.1 #20 0xb675abce in DBusQt::Connection::qt_invoke () from /usr/lib/libdbus-qt-1.so.1 #21 0xb7500f1d in QObject::activate_signal () from /usr/lib/qt3/lib/libqt-mt.so.3 #22 0xb7501b7d in QObject::activate_signal () from /usr/lib/qt3/lib/libqt-mt.so.3 #23 0xb675b4e9 in DBusQt::Internal::Integrator::readReady () from /usr/lib/libdbus-qt-1.so.1 #24 0xb675b5cf in DBusQt::Internal::Integrator::slotRead () from /usr/lib/libdbus-qt-1.so.1 #25 0xb675b64a in DBusQt::Internal::Integrator::qt_invoke () from /usr/lib/libdbus-qt-1.so.1 #26 0xb7500f1d in QObject::activate_signal () from /usr/lib/qt3/lib/libqt-mt.so.3 #27 0xb7501a82 in QObject::activate_signal () from /usr/lib/qt3/lib/libqt-mt.so.3 #28 0xb783a8f0 in QSocketNotifier::activated () from /usr/lib/qt3/lib/libqt-mt.so.3 #29 0xb751f120 in QSocketNotifier::event () from /usr/lib/qt3/lib/libqt-mt.so.3 #30 0xb74a1f07 in QApplication::internalNotify () from /usr/lib/qt3/lib/libqt-mt.so.3 #31 0xb74a2cd1 in QApplication::notify () from /usr/lib/qt3/lib/libqt-mt.so.3 #32 0xb7b2ec23 in KApplication::notify () from /opt/kde3/lib/libkdecore.so.4 #33 0xb7496b44 in QEventLoop::activateSocketNotifiers () from /usr/lib/qt3/lib/libqt-mt.so.3 #34 0xb7451814 in QEventLoop::processEvents () from /usr/lib/qt3/lib/libqt-mt.so.3 #35 0xb74b8d28 in QEventLoop::enterLoop () from /usr/lib/qt3/lib/libqt-mt.so.3 #36 0xb74b8bbe in QEventLoop::exec () from /usr/lib/qt3/lib/libqt-mt.so.3 #37 0xb74a1abf in QApplication::exec () from /usr/lib/qt3/lib/libqt-mt.so.3 #38 0xb67b983d in kdemain () from /opt/kde3/lib/libkdeinit_knetworkmanager.so #39 0xb727c534 in kdeinitmain () from /opt/kde3/lib/kde3/knetworkmanager.so #40 0x0804e2ff in launch () #41 0x0804eb8a in handle_launcher_request ()
Adjusting summary.
Timo: there is a difference between "in kwallet" and "with kwallet" - this only happens with knetworkmanager
KNetworkmanager KWallet integration -> Will
I can reproduce this problem on my OpenSUSE 10.1 installation. And it does appear to be related to KWallet. If I clear the password on KWallet then it Knetworkmanager works as expected. But after about 10 - 15 reboots knetworkmanager no longer starts up. Resetting the password on KWallet (to nothing) again fixes the problem. Would love to know how to permanently fix!
Justin, there is a KNetworkManager update pending for 10.1. I have pushed the corresponding packages to http://beta.suse.com/private/thoenig/10.1/ . Please give them a try and report back they fix the issue. Thank you. Note: I do not expect the deadlock to be fixed as KNetworkManager now will just delay accessing KWallet until it really needs to access it.
Great! Thanks Timo. I've installed the update and will report back if this solves the problem after a 1 week of usage.
I an still seeing this behavior in release 0.1 Prerelease Using kde 3.5.5 release 45.2 fromm Opensuse. Often there will be several knetworkmanagers running in top, especially after a suspend too ram. One or more may be listed as defunct. Manually killing them all and reloading is needed before the icon will show up again. I have wallet passwords cleared to avoid this deadlock, but this sort of defeats the purpose of the wallet, no?
Thanks for commenting, John. Will, can you please give directions on how to debug this further? I'm not able to reproduce it -- John might be able to help us tracking this down.
Setting NEEDINFO
I had the problem yesterday and noticed something very interesting: there are two instances of knetworkmanager started very close together: one through session management and one from autostart. I think knetworkmanager should disable session management
Created attachment 111809 [details] knetworkmanager patch Disable session management.
Thanks for the patch Lubos.
*** Bug 166292 has been marked as a duplicate of this bug. ***
Moving to OS10.2. Fixed packages will be soon available for testing: * http://beta.suse.com/private/thoenig/10.2/bugzilla/206641
As mentioned in #238094 there will be an online update for KNetworkManager.
*** Bug 246633 has been marked as a duplicate of this bug. ***
What is the status on this? I know a large couple of people (not even including me) who are extremly annoyed by this bug... Did I miss a patch? If so, when was it published?
Still not resolved for me either - I'm using 10.2 with all the latest patches. Every time I unplug my router und plug it in again, this problem appears.
Created attachment 121147 [details] erroneous wallet access I get this message *every first login* after booting the system. This bug is definitely *not* resolved, so I will reopen it.
As mentioned above in comment #22: not resolved for me, nor is it resolved for many others. Ask my sister about what she thinks about this bug...
Daniel, Hans, could you please verify that only one instance of KNetworkManager is running at KDE startup. And have a look at the Debian bug report at [1]. It suggests to kill all instances of KNetworkManager, logout and login again. [1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=406162
#25 is a workaround for the deadlock, nothing else. I'm afraid I saw the problem again too - even if not seeing it for weeks ;( And I only had one instance running. Daniel, I don't know your sister, sorry.
Just a remark: I have the feeling that (K)NetworkManager related bugreports get closed all too quickly most of the time... And marking new bug reports as "Resolved Duplicates" of a "Resolved" one more than a month later is not very helpful either: I think you can assume that people who report here have their systems up2date. In reply to comment #25: since it happens right after logging in the first time after a reboot or so I usually help myself simply with a logout. The next time it works most of the time.
Same for me, logging out and in again solves the problem, but that is of course just an ugly hack.
Missed a thing in the Debian bug report mentioned in #25: ... I killed all instances of knetworkmanager, restarted one new instance of your test1 package, did KMenu -> Save Session, logged out/in, and now everything works fine. Feels indeed like something was left over from the session management of an earlier version. ...
Just wanted to drop a line to inform you that the latest update for knetworkmanager does not fix this issue for me.
I know I am quit annoying on this issue -- what is the status on this bug? Are there any plans to make NetworkManager ready for productive use? Or will it stay a nice buzzword on the boxes without actually working properly ;) Would be very nice to at least have the feeling that there will be improvements on this :)
Daniel, since I can not reproduce this issue (on none of the notebooks I have here) it is really difficult to fix. And, yes, I am working on it and hopefully we will get it in 10.3. Satisfied?
Yes, that would be nice :) I get the deadlock less frequently than some months ago, so there is hope. Though I would be more confident if the bug was tracked down and fixed in 10.2, too.
I made an (highly) experimental package which accesses the wallet in an asynchronous way (only wireless access for now). It is available in a few minutes for OpenSUSE 10.2 at [1]. Can somebody please verify if that approach fixes this annoying bug? Daniel, Hans? But note that this package is only for testing purposes and not for productive use. If it turns out that the deadlock can be prevented this way I will work on it further. [1] http://beta.suse.com/private/hschaa/bugzilla/206641/
Sorry, I just saw the link is broken ;-). I will post again if the package is really online.
Testpackage is now available :)
I'm not sure I will be able to test the package because I've recently upgraded to the latest KDE packages (3.5.6), and I haven't experienced those problems with knetworkmanager since then. However, I will give it a try, but maybe someone with the vanilla KDE could test it and post their experience?
Sorry for the delayed answer, I haven't been home at my laptop in a while. I will test the package as thoroughly as I can (with the exception of xine and some other multimedia packages my installation is totally clean and official, especially the kernel, KDE, powermanagement and the networking stuff).
OK, this weekend I've had problems with knetworkmanager again, so upgrading to KDE 3.5.6 didn't improve the situation. I've downloaded and installed the patch, and so far it looks as if it does improve the whole connecting thing. However, I will continue to test it this week and will report back next weekend.
I am running the patch for some days now and didn't have the problem. I did numerous reboot cycles and never saw any weird behavior. And most important: the patch does do no harm :) Everything still works.
*** Bug 262447 has been marked as a duplicate of this bug. ***
OK, I've tested the patch a dozen times and haven't experienced any problems so far. I guess that's the right direction and IMHO this patch should be released officially ASAP.
I fully agree. Haven't seen any problems ever since I installed the patch! Thank you very much!
Nice to hear that. I will investigate further onto the asynchronous approach and try to get it in 10.3. Thanks for testing Hans and Daniel.
*** Bug 270450 has been marked as a duplicate of this bug. ***
I installed the patch (via Yast online update), KNM sometimes still does not start correctly -- "empty" icon in place of KNM. In other words: it is just like before applying patch.
Maciej, the online update did not resolve this issue completely as Hans and Daniel already reported. Did you try the packages I mentioned in comment #34?
Helmut, I am terribly sorry, OU mentioned that patch solves problem with kwallet so I was convinced it is this one. I downloaded your package (thank you!), tested it already _a bit_, for now it looks good :-)
OK, so please try to get this package into 10.3. I guess we can close this bug then.
Fixed package is already in 10.3 Alpha 6. Thanks for closing Hans ;-)