Bug 496586

Summary: Endless loops of accesses to /dev/fd0 with kernel 2.6.30
Product: [Fedora] Fedora Reporter: Joachim Frieben <jfrieben>
Component: DeviceKit-disksAssignee: David Zeuthen <davidz>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: davidz, ingvar, itamar, jason, kernel-maint, mclasen, michal, mmilgram, pebolle, petersen, quintela, robatino, yaneti
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-07-01 15:08:01 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Joachim Frieben 2009-04-20 08:10:36 UTC
Description of problem:
After upgrading to the F12 development tree including a 2.6.30 RC2 kernel, the floppy disk drive on the system is accessed in an endless loop although not even a media is in the drive. 'dmesg' reveals a series of identical entries

  ...
  end_request: I/O error, dev fd0, sector 0
  end_request: I/O error, dev fd0, sector 0
  end_request: I/O error, dev fd0, sector 0
  end_request: I/O error, dev fd0, sector 0
  end_request: I/O error, dev fd0, sector 0
  end_request: I/O error, dev fd0, sector 0
  end_request: I/O error, dev fd0, sector 0
  ...

Version-Release number of selected component (if applicable):
kernel-2.6.30-0.58.rc2.git1.fc12.x86_64

How reproducible:
Always.

Steps to Reproduce:
1. Boot system.
  
Actual results:
The floppy disk drive is accessed over and over again.

Expected results:
No floppy disk activity.

Additional info:
- this used to work for kernel-2.6.29.1-100.fc11.x86_64.
- http://www.smolts.org/client/show/pub_ce3d646e-2918-44c9-a6c0-10fb3d9a0180

Comment 1 Joachim Frieben 2009-04-20 08:23:03 UTC
The delay between two attempts to access the floppy disk drive is exactly 2 secs, so there might happen some interference between a system timer and the floppy device.

Comment 2 Joachim Frieben 2009-04-20 08:34:13 UTC
Disk access cycle starts upon logging into GNOME. However, it does not stop upon terminating the GNOME session but it does so after switching to run level 1.

Comment 3 Chuck Ebbert 2009-04-21 19:38:10 UTC
Does running the command 'hal-disable-polling' make it stop?

Comment 4 Joachim Frieben 2009-04-22 09:00:16 UTC
No, it doesn't, and the command 'hal-disable-polling --device /dev/fd0' returns:

  "Polling is already disabled on the given drive."

Comment 5 Joachim Frieben 2009-04-22 09:08:47 UTC
While the initial bug report report had been posted for the current F12 development tree, the system has been reverted to F11 in the meantime and kernel 2.6.30-0.58.rc2.git1.fc12.x86_64 installed alongside with kernel-2.6.29.1-104.fc11.x86_64.
In addition to the floppy disk issue, it is now not even possible to open a GNOME terminal. A corresponding error message appears in .xsession-errors reporting a failure when trying to connect to /tmp/ibus-$USER/ibus-unix-0 (No such file or directory).

Comment 6 Joachim Frieben 2009-04-24 09:17:04 UTC
- Issue persists for kernel 2.6.30-0.66.rc3.fc12.x86_64.
- Adding 'noapic' to the kernel boot options does not improve things either.
- File /proc/interrupts exhibits a related entry:

     "6:         39   IO-APIC-edge      floppy"

  after a short uptime which is absent for kernel 2.6.29.1-103.fc11.x86_64.
  So, somehow spurious interrupts seem to be triggered.

Comment 7 Joachim Frieben 2009-04-28 06:41:47 UTC
Same issue for kernel 2.6.30-0.72.rc3.git3.fc12.i686.PAE on a different Intel P4 system. The physical presence of a floppy disk drice is not required to trigger the /dev/fd0 error message. Again, a new GNOME terminal window will disappear instantaneously. The "rawhide" kernel 2.6.29.1-111.fc11.i686.PAE behaves correctly in these respects.

