Bug 98202

Summary: after nautilus, mount of floppy with device name gives error when mount succeeds
Product: [Retired] Red Hat Linux Reporter: Don Himelrick <dch>
Component: util-linuxAssignee: Elliot Lee <sopwith>
Status: CLOSED NOTABUG QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 9CC: alexl
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-08-20 18:42:09 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:
Attachments:
Description Flags
strace of mount after using nautilus none

Description Don Himelrick 2003-06-27 21:41:50 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225

Description of problem:
Bear with me this is complicated :)  This bug might need to be assigned to
nautilus, because this only seems to happen after nautilus tries to mount the
floppy from the gui.

Mounting a floppy, the first time after inserting it into the drive, using the
device name, gives the error message 

/dev/fd0: Invalid argument   (The mount succeeds, however)

This always happens the first time when using nautilus.

On the command line, this only happens when:
- Nautilus was last used to try to mount the floppy.
      AND
- Its the first time after inserting the disk.
      AND
- I use the device name, not the mount point, as the option to mount.
  
  mount /dev/fd0      <-  This raises an error

  mount /mnt/floppy   <-  This does not raise an error

After the initial error, you can mount and umount to your heart's content with
no errors.

This does not happen as root.

Things that make it go away (on the command line)
  1) mount and umount the floppy
  2) umount the floppy when the floppy is not mounted, but after nautilus was
the last program to try to mount the floppy.

To make it happen again, just right-click on the gui desktop and choose
disks->floppy from the menu.

Version-Release number of selected component (if applicable):
mount-2.11y-9

How reproducible:
Always

Steps to Reproduce:
1.See above

Comment 1 Don Himelrick 2003-06-27 21:46:32 UTC
Created attachment 92660 [details]
strace of mount after using nautilus

This is an strace of "mount /dev/fd0" after using nautilus to mount and umount
a floppy disk.	I don't know why, but the mount doesn't succeed when doing the
strace.  The strace does have some "invalid argument" errors in it though.

Comment 2 Elliot Lee 2003-07-30 21:05:37 UTC
Yuk. An obscure bug that sounds real & reproducible.

Comment 3 Elliot Lee 2003-08-13 21:18:27 UTC
Alex, any ideas from the nautilus side?

Comment 4 Alexander Larsson 2003-08-14 08:02:24 UTC
Wow. bizarre bug.

The reason it fails under strace is (i think) that the whole setuid thing
doesn't work for straced processes. You'd have to test it as root with strace
(but then the problem goes away!).

Upfront i have no idea what is causing it. It needs some further study.

Comment 5 Elliot Lee 2004-08-20 18:42:09 UTC
Sighted with FC3 devel tree. 

What happens is that mount tries to guess the fstype, but it's a bad
floppy so you see that I/O error message. However, the mount itself
still succeeds. The problem happens for me with both 'mount /dev/fd0'
and 'mount /mnt/floppy' - I'm guessing in your case it was just the
timing of commands rather than the exact command line itself.

Anyways, use a good floppy and the problem goes away.