knetworkmanager freezes if kwallet doesn't open immediately

Bug #69118 reported by Michael Blakeley
84
Affects Status Importance Assigned to Milestone
KDE Network
Fix Released
Medium
knetworkmanager (Ubuntu)
Fix Released
Undecided
Unassigned
Feisty
Won't Fix
Undecided
Unassigned
Gutsy
Fix Released
Undecided
Unassigned

Bug Description

I mostly use knetworkmanager with encrypted wifi networks, on a laptop (HP nc6400, 2-GB, edgy up-to-date per 'wajig daily-upgrade' 15 minutes ago). When I log in, I see a kwallet password prompt, asking if I'd like to allow knetworkmanager (or sometimes dcop) access.

When I type my password immediately, everything is fine. But I use session autoresume in kde, so sometimes various programs are launching and I can't immediately type in my password. When this happens, kwallet still appears to open ok, but knetworkmanager appears to freeze: its icon in the systray disappears, leaving just an empty square. Neither right-clicking nor left-clicking in that space does anything.

This problem has been discussed on the forums: http://ubuntuforums.org/showthread.php?t=280571

Next time this happens, I'll try to use strace or gdb to figure out what knetworkmanager thinks it's waiting for. If I get anything useful, I'll add it to this report.

Workaround: kill knetworkmanager, then use ALT-F2 to start it again.

$ pgrep -f knetworkmanager | xargs kill

$ apt-show-versions knetworkmanager
knetworkmanager/edgy uptodate 0.1-0ubuntu1

Revision history for this message
Michael Blakeley (mike+ubuntu) wrote :

After a little more research, this seems to be reported in suse, at https://bugzilla.novell.com/show_bug.cgi?id=206641 - sounds like a deadlock in the kwallet integration code.

There didn't seem to be an upstream report, so I've filed http://bugs.kde.org/show_bug.cgi?id=136469

Revision history for this message
Rob Hasselbaum (rhasselbaum) wrote :

Same problem here. Although I have the KWalletManager password set to blank, so I don't get prompted for it. But I sometimes get the same behavior in which there's just a blank icon in the tray and the connection does not start up. This happens about 1 out of every 5 boot-ups.

I have attached part of the syslog for one episode.

Revision history for this message
k3nt-1 (dugauthier) wrote :

+1
Exactly the same problem for me : The KDE wallet pops up while the knetworkmanager icon disappear and leave a blank space between surrounding icons.

Killing and restarting the application allows connecting. Not critical, but pretty annoying...

Revision history for this message
Angel D. Segarra (angel-segarra) wrote :

I'm having the exact same problem, in my case KnetworkManager locks up only when after bootup DCopserver tries to access the KDE Wallet, I blanked the password in the wallet but it still happens every once in a while. Killing the knetworkmanager process and restarting is what I do, not too bad but indeed deeply annoying.

Besides is there any reason for DCopserver to access the wallet every once in a while on boot-up?

Changed in kdenetwork:
status: Unknown → Unconfirmed
Revision history for this message
Anthony Mercatante (tonio) wrote :

There is a fix/workarround for that issue in the debian package. I just merged the patch for feisty.
I'll discuss today on #kubuntu-devel for an eventual backport.

Revision history for this message
Anthony Mercatante (tonio) wrote :

It's been decided to provide a SRU in a few days.
Closing this since it's fixed in feisty.

Changed in knetworkmanager:
status: Unconfirmed → Fix Released
Revision history for this message
Stefan Skotte (screemo) wrote :

I think there's still an issue on feisty.

I'm experiencing this very same once in every 2nd reboot or so. The knetworkmanager applet loads, but then disappears again.

Restarting of knetworkmanager allows you to connect to networks again.

Although I log out, and log in again it does not attempt to reconnect, but leaves me with no network connection ([ X]). Then I select my wireless, it connects and everything is fine.

I have no main password on kdewallet, and have saved the network key for my wireless wpa2 network in the wallet.

KDE 3.5.6, x86, latest updates.

Changed in kdenetwork:
status: Unconfirmed → Confirmed
Revision history for this message
Anthony Mercatante (tonio) wrote :

