Bug 26031

Summary: 4.3-BETA crashes on 'mount /dev/acd0c /mnt/cd'
Product: Base System Reporter: davidt <davidt>
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   

Description davidt 2001-03-23 17:20:00 UTC
The following command works fine, so I know the CD-ROM drive/CD/etc are OK
	mount -t cd9660 /dev/acd0c /mnt/cd

However,
	mount /dev/acd0c /mnt/cd	# Note: no -t cd9660
causes the following panic:

IdlePTD 3657728
initial pcb at 2e2a00
panicstr: vm_fault: fault on nofault entry, addr: c7c11000
panic messages:
---
panic: vm_fault: fault on nofault entry, addr: c7c11000

#0  dumpsys () at /usr/src/sys/kern/kern_shutdown.c:469
#1  0xc014af55 in boot (howto=256) at /usr/src/sys/kern/kern_shutdown.c:309
#2  0xc014b2ed in panic (
    fmt=0xc027a080 "vm_fault: fault on nofault entry, addr: %lx")
    at /usr/src/sys/kern/kern_shutdown.c:556
#3  0xc01e39c6 in vm_fault (map=0xc02eb30c, vaddr=3357331456,
    fault_type=3 '\003', fault_flags=0) at /usr/src/sys/vm/vm_fault.c:240
#4  0xc0247602 in trap_pfault (frame=0xcd718f10, usermode=0, eva=3357331456)
    at /usr/src/sys/i386/i386/trap.c:833
#5  0xc02471ef in trap (frame={tf_fs = 16, tf_es = 16, tf_ds = -1072365552,
      tf_edi = -937635840, tf_esi = 2352, tf_ebp = -848195744,
      tf_isp = -848195780, tf_ebx = -1054105728, tf_edx = 368, tf_ecx = 304,
      tf_eax = -1058161152, tf_trapno = 12, tf_err = 2,
      tf_eip = -1071495692, tf_cs = 8, tf_eflags = 2163202,
      tf_esp = -1054105728, tf_ss = -1057923520}) at
    at /usr/src/sys/i386/i386/trap.c:443
#6  0xc02245f4 in atapi_read (request=0xc12b9f80, length=2352)
    at machine/cpufunc.h:222
#7  0xc02240b2 in atapi_interrupt (request=0xc12b9f80)
    at /usr/src/sys/dev/ata/atapi-all.c:385
#8  0xc021dae1 in ata_intr (data=0xc0edbe00)
    at /usr/src/sys/dev/ata/ata-all.c:1150

I've also seen:

#6  0xc02245f4 in atapi_read (request=0xc148b480, length=2352)
    at machine/cpufunc.h:222
#7  0xc02240b2 in atapi_interrupt (request=0xc148b480)
    at /usr/src/sys/dev/ata/atapi-all.c:385
#8  0xc021dae1 in ata_intr (data=0xc0edbe00)
    at /usr/src/sys/dev/ata/ata-all.c:1150

and

#12 0xc02245f4 in atapi_read (request=0xc122d380, length=2352)
    at machine/cpufunc.h:222
#13 0xc02240b2 in atapi_interrupt (request=0xc122d380)
    at /usr/src/sys/dev/ata/atapi-all.c:385
#14 0xc021dae1 in ata_intr (data=0xc0edbe00)
    at /usr/src/sys/dev/ata/ata-all.c:1150

which all seem quite similar... i've still got a few of the crashdumps
around if anyone needs more information from them...

This happens (AFAICS) on every CD I attempt to mount (audio CD, data CD,
CD-R, CD-RW, etc)

When I was originally trying to mount a CD-RW disk, I also saw messages
like:

"kernel: ata1-master: too many segments in DMA table"

I'm not sure if that's because it was a CD-RW which FreeBSD didn't
understand, or if it's related to the bug that caused the panic..

'acd0: READ_CD commmand timeout - resetting' appeared on the console each
time after the panic, but just before the dump.

