Unresponsive CIFS mounts block unrelated I/O
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Expired
|
Medium
|
Unassigned |
Bug Description
If I have a CIFS mount, and then that mount's server goes down, other file operations on my client system block until the Samba server comes back up. This causes extremely weird behavior, things like right-click menus not disappearing, mouse clicks in X not working at all while keyboard input does work, plasma-desktop fails to finish loading its configuration, resulting in half-empty panels and no wallpaper, etc.
I will try to illustrate:
$ grep cifs /etc/fstab
//server/Downloads /mnt/downloads cifs user,guest,noauto
$ mount /mnt/downloads
$ dolphin /mnt/downloads
$ ssh root@server "service smbd stop"
$ lsof | grep downloads
lsof: WARNING: can't stat() cifs file system /mnt/downloads
Output information may be incomplete.
[lsof blocks here]
At this point, the weird bugs begin happening: Dolphin blocks when I right-click in its window. This leaves a blocked right-click menu (which is sometimes invisible, sometimes visible but empty, and sometimes a solid gray rectangle), and this blocked right-click menu grabs mouse clicks in X, preventing me from clicking anything else in X, while the keyboard continues working. At this point I kill Dolphin from a terminal using the keyboard, but plasma-desktop is still not responding to mouse clicks. So I kill and restart plasma-desktop from a terminal, but when it loads, it doesn't load completely, leaving a half-empty panel with missing applets, and no wallpaper--and still no response to mouse clicks.
But it's not all about X apps. Even /bin/df blocks. At one point, I wondered if my system had somehow run out of disk space, which can cause weird behavior, so I ran df. But df just sat there, with no output whatsoever.
And after all this, when I do:
$ ssh root@server "service smbd start"
Everything suddenly unblocks and works fine again.
It seems to me that having kernel CIFS mounts cause blocking in unrelated I/O is a major bug, potentially a security bug due to the denial-of-service issue. The way it causes an apparently inexplicable chain of weird behavior in all sorts of programs makes it very difficult to debug.
CIFS mounts are LAN mounts. It seems like a simple solution would be to have a very short timeout, 1-2 seconds or so. If it times out, just return an error and let the apps blocking on that I/O get on with what they're doing. The current behavior means that using kernel CIFS mounts is a recipe for disaster.
ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: linux-image-generic 3.13.0.24.29
ProcVersionSign
Uname: Linux 3.13.0-24-generic x86_64
NonfreeKernelMo
ApportVersion: 2.14.1-0ubuntu3.2
Architecture: amd64
AudioDevicesInUse:
USER PID ACCESS COMMAND
/dev/snd/
/dev/snd/
CurrentDesktop: KDE
Date: Tue May 27 06:44:22 2014
InstallationDate: Installed on 2010-05-20 (1467 days ago)
InstallationMedia: Kubuntu 10.04 LTS "Lucid Lynx" - Release amd64 (20100427)
IwConfig:
eth0 no wireless extensions.
lo no wireless extensions.
MachineType: System manufacturer System Product Name
ProcFB: 0 VESA VGA
ProcKernelCmdLine: BOOT_IMAGE=
RelatedPackageV
linux-
linux-
linux-firmware 1.127.2
RfKill:
SourcePackage: linux
UpgradeStatus: Upgraded to trusty on 2014-05-07 (20 days ago)
dmi.bios.date: 08/04/2009
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 0602
dmi.board.
dmi.board.name: P5Q PRO TURBO
dmi.board.vendor: ASUSTeK Computer INC.
dmi.board.version: Rev 1.xx
dmi.chassis.
dmi.chassis.type: 3
dmi.chassis.vendor: Chassis Manufacture
dmi.chassis.
dmi.modalias: dmi:bvnAmerican
dmi.product.name: System Product Name
dmi.product.
dmi.sys.vendor: System manufacturer
tags: | added: bios-outdated-0701 |
This change was made by a bot.