I'm adding the suggested desktop file fix.
Stefan, can you please confirm that resolves your problem ?

Revision history for this message
Stefan Skotte (screemo) wrote :

It seems to work now :)

I've tried several reboots, and I couldn't replicate the problem.

Good job !

Revision history for this message
Edu (martinez-bernal) wrote :

I'm having the same problem in feisty. It doesn't happens always. I login to kde directly with kdm and not resuming session. Instead, I have a knetwork manager icon in ~/.kde/Autostart

Changed in kdenetwork:
status: Confirmed → Fix Released
Revision history for this message
"Kosmonaut" Bernd Müller (bernado-tornado) wrote :

I can confirme that problem with Knetworkmanger, on an Acer 1355 and an IBM Thinkpad 60.

Revision history for this message
Edu (martinez-bernal) wrote :

The bug is not fixed for me :(
50% boots, knetworkmanager freezes before connect and the icon dissapears from the systray, leaving an empty space. I have to kill the process and start it again.
Kwallet is configured with no password and I usually connect to a WPA network.

Revision history for this message
Stefan Skotte (screemo) wrote :

Unfortunately this started to appear for me again also...

I'm using WPA2, and sometimes the applet just appear briefly, and then disappears again.

Seems like timing issues, although I dont think its possible to even control the order of applets in KDE :(

Revision history for this message
Guillaume Martres (smarter) wrote :

I can confirm that this bug is not fixed in Feisty and this is a major issue because Knetworkmanager will be the default for every new feisty installation, I reported it a month ago here: https://bugs.launchpad.net/ubuntu/+source/knetworkmanager/+bug/87284 and this seems to be fixed in knetworkmanager SVN now: http://bugs.kde.org/show_bug.cgi?id=136265#c3

Revision history for this message
Edu (martinez-bernal) wrote :

A temporal workaround...
1. Disable knetworkmanager Autostart setting.
2. Create this script in ~/.kde/Autostart
-------------------------------------
#!/bin/sh
sleep 15
/usr/bin/knetworkmanager &
exit 0
-------------------------------------
Change the sleep value if you want and make it executable.

It is not very beatiful, but at least works..

Revision history for this message
Anthony Mercatante (tonio) wrote :

The feisty version of KNM is patched not to restaure via session management and start via proper autostart rule in the desktop file.
People that still have issues have to empty the session restaure management "rm -rf /share/config/session" and be sure to kill the knm process so that it'll not be saved while loging out (other solution is to kill X and relog with empty config/session)
No issue on a proper feisty installation
KNM svn version would suffer the same issue since upgrading to this will not clean the session restaure cache.

Revision history for this message
Anthony Mercatante (tonio) wrote :

you can see the behavior in patches:
08-disable_sm.patch
10-configure_autostart.patch

Revision history for this message
Anthony Mercatante (tonio) wrote :

correct command to empty session management cache is : rm -rf ~/.kde/share/config/session
sorry for the bad copy/paste :)

Revision history for this message
crandrad (crandrad) wrote :

i report the same problem here, in a hp dv6000,with up-to-date feisty, the knetworkmanager freezes if kwallet is not ready yet

Revision history for this message
Edu (martinez-bernal) wrote :

Anthony, since I always start with a clean session in my computer, the problem has nothing to do with kde session handling.Anyway, I tried your suggestion but it didn't work.
I have in Autostart directory kopete, yakuake, kmix and two superkaramba widgets, (aphoto and zing). I've tried to start without kopete, but knetworkmanager still freezes sometimes.

Revision history for this message
Guillaume Martres (smarter) wrote :

So? What are you going to do? Release feisty with a buggued networking tool? Please don't do the same mistake that you did with Edgy, don't release a buggued version.

Revision history for this message
Guillaume Martres (smarter) wrote :

I've just noticed that when knetworkmanager freeze the application DCOPServer want to access to kwalletmanager. I also think that the more application you autostart the more you have chance that knetworkmanager freeze. It seems also that it freezes more when you use the session recovery that when you use ~/.kde/Autostart .

Revision history for this message
Michael (michaeljt) wrote :

I am experiencing this problem with Feisty. I am using KNetworkManager with an encrypted WPA network. Although I have been using it like this since Edgy, there is no knm_* entry in ~/.kde/share/config/session (I will still try emptying that directory of course). Usually when this occurs, I get a message about an application trying to access KWallet. I no longer remember the precise message, but I can add it next time it occurs. I did take a stack trace though last time this occurred before killing the KNetworkManager process:

#0 0xffffe410 in __kernel_vsyscall ()
#1 0xb7d08033 in read () from /lib/tls/i686/cmov/libc.so.6
#2 0xb6a35bee in ?? () from /usr/lib/libDCOP.so.4
#3 0x00000003 in ?? ()
#4 0x0808d078 in ?? ()
#5 0x00000008 in ?? ()
#6 0x0818e960 in ?? ()
#7 0xb7d80000 in ?? () from /lib/tls/i686/cmov/libc.so.6
#8 0xb6a3b844 in ?? () from /usr/lib/libDCOP.so.4
#9 0xbfbe2898 in ?? ()
#10 0xb6a3589f in _kde_IceTransRead () from /usr/lib/libDCOP.so.4
Backtrace stopped: frame did not save the PC

Is this any good to you, and if not, (how) can I supply you with a better one next time?

Revision history for this message
Manuel López-Ibáñez (manuellopezibanez) wrote :

You may try the steps described in https://wiki.ubuntu.com/DebuggingProgramCrash
Also, for all subscribers to this bug, Ubuntu is not the upstream of KNetworkManager. If you go directly to http://www.bugs.kde.org and report the bug there or reopen the upstream bug http://bugs.kde.org/show_bug.cgi?id=136469, there is a better chance that someone will get the feedback.

Revision history for this message
Michael (michaeljt) wrote :

I understand that of course, but as a general thing I prefer to report bugs in Ubuntu packages using the Ubuntu bug tracker as for example Ubuntu may have modified or patched the packages. After all, Ubuntu maintainers can always notify upstream once they have determined that the bug is not due to any changes they have made.

Revision history for this message
erlguta (gonzalomarcote) wrote :

I have the same bug in an Upgrade Feisty (hp pavilion laptop dv series) with kwallet and empty password (the most logical situation).
I am a little confused. I have empty the session restaure management "rm -rf /share/config/session" and be sure to kill the knm process. And it does not work.
I see that this bug is fixed...so Where is the package??? where is the patch?. I dont see any upgrade in feisty (or backports) for this bug.
fixed? WHERE???
Thank you and excuses my horrible english ;)

