Bug 223016

Summary: udev-103-3 hangs the boot sequence if ZIP-250 drive contains a disk
Product: [Fedora] Fedora Reporter: Joseph Sacco <jsacco>
Component: udevAssignee: Harald Hoyer <harald>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: powerpc   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-02-06 08:05:36 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Attachments:
Description Flags
/var/log/messages [compresssed] none

Description Joseph Sacco 2007-01-17 10:58:03 EST
The boot sequence hangs at "udev" if the ZIP-250 drive contains a disk. 

When the boot sequence gets to "udev", the ZIP-250 light comes on and the ZIP
drive spins and spins and spins...  The boot sequence hangs at this point until
the ZIP-250 disk is ejected.  Once ejected, the boot sequence continues on to
completion.

I do *not* see this behavior under FC6 which uses udev-095-14.

Note: 
The media has been reformatted to Apple HFS+ format with the data on hdd2.
The HAL FDI file has been adjusted accordingly.

-Joseph
Comment 1 Harald Hoyer 2007-01-26 06:36:53 EST
cann you add "udevdebug" to the kernel command line and tell me, what is causing
the drive spin?

udev messages are also logged to /var/log/messages
Comment 2 Joseph Sacco 2007-01-26 09:19:37 EST
Created attachment 146680 [details]
/var/log/messages [compresssed]
Comment 3 Joseph Sacco 2007-01-26 09:23:56 EST
System:
* PowerMac with dual G4 533MHz CPU's
* 3 SCSI drives
* 1 GB RAM
* atapi ZIP250 drive.

======================================================================
Harold,

Updating to udev-104-1 allows the boot sequence to complete with media in the
ZIP drive.

I have attached a compressed copy of /var/log/messages, which may shed some
light on the cause of the problem with udev-103.

The ZIP250 media is formatted as shown:

[from 'pdisk']
Partition map (with 512 byte blocks) on '/dev/hdd'
 #:                type name                 length   base   ( size )
 1: Apple_partition_map Apple                    63 @ 1     
 2:           Apple_HFS Apple_HFS_Untitled_1 489468 @ 64     (239.0M)

Device block size=512, Number of Blocks=489532 (239.0M)
DeviceType=0x0, DeviceId=0x0



-Joseph
Comment 4 Joseph Sacco 2007-01-31 10:19:12 EST
Harold,

I was wrong... Updating to udev-104-1 does not allow the boot sequence to
complete    in a reasonable amount of time [5 minutes...] with media in the ZIP
drive.  

-Joseph
Comment 5 Harald Hoyer 2007-01-31 11:22:21 EST
these two rules should have prevented udev from reading from the zip drive...

# never access removable ide devices, the drivers are causing event loops on open()
BUS=="ide", DRIVERS!="ide-cdrom", ATTRS{removable}=="1",       
GOTO="persistent_end"
BUS=="ide", KERNEL=="hd*[0-9]", ATTRS{removable}=="1", GOTO="persistent_end"


please give me the output of 

# udevinfo -q all -n /dev/hdd
Comment 6 Joseph Sacco 2007-01-31 13:41:19 EST
#  udevinfo -q all -n /dev/hdd
P: /block/hdd
N: hdd
S: floppy
S: floppy-hdd
Comment 7 Joseph Sacco 2007-01-31 14:07:41 EST
Harald,

The problem is with the second line in the snippet shown below:
# never access removable ide devices, the drivers are causing event loops on open()
BUS=="ide", DRIVERS!="ide-cdrom", ATTRS{removable}=="1",  GOTO="persistent_end"
BUS=="ide", KERNEL=="hd*[0-9]", ATTRS{removable}=="1", GOTO="persistent_end"

Earlier versions of 50-udev.rules used:

# never access removable ide devices, the drivers are causing event loops on open()
BUS=="ide", DRIVER!="ide-cdrom", SYSFS{removable}=="1", GOTO="persistent_end"
BUS=="ide", KERNEL=="hd*[0-9]", SYSFS{../removable}=="1", GOTO="persistent_end"


I conducted two experiments:

(1) use the earlier version of those two lines
==> boot sequence no longer hangs
==> there is a warning message

