Bug 194196 - Panel freezes and krunner stops working when NFS mount disconnects
Summary: Panel freezes and krunner stops working when NFS mount disconnects
Status: RESOLVED DUPLICATE of bug 184062
Alias: None
Product: plasma4
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-26 20:20 UTC by David Jarvie
Modified: 2010-05-22 01:11 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Full screen dump after removing plasmarc, plasma-appletsrc and restarting plasma (18.61 KB, image/png)
2009-06-20 16:40 UTC, David Jarvie
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Jarvie 2009-05-26 20:20:33 UTC
Version:            (using KDE 4.2.3)
Compiler:          gcc 4.3 
OS:                Linux
Installed from:    Compiled From Sources

Every so often (approximately every hour or three), without any obvious trigger, the panel freezes, and krunner doesn't activate when Alt-F2 is pressed. The panel freezes in the sense that it is still displayed at the bottom of the screen, but doesn't respond in any way either to mouseovers or to clicks. The desktop background is still displayed. Shortcut keys to page between desktops still work.

Killing plasma and re-running it from the command line doesn't work - the background stays white and the panel doesn't show, and krunner still doesn't appear with Alt-F2.

I'm on Debian Lenny, on a laptop.
Comment 1 Marco Martin 2009-05-26 21:36:25 UTC
what are the widgets loaded?
Comment 2 David Jarvie 2009-05-27 10:33:03 UTC
I have a blank desktop apart from the panel. In the panel, there is a clock, desktop pager, task bar, system tray, Kicker and a few application icons.
Comment 3 Aaron J. Seigo 2009-05-27 15:46:12 UTC
krunner and plasma are two different processes. so if both aren't responding, that's rather odd indeed.

as for krunner not showing on alt-f2, is it actually running? if so, is kded deadlocked up? alt-f2 requires dbus, kded4 (where the global shortcuts are coordinated) and krunner to all be responsive.

when plasma "freezes" like this is there 100% cpu usage? is there a modal dialog showing on one of the desktops that might be blocking the rest of plasma?
Comment 4 David Jarvie 2009-05-30 16:39:52 UTC
krunner is definitely running, but Alt-F2 does nothing. 'top' shows no processes which are taking more than 2% CPU, and the system is perfectly responsive (dual processor, though). I don't know how to judge the status of kded - if you can tell me what to check for, I'll report back the next time it happens.

When it happened today, there had been a kmail search dialog results page open, which I couldn't find after the panel freeze, but after closing kmail, 'ps' didn't show any kmail processes running any more, so I suspect that's a red herring. There was no other application which I'd been using which would have produced a dialog as far as I know.

I forgot to mention that there is a battery monitor in the panel also.
Comment 5 David Jarvie 2009-06-15 15:57:18 UTC
It turns out that aborting my KDE session (using Ctrl-Alt-Backspace) and logging in again still doesn't restore the panel and background. My panel is not auto-hide, but when I log in again, windows are displayed full screen height - so the panel size isn't even accounted for in sizing the desktop.
Comment 6 Aaron J. Seigo 2009-06-16 07:29:54 UTC
very odd; it really sounds like something is deadlocking somewhere?

if you move ~/.kde/share/config/plasmarc and ~/.kde/share/config/plasma-appletsrc away (e.g. temporarily into ~/ so you can move them back or post them here, as the case may be) and restart plasma does that help anything?
Comment 7 Aaron J. Seigo 2009-06-16 07:35:43 UTC
very odd; it really sounds like something is deadlocking somewhere?

if you move ~/.kde/share/config/plasmarc and ~/.kde/share/config/plasma-appletsrc away (e.g. temporarily into ~/ so you can move them back or post them here, as the case may be) and restart plasma does that help anything?

hm.. one other thing occurs to me if it's both krunner and plasma: perhaps they are deadlocking in the shared pixmap cache? that'd be odd,t hough, since i'd expect to see that also happen in the case of the icon cache. hmmmm...

perhaps when it's frozen you could attach a gdb instance to the plasma process and see where it's hung?
Comment 8 David Jarvie 2009-06-20 16:38:32 UTC
I tried to attach gdb, but it didn't come back with any prompt. I typed 'gdb /opt/kde4/bin/plasma 5132' (where 5132 was plasma's PID), and it came back with the normal gdb startup messages ending with 'Attaching to process 5132', but it just sat there for 5 minutes and didn't produce a prompt or respond to input. I'm not a gdb expert, so that's as far as I got.

