Bug 52229 - mount segfaults trying to mount USB cdrw
mount segfaults trying to mount USB cdrw
Product: Red Hat Public Beta
Classification: Retired
Component: kernel (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Pete Zaitcev
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2001-08-21 16:19 EDT by Tom "spot" Callaway
Modified: 2007-04-18 12:36 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-09-14 22:01:55 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
dmesg showing kernel oops (14.96 KB, text/plain)
2001-08-22 09:37 EDT, Tom "spot" Callaway
no flags Details
patch for /usr/src/linux-2.4.7-2/drivers/usb/storage (867 bytes, patch)
2001-08-22 09:40 EDT, Tom "spot" Callaway
no flags Details | Diff
patch for /usr/src/linux-2.4.7-2/drivers/usb/storage (572 bytes, patch)
2001-08-22 09:41 EDT, Tom "spot" Callaway
no flags Details | Diff
New oops, with only the 2nd patch applied. (13.58 KB, text/plain)
2001-08-22 15:01 EDT, Tom "spot" Callaway
no flags Details
ksymoops results (2.47 KB, text/plain)
2001-08-22 21:08 EDT, Tom "spot" Callaway
no flags Details

  None (edit)
Description Tom "spot" Callaway 2001-08-21 16:19:19 EDT
Description of Problem:

mount segfaults, sometimes the kernel panics.

Version-Release number of selected component (if applicable):


kernel 2.4.7-2smp

How Reproducible:

always (kernel panics are erratic), further attempts to mount after the
first one cause zombie mount processes that wont die.

Steps to Reproduce:
1. modprobe sg; modprobe usb-storage 
2. mount /dev/scd0 /mnt/cdrom

Actual Results:
[root@zorak mnt]# mount /dev/scd0 /mnt/cdrom
/dev/scd0: Success
mount: block device /dev/scd0 is write-protected, mounting read-only
/dev/scd0: Read-only file system
Segmentation fault

Expected Results:

cdrom mounts disc in /mnt/cdrom

Additional Information:

CDRW is labeled as an HP CDWriter 8200 Series, external USB.
[root@zorak etc]# cat /proc/scsi/scsi 
Attached devices: 
Host: scsi0 Channel: 00 Id: 00 Lun: 00
  Vendor: IBM-PSG  Model: DNES-309170W  !# Rev: SAB0
  Type:   Direct-Access                    ANSI SCSI revision: 03
Host: scsi2 Channel: 00 Id: 00 Lun: 00
  Vendor: HP       Model: CD-Writer+ 8290  Rev: 1.3C
  Type:   CD-ROM                           ANSI SCSI revision: 02

[root@zorak etc]# cat /proc/bus/usb/devices 
T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2
B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 1.00 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0000 ProdID=0000 Rev= 0.00
S:  Product=USB UHCI Root Hub
S:  SerialNumber=ff00
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=255ms
T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=12  MxCh= 0
D:  Ver= 1.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=16 #Cfgs=  1
P:  Vendor=03f0 ProdID=0207 Rev= 0.01
S:  Product=HP USB CD-Writer Plus
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=01 Prot=ff Driver=usb-storage
E:  Ad=81(I) Atr=03(Int.) MxPS=   4 Ivl=  5ms
E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=  0ms
E:  Ad=03(O) Atr=02(Bulk) MxPS=  64 Ivl=  0ms

[root@zorak etc]# cat /proc/scsi/sg/device_strs
IBM-PSG 	DNES-309170W  !#	SAB0
HP      	CD-Writer+ 8290 	1.3C

[root@zorak spot]# cat /proc/scsi/usb-storage-0/2 
   Host scsi2: usb-storage
       Vendor: HP
      Product: HP USB CD-Writer Plus
Serial Number: None
     Protocol: 8070i
    Transport: SCM/ATAPI
         GUID: 03f002070000000000000000
     Attached: 1

[root@zorak spot]# cat /proc/bus/usb/drivers
 96-111: hiddev
Comment 1 Pete Zaitcev 2001-08-22 02:46:04 EDT
I am 99% sure that EVERY so-called "mount segfault"
is actually a kernel oops.

Requestor, please do the following:

 1. Reboot clean, without magicdev.
 2. Attach the device.
 3. mount, get the "segfault". DO IT ONLY ONCE.
 4. dmesg > /tmp/dmesg.out
 5. Reboot before it got worse.

Attach the resulting dmesg.out.

If dmesg has an oops, I'll take the bug (almost sure now).
Certainly bero won't mind.
Comment 2 Tom "spot" Callaway 2001-08-22 09:37:18 EDT
Created attachment 28914 [details]
dmesg showing kernel oops
Comment 3 Tom "spot" Callaway 2001-08-22 09:39:24 EDT
Indeed, it is oopsing. Now, last night I did some research on the problem and
discovered a reference to some patches which resolve the problem. I applied
those patches to the roswell2 kernel source, rebuilt it, booted the new kernel,
and was able to successfully mount the cdrom drive. Havent tried burning yet,
but it looks promising at this point.
Comment 4 Tom "spot" Callaway 2001-08-22 09:40:45 EDT
Created attachment 28915 [details]
patch for /usr/src/linux-2.4.7-2/drivers/usb/storage
Comment 5 Tom "spot" Callaway 2001-08-22 09:41:34 EDT
Created attachment 28916 [details]
patch for /usr/src/linux-2.4.7-2/drivers/usb/storage
Comment 6 Tom "spot" Callaway 2001-08-22 10:35:48 EDT
Burning works as well.
Comment 7 Pete Zaitcev 2001-08-22 13:14:17 EDT
Curious. The 8290-patch-2_4_2 seems to be unrelated,
it only allows the Shuttle to work properly but does
not prevent any oopses. Can you try with the second
patch only and see if it still works?
Comment 8 Tom "spot" Callaway 2001-08-22 15:00:46 EDT
Kernel with only wilford-sectorsize patch oopses, reproduceably. Oops is
attached below.
Comment 9 Tom "spot" Callaway 2001-08-22 15:01:43 EDT
Created attachment 28997 [details]
New oops, with only the 2nd patch applied.
Comment 10 Pete Zaitcev 2001-08-22 17:41:57 EDT
Thanks for the oops, can you run it through ksymoops for me?
Comment 11 Glen Foster 2001-08-22 18:11:52 EDT
We (Red Hat) should really try to fix this before next release.
Comment 12 Tom "spot" Callaway 2001-08-22 21:08:10 EDT
Created attachment 29077 [details]
ksymoops results
Comment 13 Pete Zaitcev 2001-08-23 00:18:14 EDT
Thanks for the trace, I am looking...

BTW, do you know that NV scribbles randomly over memory?
This looks pretty scary:

Trace; e09b9f33 <[NVdriver]KernInitAGP+313/40c>
(I realize that it's garbage from old stack frames :). But still...)
Comment 14 Pete Zaitcev 2001-08-23 00:37:54 EDT
I do not pretend to understand to understand how this works,
but both of those fixes are in 2.4.8-ac8. Let me ask Arjan
if they will filter down to our kernel before 7.2 release.
Current HEAD and fairfax are 2.4.7-ac3, without the fixes.
Comment 15 Pete Zaitcev 2001-08-24 17:11:39 EDT
The sector size guess was dropped from 2.4.8-ac10.
Needs to be re-tested.

I've committed the other one in HEAD and fairfax,
let it get into a build.
Comment 16 Pete Zaitcev 2001-09-14 22:01:51 EDT
Does the RC2 work?! Please let me know.
(actually, 7.2 final is available, please try that
if you can find it).
Comment 17 Tom "spot" Callaway 2001-09-18 17:42:30 EDT
Works like a charm now, thanks Pete!

Note You need to log in before you can comment on or make changes to this bug.