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 13:05:36 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
/var/log/messages [compresssed] none

Description Joseph Sacco 2007-01-17 15:58:03 UTC
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 11:36:53 UTC
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 14:19:37 UTC
Created attachment 146680 [details]
/var/log/messages [compresssed]

Comment 3 Joseph Sacco 2007-01-26 14:23:56 UTC
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 15:19:12 UTC
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 16:22:21 UTC
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 18:41:19 UTC
#  udevinfo -q all -n /dev/hdd
P: /block/hdd
N: hdd
S: floppy
S: floppy-hdd


Comment 7 Joseph Sacco 2007-01-31 19:07:41 UTC
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 12:24:11 UTC
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 14:12:42 UTC
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 15:53:08 UTC
add
KERNEL=="hd*[0-9]", ATTRS{removable}=="1", SYMLINK+="floppy-%k"

Comment 11 Joseph Sacco 2007-02-01 16:23:13 UTC
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 16:45:56 UTC
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 17:05:37 UTC
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 11:23:33 UTC
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 15:07:52 UTC
Harald,

That worked.  All's well that ends well.

Thank you for your assistance.

-Joseph