Jan 31 13:50:01 plantain udevd[386]: add_to_rules: do not reference parent sysfs
directories directly, that may break with a future kernel, please fix it in
/etc/udev/rules.d/50-udev.rules:263

(2) use current version of those two lines but replace the second ATTRS{} with
ATTRS{../removeable}

==> boot sequence no longer hangs
==> same error message as (1)

-Joseph



Comment 8 Harald Hoyer 2007-02-01 07:24:11 EST
Could you try
KERNEL=="hd*[0-9]", ATTRS{removable}=="1", GOTO="persistent_end"
instead of
BUS=="ide", KERNEL=="hd*[0-9]", ATTRS{removable}=="1", GOTO="persistent_end"
?
Comment 9 Joseph Sacco 2007-02-01 09:12:42 EST
Harald,

That worked. The system now boots when there is media in the zip drive.

One tiny nit... permissions.  When I log in I own /dev/hdd but not
/dev/hdd[1-2], the two partitions on the ZIP drive:

   brw-rw---- 1 jsacco floppy 22,  64 2007-02-01 09:01 /dev/hdd
   brw-r----- 1 root   disk   22,  65 2007-02-01 09:01 /dev/hdd1
   brw-r----- 1 root   disk   22,  66 2007-02-01 09:01 /dev/hdd2

Once I manually change ownership,  I can then mount the zip drive without being
root.


-Joseph
Comment 10 Harald Hoyer 2007-02-01 10:53:08 EST
add
KERNEL=="hd*[0-9]", ATTRS{removable}=="1", SYMLINK+="floppy-%k"
Comment 11 Joseph Sacco 2007-02-01 11:23:13 EST
Harold,

That did not work:

   brw-rw---- 1 jsacco floppy 22, 64 2007-02-01 11:10 /dev/hdd
   brw-r----- 1 root disk 22, 65 2007-02-01 11:11 /dev/hdd1
   brw-r----- 1 root disk 22, 66 2007-02-01 11:11 /dev/hdd2

Current state of  udev-50.rules shown below:
# never access removable ide devices, the drivers are causing event loops on open()
BUS=="ide", DRIVERS!="ide-cdrom", ATTRS{removable}=="1", GOTO="persistent_end"
KERNEL=="hd*[0-9]", ATTRS{removable}=="1", GOTO="persistent_end"
KERNEL=="hd*[0-9]", ATTRS{removable}=="1", SYMLINK+="floppy-%k"

-Joseph
Comment 12 Harald Hoyer 2007-02-01 11:45:56 EST
hehe.. no :)
KERNEL=="hd*[0-9]", ATTRS{removable}=="1", SYMLINK+="floppy-%k"BUS=="ide",
DRIVERS!="ide-cdrom", ATTRS{removable}=="1", GOTO="persistent_end"
KERNEL=="hd*[0-9]", ATTRS{removable}=="1", GOTO="persistent_end"
Comment 13 Joseph Sacco 2007-02-01 12:05:37 EST
No... That one did not work either.


brw-rw---- 1 jsacco floppy 22,  64 2007-02-01 12:00 /dev/hdd
brw-r----- 1 root   disk   22,  65 2007-02-01 12:01 /dev/hdd1
brw-r----- 1 root   disk   22,  66 2007-02-01 12:01 /dev/hdd2

# never access removable ide devices, the drivers are causing event loops on open()
KERNEL=="hd*[0-9]", ATTRS{removable}=="1", SYMLINK+="floppy-%k"BUS=="ide",
DRIVERS!="ide-cdrom", ATTRS{removable}=="1", GOTO="persistent_end"
KERNEL=="hd*[0-9]", ATTRS{removable}=="1", GOTO="persistent_end"

-Joseph
Comment 14 Harald Hoyer 2007-02-02 06:23:33 EST
oops
copy&paste error.. sry:
KERNEL=="hd*[0-9]", ATTRS{removable}=="1", SYMLINK+="floppy-%k"
DRIVERS!="ide-cdrom", ATTRS{removable}=="1", GOTO="persistent_end"
KERNEL=="hd*[0-9]", ATTRS{removable}=="1", GOTO="persistent_end"
Comment 15 Joseph Sacco 2007-02-02 10:07:52 EST
Harald,

That worked.  All's well that ends well.

Thank you for your assistance.

-Joseph