Comment 8 Joachim Frieben 2009-05-16 19:13:13 UTC
No improvement for kernel-2.6.30-0.81.rc5.git1.fc12.x86_64.

Comment 9 Joachim Frieben 2009-05-16 19:59:10 UTC
No problem after installing the latest Ubuntu 9.10 snapshot for AMD64. Here, 'uname -r' returns 2.6.30-5-generic.

Comment 10 Bug Zapper 2009-06-09 14:11:22 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 11 Michal Jaegermann 2009-06-09 16:47:55 UTC
At least with 2.6.30-0.97.rc8.fc12.x86_64 from the current rawhide the picture is more complicated than the above comments would suggest.

1. Booting to level 3, with or without media in a floppy drive does NOT light up a floppy activity LED.  /dev/fd0 is there and floppy is mountable from a command line without any issues.

2. That LED lights up only during a startup of a desktop session.  Once there it  stays on and drive without media is making pretty unhealthy clicking noises. Logging out and taking a machine to level 3 does not extinguish this light but going all the way to level 1 eventually it does. One may see a stream of repeating messages "end_request: I/O error, dev fd0, sector 0", possibly interspersed with "VFS: busy inodes on changed media or resized disk fd0",
and one that starts it does not stop but this does not always show up and I cannot tell what triggers it.

3. While in a desktop session attempts to open a "Computer" window fail and result in the following in logs:

gvfsd-computer[2897]: segfault at 0 ip 00007fb5874a3e0a sp 00007fffe0de5b48 error 4 in libc-2.10.1.so[7fb587425000+164000]
gvfsd-computer[2899]: segfault at 0 ip 00007f73368bee0a sp 00007fff58117288 error 4 in libc-2.10.1.so[7f7336840000+164000]
gvfsd-computer[2902]: segfault at 0 ip 00007f47dfda1e0a sp 00007fff2a65f1d8 error 4 in libc-2.10.1.so[7f47dfd23000+164000]
gvfsd-computer[2904]: segfault at 0 ip 00007fbc00018e0a sp 00007fffa83e8cd8 error 4 in libc-2.10.1.so[7fbbfff9a000+164000]

4. Even with a floppy drive "busy" a floppy remains mountable and running
'gnome-mount' in terminal window results in the following:

$ gnome-mount -t -v -d /dev/fd0
gnome-mount 0.8
** (gnome-mount:2860): DEBUG: Will attempts methods on drive object
** (gnome-mount:2860): DEBUG: Mounting /org/freedesktop/Hal/devices/platform_floppy_0_storage_platform_floppy
GConf Error: Bad key or directory name: "/system/storage/default_options/(null)/fstype_override": `(' is an invalid character in key/directory names
** (gnome-mount:2860): DEBUG: Mounting /org/freedesktop/Hal/devices/platform_floppy_0_storage_platform_floppy with mount_point='', fstype='', num_options=1
** (gnome-mount:2860): DEBUG:   option='uid=400'
Mounted /dev/fd0 at "/media/disk"

That action drops a floppy icon on a desktop and a floppy is accesible and,
albeit really slow, browsable (with its LED on all the time).  OTOH attempts to use floppy menu to unmount that bring such alerts:

Unable to unmount disk
/sbin/umount.hal: /media/disk is not recognized by hal

OTOH 'gnome-umount' gives this:

$ gnome-umount -t -v -d /dev/fd0
gnome-mount 0.8
** (gnome-umount:2962): DEBUG: Will attempts methods on drive object
** (gnome-umount:2962): DEBUG: Unmounting /org/freedesktop/Hal/devices/platform_floppy_0_storage_platform_floppy
** (gnome-umount:2962): DEBUG: Setting up 750ms timer for Flushing Cache dialog
** (gnome-umount:2962): DEBUG: in unmount_done : user_data = 0x0
Unmounted /dev/fd0

and the icon disappears.

5. Rebooting to 2.6.29.4-167.fc11.x86_64 immediately cuts all this nonsense but this apparently because /dev/fd0 is not there and a floppy is simply non-accessible.  Radical but not that useful.

Comment 12 Noura El hawary 2009-06-09 21:48:18 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 13 Michal Jaegermann 2009-06-09 22:00:15 UTC
As noted in comment #11 this bug applies to the current _rawhide_.  It is possible, which I have no way to check in this moment, that with F11 a floppy would be not recognized at all.  That would replace there this bug with another one and arguably even worse.

Comment 14 Ingvar Hagelund 2009-06-10 20:18:47 UTC
I can confirm this bug on kernel 2.6.29.4-167.fc11.i586 on a system just upgraded from F10 to F11. The behaviour is identical. Something is trying to access fd0 every second second, filling the syslog with "end_request: I/O error, dev fd0, sector 0".

Running hal-disable-polling has no effect.

# hal-disable-polling --device /dev/fd0
Polling is already disabled on the given drive.

The problem starts after starting a gnome session.

Comment 15 Paul Bolle 2009-06-11 11:54:55 UTC
Since I want to be CC'ed on this I'd might as well  give some further data:
- not seen on kernel-2.6.29.2-126.fc11.i586, kernel-2.6.29.3-155.fc11.i586 and kernel-2.6.29.4-167.fc11.i586;
- first seen on kernel-2.6.30-0.97.rc8.fc12.i586 (but do note that this package was installed with almost a gigabyte worth of other packages - somehow the release of F11 triggered a major upgrade to F12 yesterday, on a machine that is tracking Rawhide);
- on a ThinkPad T41 without any floppy whatsoever;
- the link to the gnome session, made in comment #14, does _look_ plausible (haven't investigated yet);
- trivial workaround is to blacklist the floppy module.

Comment 16 Yanko Kaneti 2009-06-11 12:16:08 UTC
AFAICS its caused by the devkit-disks polling of /dev/fd0 which behaves differently with 29 and 30 kernels.
devkit-disks --inhibit-polling /dev/fd0 
as the current console user works for me to stop it.

devkit-disks goes like 
....
open("/dev/fd0", O_RDONLY)              = -1 ENXIO (No such device or address)
poll([{fd=3, events=POLLIN}], 1, 1974)  = 0 (Timeout)
...
each second

Comment 17 Paul Bolle 2009-06-11 12:25:58 UTC
(In reply to comment #15)
> - the link to the gnome session, made in comment #14, does _look_ plausible
Trivial test: this doesn't occur in runlevel 3. (Only a few instances of this message are seen somewhere early in the boot sequence.)

(In reply to comment #16)
> each second
For what it's worth, I got these messages about every twelve seconds: slow machine?

Comment 18 Jens Petersen 2009-06-12 03:20:56 UTC
I started seeing this after upgrading from f11 to f12 rawhide today
with kernel-2.6.30-0.97.fc8.fc12.i586.

The fdo polling errors start soon after logging into gnome.

Booting into f11 kernel and everything is fine again.

Comment 19 Yanko Kaneti 2009-06-12 08:04:03 UTC
Actually the difference between 29 and 30 is that with 29 the floppy module doesn't get autoloaded and with 30 it does.
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=83f9ef463bcb4ba7b4fee1d6212fac7d277010d3

loading the floopy module under 29 leads to devkit-disks doing the same polling loop. 
This should probably be moved to DeviceKit-disks

Comment 20 Chuck Ebbert 2009-06-12 16:27:38 UTC
*** Bug 505417 has been marked as a duplicate of this bug. ***

Comment 21 Joachim Frieben 2009-07-01 07:32:08 UTC
Issue now also appears on F11 after upgrading to kernel 2.6.29.6-209.rc1.fc11. Unloading module "floppy" allows to stop accesses to /dev/fd0 successfully.

Comment 22 Yanko Kaneti 2009-07-01 08:47:12 UTC
Actual attempts to fix this one are tracked in bug 489083  so perhaps this one should be marked a dup.

Comment 23 Joachim Frieben 2009-07-01 15:08:01 UTC

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