Revision history for this message
Rob Hasselbaum (rhasselbaum) wrote :

I can't point you to the specific patch, but I can say that I also have an HP Pavilion DV8000 series, and I have not had this problem since upgrading to Feisty. By contrast, it was happening very frequently under Edgy. FWIW, I am not using the Broadcom-based wi-fi that comes in the Pavilion; I have a separate wi-fi card. But I don't think that would make any difference.

Revision history for this message
Manuel López-Ibáñez (manuellopezibanez) wrote :

You can see what version you have installed with: dpkg -s knetworkmanager
The bug was supposed to be fixed in 0.1-ubuntu5
The command to empty the session cache is rm -rf ~/.kde/share/config/session
Is anyone experiencing this on an clean Feisty installation? Perhaps there is some problem with upgrading from Edgy.

Revision history for this message
barna (daniel-barna) wrote :

Hi,
For me dpkg -s knetworkmanager sais:
Version: 0.1-0ubuntu12
but still, I experience the same problem. It occurs randomly. I tried to modify /usr/share/autostart/knetworkmanager.desktop:
Exec=sleep 10s; knetworkmanager
but this did not help either. Any suggestions, where to find a working version? I think I will write a small program myself, which makes this job...
Thanks
D

Revision history for this message
Manuel López-Ibáñez (manuellopezibanez) wrote :

This problem exists in a clean Feisty installation.

Changed in knetworkmanager:
status: Fix Released → Confirmed
Revision history for this message
barna (daniel-barna) wrote :

