Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Jul 2001 23:02:07 -0700 (PDT)
From:      Aaron Seth <asc@mhpcc.edu>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/29255: "cdda2wav -D /dev/acd0a" causes 4.3 panic via atapi_read()
Message-ID:  <200107270602.f6R627C98881@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         29255
>Category:       kern
>Synopsis:       "cdda2wav -D /dev/acd0a" causes 4.3 panic via atapi_read()
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jul 26 23:10:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Aaron Seth
>Release:        4.3-STABLE
>Organization:
MHPCC
>Environment:
FreeBSD XXX 4.3-STABLE FreeBSD 4.3-STABLE #1: Thu Jul 26 14:32:30 HST 2001 asc@XXX:/usr/obj/usr/src/sys/kohala-debug  i386
>Description:
NOTE: this may be a similar/same problem to PR27861...

As a regular user, run "cdda2wav -D <IDE ATAPI CD DEVICE>"

The kernel panics.  I have been able to crash the machine using both a generic IDE ATAPI CD drive and a Yamaha IDE ATAPI CDR/RW burner.

su-2.05# gdb -k
GNU gdb 4.18
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-unknown-freebsd".
(kgdb)  symbol-file kernel.debug
Reading symbols from kernel.debug...done.
(kgdb) exec-file /var/crash/kernel.0
(kgdb) core-file /var/crash/vmcore.0
IdlePTD 3428352
initial pcb at 2b6300
panicstr: from debugger
panic messages:
---
Fatal trap 12: page fault while in kernel mode
fault virtual address   = 0x3a
fault code              = supervisor write, page not present
instruction pointer     = 0x8:0xc01c867b
stack pointer           = 0x10:0xc026f5bc
frame pointer           = 0x10:0xc026f65c
code segment            = base 0x0, limit 0xfffff, type 0x1b
                        = DPL 0, pres 1, def32 1, gran 1
processor eflags        = interrupt enabled, resume, IOPL = 0
current process         = Idle
interrupt mask          = bio 
panic: from debugger


Fatal trap 12: page fault while in kernel mode
fault virtual address   = 0x3a
fault code              = supervisor write, page not present
instruction pointer     = 0x8:0xc01c867b
stack pointer           = 0x10:0xc026f5bc
frame pointer           = 0x10:0xc026f65c
code segment            = base 0x0, limit 0xfffff, type 0x1b
                        = DPL 0, pres 1, def32 1, gran 1
processor eflags        = interrupt enabled, resume, IOPL = 0
current process         = Idle
interrupt mask          = bio 
panic: from debugger
Uptime: 1m17s

dumping to dev #ad/0x20001, offset 128
dump ata0: resetting devices .. done
255 254 253 252 251 250 249 248 247 246 245 244 243 242 241 240 239 238 237 236 235 234 233 232 231 230 229 228 227 226 225 224 223 222 221 220 219 218 217 216 215 214 213 212 211 210 209 208 207 206 205 204 203 202 201 200 199 198 197 196 195 194 193 192 191 190 189 188 187 186 185 184 183 182 181 180 179 178 177 176 175 174 173 172 171 170 169 168 167 166 165 164 163 162 161 160 159 158 157 156 155 154 153 152 151 150 149 148 147 146 145 144 143 142 141 140 139 138 137 136 135 134 133 132 131 130 129 128 127 126 125 124 123 122 121 120 119 118 117 116 115 114 113 112 111 110 109 108 107 106 105 104 103 102 101 100 99 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81 80 79 78 77 76 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 
---
#0  dumpsys () at /usr/src/sys/kern/kern_shutdown.c:472
472             if (dumping++) {
(kgdb) where
#0  dumpsys () at /usr/src/sys/kern/kern_shutdown.c:472
#1  0xc0153fdf in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:312
#2  0xc0154375 in panic (fmt=0xc023ec04 "from debugger") at /usr/src/sys/kern/kern_shutdown.c:559
#3  0xc012b511 in db_panic (addr=-1071872389, have_addr=0, count=-1, modif=0xc026f428 "")
    at /usr/src/sys/ddb/db_command.c:435
#4  0xc012b4b1 in db_command (last_cmdp=0xc02712bc, cmd_table=0xc02710fc, aux_cmd_tablep=0xc02affc0)
    at /usr/src/sys/ddb/db_command.c:333
#5  0xc012b576 in db_command_loop () at /usr/src/sys/ddb/db_command.c:457
#6  0xc012d68b in db_trap (type=12, code=0) at /usr/src/sys/ddb/db_trap.c:71
#7  0xc021ec32 in kdb_trap (type=12, code=0, regs=0xc026f57c) at /usr/src/sys/i386/i386/db_interface.c:158
#8  0xc022b8e8 in trap_fatal (frame=0xc026f57c, eva=58) at /usr/src/sys/i386/i386/trap.c:946
#9  0xc022b5c1 in trap_pfault (frame=0xc026f57c, usermode=0, eva=58) at /usr/src/sys/i386/i386/trap.c:844
#10 0xc022b167 in trap (frame={tf_fs = 16, tf_es = 16, tf_ds = 16, tf_edi = -901373952, tf_esi = -1070878740, 
      tf_ebp = -1071188388, tf_isp = -1071188568, tf_ebx = 0, tf_edx = 0, tf_ecx = -1071188472, tf_eax = 1, tf_trapno = 12, 
      tf_err = 2, tf_eip = -1071872389, tf_cs = 8, tf_eflags = 66178, tf_esp = 0, tf_ss = -1070878740})
    at /usr/src/sys/i386/i386/trap.c:443
