Mailinglist Archive: opensuse-bugs (4691 mails)

< Previous Next >
[Bug 581585] New: plasma desktop (KDE4) freezes during the free cluster scan on vfat removable partitions
  • From: bugzilla_noreply@xxxxxxxxxx
  • Date: Sat, 20 Feb 2010 13:16:32 +0000
  • Message-id: <bug-581585-21960@xxxxxxxxxxxxxxxxxxxxxxxx/>

Summary: plasma desktop (KDE4) freezes during the free cluster
scan on vfat removable partitions
Classification: openSUSE
Product: openSUSE 11.2
Version: Final
Platform: i586
OS/Version: openSUSE 11.2
Status: NEW
Severity: Normal
Priority: P5 - None
Component: KDE4 Workspace
AssignedTo: kde-maintainers@xxxxxxx
ReportedBy: rfb@xxxxxxxxxx
QAContact: qa@xxxxxxx
Found By: ---
Blocker: ---

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:
Gecko/20091222 SUSE/3.5.7-1.1.1 Firefox/3.5.7

Unless a removable device with a vfat file system is mounted with the "usefree"
option the system performs a scan of the whole vfat filesystem to determine the
actual free cluster value immediately after the actual mounting of the device.
This is done, because Windows might not update the value correctly. By using
the "usefree" option the scan is not performed and the free cluster value from
the file systems meta data is trusted.

During the scan, which is done by default, the KDE4 desktop (panel and "click
activity" on the background) freeze. The applications work normal if by change
they have the focus. Also, the window manager allows to change focus between
the applications on a given virtual desktop, but switching to another desktop
is typically not possible, because all panel activity is blocked.

The freeze doesn't start immediately at the moment the mount is performed and
the free cluster scanning is started. There is some kind of "buildup" (see
below). If then the freeze sets in and by coincidance a desktop component like
the device notifier panel or the background context menu is up, which grabs the
focus completely, the freeze is total an lasts until the disk scanning is over.

There are strong indications, that the phenomenon has to do with the kernel
based filesystem event notification mechanism (inotify). It seems that the
scanning of the vfat partition generates an event storm which after a few
seconds floods KDEs event handling system completely, which then leads to the
starvation of the corresponding mouse events. It is not clear whether the
problem is that KDE4 is not protecting itself enough against event flooding or
whether the vfat scanning is violating principles with respect to inotify. All
attemps to produce equally bad event storms with various forms of filesystem
activities on ext3 and ext4 filesystems have failed and it looks as if the bad
behavior might be attributed to the vfat software.

The problem can easily be reproduced. All it takes is a removable vfat device
with enough data on it such that the partition scan lasts long enough. The
problem is avoided by mounting the partition with "-o usefree". One solution is
to mount the device by hand. Because mount options for removable devices when
mounted through the device notifier cannot be set by configuration means
anymore in the installation in question, a workaround is attached, such that a
vfat device again can be mounted in the usual comfortable way but with the
usefree option set. It consist of replacing /usr/lib/hal/hal-storage-mount
(which is called by hald upon mounting) by a bash scripts wich adds the usefree
option when the binary hal-storage-mount is called.

The phenomen has been observed by other users, too as discussed in a german

At least one of the users has applied the workaround successfully. Probably
many users know about the phenomenon but can live with it, because the freeze
only takes a few seconds. On the other hand, on vfat devices with several
hundred directories and files, freezes that last more than a minute have been

The behavior was present in opensuse 11.1, too.

Reproducible: Always

Steps to Reproduce:
Assuming the vfat usb disk (or stick) with enough data gets /dev/sdb1 assigned,
do this:

mount -t vfat -o usefree /dev/sdb1 /mnt
umount /mnt
mount -t vfat /dev/sdb1 /mnt
umount /mnt
After each mount change to a different virtual desktop once every second.
Actual Results:
Each time the device is mounted without -o usefree, the destop switching gets
blocked until the disk scan is over.

To find out how long the disk scan lasts, keep the focus on the shell you issue
the mount command and do the umount immediately. The filesystem will be "busy"
as long as the scan takes place. By the way, the device is accessible for
reading during the scanning.

Expected Results:
The desktop switching should not be hindered by the disk scan. The desktop
switching stands for any mouse activities involving the plasma desktop,
especially the panel, but not mouse events which belong to the applications or
the window manager.

Configure bugmail:
------- You are receiving this mail because: -------
You are on the CC list for the bug.

< Previous Next >
Follow Ups