It seems I managed to solve this problem. If kwalletmanager starts before knetworkmanager, things seem to be OK.
So I created a file /usr/share/autostart/kwalletmanager.desktop, which starts after panel

[Desktop Entry]
Encoding=UTF-8
Name=kwalletmanager
GenericName=Wallet Manager
Exec=kwalletmanager
Icon=network
Type=Application
X-KDE-autostart-after=panel
X-KDE-StartupNotify=false
X-KDE-UniqueApplet=true
X-DCOP-ServiceType=Unique
X-KDE-autostart-condition=kwalletrc:General:Autostart:true
Categories=Qt;KDE;Network;Applet;
X-Ubuntu-Gettext-Domain=desktop_kwalletmanager

 and I modified knetworkmanager.desktop such that it starts after kwalletmanager.desktop:
X-KDE-autostart-after=kwalletmanager

Most probably simply modifying knetworkmanager.desktop would also help (not tested...)
Exec=kwalletmanager; knetworkmanager

Revision history for this message
Guillaume Martres (smarter) wrote :

Man, it works! :) I've tested the two methods and the problem has magically disappeared, the only remaining issue is that at every boot, the kwalletmanager window pop up, anyway thank you!

Revision history for this message
barna (daniel-barna) wrote :

In the meantime I also changed to the second (simpler) solution, and also this works for me as well.

I have faced this problem very long time ago, other people submitted bug reports also. At every forum I saw posts from responsible persons saying that the problem has been fixed. However, this does not work even today. I am fed up monitoring forums and updates to see when it is *really* fixed. At the moment I am happy with this workaround solution. However, if anybody experiences that there is a *real* fix for this problem, please post a message to this thread so that we get a notification. Thanks.

Revision history for this message
erlguta (gonzalomarcote) wrote :

I think the same barna. This problem HAS NOT BEEN FIXED. I am surprised of which the solution is to install a "Fresh" install of Feisty. Thats a good solution for windows, but it is intolerable for linux. I never heard a no type of similar solution when i was in Debian.
My version of knetworkmanager is 0.1-0ubuntu12. And NO. I am not going to reinstall all my system for this package. It must be solved with one simple apt-get upgrade. So if it is fixed where is the upgrade?
Until that moment, thanks barna for your solution. It works for me too ;)

Revision history for this message
Manuel López-Ibáñez (manuellopezibanez) wrote :

Installing from scratch won't work either. I did it and I still get the problem from time to time.

Revision history for this message
Luka Renko (lure) wrote :

Upstream have recently change the kwallet code so it is now async and this may improve this. We just need to wait for 0.2 to be released.

Revision history for this message
Michael Blakeley (mike+ubuntu) wrote :

With knetworkmanager/gutsy uptodate 1:0.2~r674918-0ubuntu2, I haven't seen this problem yet.

Revision history for this message
Sarah Kowalik (hobbsee-deactivatedaccount) wrote :

Okay, marking as fix released - this seems fixed here too

Please reopen if anyone finds this happening again.

Changed in knetworkmanager:
status: Confirmed → Fix Released
Revision history for this message
Premier (premiersullivan) wrote :

I still seem to have this issue with kde 3.5.7 and feisty... should I reopen it?

Revision history for this message
Sarah Kowalik (hobbsee-deactivatedaccount) wrote :

Thanks taking the time to report this bug and helping to make Ubuntu better. However, I am closing it because the bug has been fixed in the latest development version of Ubuntu - the Gutsy Gibbon.

If you need a fix for the bug in previous versions of Ubuntu, please follow the instructions for "How to request new packages" at [WWW] https://help.ubuntu.com/community/UbuntuBackports#request-new-packages .

Changed in knetworkmanager:
status: New → Fix Released
status: Fix Released → Confirmed
Revision history for this message
Hew (hew) wrote :

Ubuntu Feisty Fawn is no longer supported, so a SRU will not be issued for this release. Marking Feisty as Won't Fix.

Changed in knetworkmanager:
status: Confirmed → Won't Fix
Changed in kdenetwork:
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.