#11 0xc01c867b in vm_fault (map=0xc02bafec, vaddr=3393593344, fault_type=3 '\003', fault_flags=0)
    at /usr/src/sys/vm/vm_object.h:189
#12 0xc022b56e in trap_pfault (frame=0xc026f6d0, usermode=0, eva=3393593344) at /usr/src/sys/i386/i386/trap.c:833
#13 0xc022b167 in trap (frame={tf_fs = 16, tf_es = 16, tf_ds = 16, tf_edi = -901373952, tf_esi = 2352, tf_ebp = -1071188192, 
      tf_isp = -1071188228, tf_ebx = -1058067584, tf_edx = 368, tf_ecx = 20, tf_eax = -1059818624, tf_trapno = 12, 
      tf_err = 2, tf_eip = -1071609738, tf_cs = 8, tf_eflags = 66066, tf_esp = -1063042752, tf_ss = -1058067584})
    at /usr/src/sys/i386/i386/trap.c:443
#14 0xc0208876 in atapi_read (request=0xc0ef2b80, length=2352) at machine/cpufunc.h:225
#15 0xc0208313 in atapi_interrupt (request=0xc0ef2b80) at /usr/src/sys/dev/ata/atapi-all.c:391
#16 0xc0201886 in ata_intr (data=0xc0d47380) at /usr/src/sys/dev/ata/ata-all.c:1158
(kgdb) up 14
#14 0xc0208876 in atapi_read (request=0xc0ef2b80, length=2352) at machine/cpufunc.h:225
225             __asm __volatile("cld; rep; insl"
(kgdb) list220     }
221     
222     static __inline void
223     insl(u_int port, void *addr, size_t cnt)
224     {
225             __asm __volatile("cld; rep; insl"
226                              : "=D" (addr), "=c" (cnt)
227                              :  "0" (addr),  "1" (cnt), "d" (port)
228                              : "memory");
229     }
(kgdb) info registers
eax            0x0      0
ecx            0x0      0
edx            0x0      0
ebx            0x68c440 6865984
esp            0xc026f3a8       0xc026f3a8
ebp            0xc026f720       0xc026f720
esi            0x930    2352
edi            0xca462000       -901373952
eip            0xc021f950       0xc021f950
eflags         0x0      0
cs             0x0      0
ss             0x0      0
ds             0x0      0
es             0x0      0
fs             cannot read u area ptr for proc at 0
(kgdb) up
#15 0xc0208313 in atapi_interrupt (request=0xc0ef2b80) at /usr/src/sys/dev/ata/atapi-all.c:391
391                 atapi_read(request, length);(kgdb) list
386                     request->result = inb(atp->controller->ioaddr + ATA_ERROR);
387                     printf("%s: %s trying to read on write buffer\n",
388                            atp->devname, atapi_cmd2str(atp->cmd));
389                     break;
390                 }
391                 atapi_read(request, length);
392                 return ATA_OP_CONTINUES;
393     
394             case ATAPI_P_DONEDRQ:
395                 printf("%s: %s DONEDRQ\n", atp->devname, atapi_cmd2str(atp->cmd));


>How-To-Repeat:
Run cdda2wav (cdrecord-1.9 port) on a 4.3 machine.
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200107270602.f6R627C98881>