I moved plasmarc and plasma-appletsrc and restarted plasma. It did display a new panel and screen background (attached), but as you can see they are not right, and they don't respond to mouse clicks. No new plasmarc or plasma-appletsrc have been created.
Comment 9 David Jarvie 2009-06-20 16:40:04 UTC
Created attachment 34684 [details]
Full screen dump after removing plasmarc, plasma-appletsrc and restarting plasma
Comment 10 David Jarvie 2009-06-20 17:04:01 UTC
This time, I tried restarting kdm and logging in again (after reinstating plasmarc and plasma-appletsrc), but plasma still didn't work. Rebooting is the only way I have so far found to make things work properly again.
Comment 11 David Jarvie 2009-06-22 01:24:01 UTC
At last I've discovered what seems to be triggering the problem. I have some directories on another computer mounted as NFS mounts. The panel freeze occurred just now when I disconnected the other computer from the network. Normal panel service was restored when I reconnected it. I can't say for certain that this is always the trigger, but it seems quite likely since the other computer will often have been shut down while mine is still running.

The question is why the panel is sensitive to this, but other applications are not.
Comment 12 Emil Ljungdahl 2009-07-08 21:43:09 UTC
I can confirm this bug, and that it is caused by an inaccessible NFS mount.

A "umount -f /mnt/point" will bring everything back to normal.

The problem has been there since at least KDE 4.1.

KDE 4.3RC1, Kubuntu 9.04, AMD64, Core 2 Duo
Comment 13 Elias Probst 2009-07-27 11:01:32 UTC
I can confirm this issue on KDE 4.2.4
Comment 14 Andrew M 2009-08-19 13:24:03 UTC
Still happens in 4.3.0

I think this deadlocking is actually by design. Read up on NFS mount options 'hard' and 'soft'.

It seems hard is default. When hard is enabled and the NFS server is no longer available it will hard lock the client process until it is available again. This is meant to prevent data corruption as the client app will see it as if nothing happened. I don't know how applicable this is with today's programs where I hope that programmers don't make stupid assumptions about bulletproof file access.

Now for the actual bug we have here with Plasma and Krunner. These really shouldn't be needing to access an NFS mount in the first place unless requested by the user or a plasmoid needs to (eg: folder view)
Comment 15 David Jarvie 2009-08-19 18:03:07 UTC
And even if Plasma and KRunner do need to access an NFS mount (and I agree they shouldn't access it unless they have a specific need to), they shouldn't just freeze up without any indication as to why. It took me several months to discover the reason.
Comment 16 Dario Andres 2009-08-19 19:04:39 UTC
Hi, isn't this related to bug 184062 ? Thanks
Comment 17 Andrew M 2009-08-20 14:58:52 UTC
(In reply to comment #16)
> Hi, isn't this related to bug 184062 ? Thanks

Yes it seems, but how do I report it? I can't find a "report duplicate" link
Comment 18 Dario Andres 2009-08-20 15:00:33 UTC
(In reply to comment #17)
> (In reply to comment #16)
> > Hi, isn't this related to bug 184062 ? Thanks
> 
> Yes it seems, but how do I report it? I can't find a "report duplicate" link

If the reporter of the bug also agrees on this, he can mark it as duplicate. (I can do it too) Thanks
Comment 19 Jiri Kanicky 2009-10-04 11:23:42 UTC
Hi.
I would like to express my feelings in regards to this bug.
This bug was in earlier versions of KDE. It was fixed and now again.

Why plasma freezes when my NFS share gets disconnected? This must be really bad design when something like that happens. KDE is definitely not improving a bit. Dolphin is slow as a hell. It seems that the most important is not speed and stability today, but how many features do we have.

Please make KDE fast and stable.
Comment 20 Thomas Kallenberg 2009-10-11 13:31:04 UTC
This bug is still there in 4.2.3. Plasma-desktop also locks with smb mounts when they can't be found anymore. Dolphin also locks up. if you attach strace to the process of plasma-desktop plasma works again for a few seconds until this comes:  

lstat("/media/xxxxx", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("//smbserver/directory", 0x7fffe72c3610)  = -1 ENOENT (No such file or directory)
lstat("/localdir/directory" (stops here does nothing.

cheers
Comment 21 Aaron J. Seigo 2010-05-22 01:11:30 UTC

*** This bug has been marked as a duplicate of bug 184062 ***