How-To-Repeat: 	Insert a CD into your first CD-ROM drive
	Try to do mount /dev/acd0c /mnt
	FreeBSD should then crash... although I'm sure there must be
	something unique about my environment..
Comment 1 sos 2001-03-23 18:20:06 UTC
It seems davidt@yadt.co.uk wrote:

You should disable DMA on the CDROM, then get back with the
result....
> 
> >Number:         26031
> >Category:       kern
> >Synopsis:       4.3-BETA crashes on 'mount /dev/acd0c /mnt/cd'
> >Confidential:   no
> >Severity:       critical
> >Priority:       medium
> >Responsible:    freebsd-bugs
> >State:          open
> >Quarter:        
> >Keywords:       
> >Date-Required:
> >Class:          sw-bug
> >Submitter-Id:   current-users
> >Arrival-Date:   Fri Mar 23 09:20:00 PST 2001
> >Closed-Date:
> >Last-Modified:
> >Originator:     David Taylor
> >Release:        FreeBSD 4.3-BETA i386
> >Organization:
> >Environment:
> System: FreeBSD gattaca.yadt.co.uk 4.3-BETA FreeBSD 4.3-BETA #3: Tue Mar 6 18:39:44 GMT 2001 davidt@gattaca.yadt.co.uk:/usr/obj/usr/src/sys/GATTACA i386
> 
> ad0: 32634MB <IBM-DPTA-373420> [66305/16/63] at ata0-master UDMA33
> acd0: DVD-ROM <HITACHI DVD-ROM GD-5000> at ata1-master using WDMA2
> acd1: CD-RW <SONY CD-RW CRX140E> at ata1-slave using UDMA33
> 
> Dell Dimension XPS T-800r PIII-800, 256Mb RAM...
> 
> I'm not sure what else is relevant...
> >Description:
> 
> The following command works fine, so I know the CD-ROM drive/CD/etc are OK
> 	mount -t cd9660 /dev/acd0c /mnt/cd
> 
> However,
> 	mount /dev/acd0c /mnt/cd	# Note: no -t cd9660
> causes the following panic:
> 
> IdlePTD 3657728
> initial pcb at 2e2a00
> panicstr: vm_fault: fault on nofault entry, addr: c7c11000
> panic messages:
> ---
> panic: vm_fault: fault on nofault entry, addr: c7c11000
> 
> #0  dumpsys () at /usr/src/sys/kern/kern_shutdown.c:469
> #1  0xc014af55 in boot (howto=256) at /usr/src/sys/kern/kern_shutdown.c:309
> #2  0xc014b2ed in panic (
>     fmt=0xc027a080 "vm_fault: fault on nofault entry, addr: %lx")
>     at /usr/src/sys/kern/kern_shutdown.c:556
> #3  0xc01e39c6 in vm_fault (map=0xc02eb30c, vaddr=3357331456,
>     fault_type=3 '\003', fault_flags=0) at /usr/src/sys/vm/vm_fault.c:240
> #4  0xc0247602 in trap_pfault (frame=0xcd718f10, usermode=0, eva=3357331456)
>     at /usr/src/sys/i386/i386/trap.c:833
> #5  0xc02471ef in trap (frame={tf_fs = 16, tf_es = 16, tf_ds = -1072365552,
>       tf_edi = -937635840, tf_esi = 2352, tf_ebp = -848195744,
>       tf_isp = -848195780, tf_ebx = -1054105728, tf_edx = 368, tf_ecx = 304,
>       tf_eax = -1058161152, tf_trapno = 12, tf_err = 2,
>       tf_eip = -1071495692, tf_cs = 8, tf_eflags = 2163202,
>       tf_esp = -1054105728, tf_ss = -1057923520}) at
>     at /usr/src/sys/i386/i386/trap.c:443
> #6  0xc02245f4 in atapi_read (request=0xc12b9f80, length=2352)
>     at machine/cpufunc.h:222
> #7  0xc02240b2 in atapi_interrupt (request=0xc12b9f80)
>     at /usr/src/sys/dev/ata/atapi-all.c:385
> #8  0xc021dae1 in ata_intr (data=0xc0edbe00)
>     at /usr/src/sys/dev/ata/ata-all.c:1150
> 
> I've also seen:
> 
> #6  0xc02245f4 in atapi_read (request=0xc148b480, length=2352)
>     at machine/cpufunc.h:222
> #7  0xc02240b2 in atapi_interrupt (request=0xc148b480)
>     at /usr/src/sys/dev/ata/atapi-all.c:385
> #8  0xc021dae1 in ata_intr (data=0xc0edbe00)
>     at /usr/src/sys/dev/ata/ata-all.c:1150
> 
> and
> 
> #12 0xc02245f4 in atapi_read (request=0xc122d380, length=2352)
>     at machine/cpufunc.h:222
> #13 0xc02240b2 in atapi_interrupt (request=0xc122d380)
>     at /usr/src/sys/dev/ata/atapi-all.c:385
> #14 0xc021dae1 in ata_intr (data=0xc0edbe00)
>     at /usr/src/sys/dev/ata/ata-all.c:1150
> 
> which all seem quite similar... i've still got a few of the crashdumps
> around if anyone needs more information from them...
> 
> This happens (AFAICS) on every CD I attempt to mount (audio CD, data CD,
> CD-R, CD-RW, etc)
> 
> When I was originally trying to mount a CD-RW disk, I also saw messages
> like:
> 
> "kernel: ata1-master: too many segments in DMA table"
> 
> I'm not sure if that's because it was a CD-RW which FreeBSD didn't
> understand, or if it's related to the bug that caused the panic..
> 
> 'acd0: READ_CD commmand timeout - resetting' appeared on the console each
> time after the panic, but just before the dump.
> 
> 	
> >How-To-Repeat:
> 	Insert a CD into your first CD-ROM drive
> 	Try to do mount /dev/acd0c /mnt
> 	FreeBSD should then crash... although I'm sure there must be
> 	something unique about my environment..
> >Fix:
> >Release-Note:
> >Audit-Trail:
> >Unformatted:
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-bugs" in the body of the message
> 


