Bug 52229 - mount segfaults trying to mount USB cdrw
Summary: mount segfaults trying to mount USB cdrw
Alias: None
Product: Red Hat Public Beta
Classification: Retired
Component: kernel   
(Show other bugs)
Version: roswell
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Pete Zaitcev
QA Contact: Brian Brock
Depends On:
TreeView+ depends on / blocked
Reported: 2001-08-21 20:19 UTC by Tom "spot" Callaway
Modified: 2007-04-18 16:36 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-09-15 02:01:55 UTC
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 13:37 UTC, Tom "spot" Callaway
no flags Details
patch for /usr/src/linux-2.4.7-2/drivers/usb/storage (867 bytes, patch)
2001-08-22 13:40 UTC, 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 13:41 UTC, Tom "spot" Callaway
no flags Details | Diff
New oops, with only the 2nd patch applied. (13.58 KB, text/plain)
2001-08-22 19:01 UTC, Tom "spot" Callaway
no flags Details
ksymoops results (2.47 KB, text/plain)
2001-08-23 01:08 UTC, Tom "spot" Callaway
no flags Details

Description Tom "spot" Callaway 2001-08-21 20:19:19 UTC
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 06:46:04 UTC
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 13:37:18 UTC
Created attachment 28914 [details]
dmesg showing kernel oops

Comment 3 Tom "spot" Callaway 2001-08-22 13:39:24 UTC
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 13:40:45 UTC
Created attachment 28915 [details]
patch for /usr/src/linux-2.4.7-2/drivers/usb/storage

Comment 5 Tom "spot" Callaway 2001-08-22 13:41:34 UTC
Created attachment 28916 [details]
patch for /usr/src/linux-2.4.7-2/drivers/usb/storage

Comment 6 Tom "spot" Callaway 2001-08-22 14:35:48 UTC
Burning works as well.

Comment 7 Pete Zaitcev 2001-08-22 17:14:17 UTC
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 19:00:46 UTC
Kernel with only wilford-sectorsize patch oopses, reproduceably. Oops is
attached below.

Comment 9 Tom "spot" Callaway 2001-08-22 19:01:43 UTC
Created attachment 28997 [details]
New oops, with only the 2nd patch applied.

Comment 10 Pete Zaitcev 2001-08-22 21:41:57 UTC
Thanks for the oops, can you run it through ksymoops for me?

Comment 11 Glen Foster 2001-08-22 22:11:52 UTC
We (Red Hat) should really try to fix this before next release.

Comment 12 Tom "spot" Callaway 2001-08-23 01:08:10 UTC
Created attachment 29077 [details]
ksymoops results

Comment 13 Pete Zaitcev 2001-08-23 04:18:14 UTC
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 04:37:54 UTC
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 21:11:39 UTC
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-15 02:01:51 UTC
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 21:42:30 UTC
Works like a charm now, thanks Pete!

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