-Søren
Comment 2 davidt 2001-03-23 18:56:45 UTC
On Fri, 23 Mar 2001, Soren Schmidt wrote: 
> 
> You should disable DMA on the CDROM, then get back with the
> result....


# sysctl hw.atamodes
hw.atamodes: dma,---,dma,dma,

# sysctl -w hw.atamodes="dma,---,pio,pio"
hw.atamodes: dma,---,pio,pio, -> dma,---,pio,pio,

# mount /dev/acd0c /mnt/dvd/
mount: /dev/acd0c on /mnt/dvd: incorrect super block

(which I presume is the correct behaviour)

-- 
David Taylor
davidt@yadt.co.uk
Comment 3 sos 2001-03-23 18:58:50 UTC
It seems David Taylor wrote:
> On Fri, 23 Mar 2001, Soren Schmidt wrote: 
> > 
> > You should disable DMA on the CDROM, then get back with the
> > result....
> 
> # sysctl hw.atamodes
> hw.atamodes: dma,---,dma,dma,
> 
> # sysctl -w hw.atamodes="dma,---,pio,pio"
> hw.atamodes: dma,---,pio,pio, -> dma,---,pio,pio,
> 
> # mount /dev/acd0c /mnt/dvd/
> mount: /dev/acd0c on /mnt/dvd: incorrect super block
> 
> (which I presume is the correct behaviour)

Yups, you got yet another drive/controller combo that cant do 
ATAPI DMA proberly...

-Søren
Comment 4 Søren Schmidt freebsd_committer freebsd_triage 2001-05-29 20:29:33 UTC
State Changed
From-To: open->closed

Problem was DMA.