accidental atacontrol reinit causes panic

From: Mike Tancsa <mike_at_sentex.net>
Date: Tue, 24 Aug 2004 11:05:24 -0400
I know its one of those "Dont do it if it hurts" things but it seems to be 
a bit dangerous none the less.
On a RELENG_5, if I accidentally try and reinit a non existant channel, the 
machine panics


53beta# atacontrol reinit 1
Master:      no device present
Slave:       no device present
53beta# atacontrol reinit 2
kernel trap 12 with interrupts disabled


Fatal trap 12: page fault while in kernel mode
fault virtual address   = 0x0
fault code              = supervisor read, page not present
instruction pointer     = 0x8:0xc05b9d66
stack pointer           = 0x10:0xcbe90c00
frame pointer           = 0x10:0xcbe90c00
code segment            = base 0x0, limit 0xfffff, type 0x1b
                         = DPL 0, pres 1, def32 1, gran 1
processor eflags        = resume, IOPL = 0
current process         = 585 (atacontrol)
[thread 100046]
Stopped at      turnstile_head+0x6:     movl    0(%eax),%eax
db> where
turnstile_head(0,c05690af,c1779484,c15522c0,800) at turnstile_head+0x6
_mtx_unlock_sleep(c080c940,0,0,0,c15522c0) at _mtx_unlock_sleep+0x4a
ioctl(c15522c0,cbe90d14,c,c15522c0,4) at ioctl+0x784
syscall(2f,2f,2f,804a4e2,bfbfee32) at syscall+0x330
Xint0x80_syscall() at Xint0x80_syscall+0x1f
--- syscall (54, FreeBSD ELF32, ioctl), eip = 0x280cc09f, esp = 0xbfbfe85c, 
ebp = 0xbfbfed20 ---
db>
db> ps
   pid   proc     uarea   uid  ppid  pgrp  flag   stat  wmesg    wchan  cmd
   585 c15531c0 cbeaf000    0   475   585 0004002 [CPU 0] atacontrol
   475 c18068c0 ccbba000    0   426   475 0004002 [SLPQ pause 
0xc18068f8][SLP] csh
   433 c19d8700 ccbe7000    0   432   433 0004002 [SLPQ ttyin 
0xc1801010][SLP] csh
   432 c19d88c0 ccbe8000 1001   430   432 0004102 [SLPQ wait 
0xc19d88c0][SLP] su
   430 c19d8c40 ccc2c000 1001   429   430 0004002 [SLPQ pause 
0xc19d8c78][SLP] csh
   429 c19d8e00 ccc2d000 1001   427   427 0000100 [SLPQ select 
0xc0811de4][SLP] sshd
   427 c1750c40 cc35d000    0   360   427 0000100 [SLPQ sbwait 
0xc17f8320][SLP] sshd
   426 c1804a80 ccb91000    0     1   426 0004102 [SLPQ wait 
0xc1804a80][SLP] login
   425 c15538c0 cbeb3000    0     1   425 0004002 [SLPQ ttyin 
0xc1660c10][SLP] getty
   424 c1804000 ccb7b000    0     1   424 0004002 [SLPQ ttyin 
0xc1660e10][SLP] getty
   423 c1806380 ccbb7000    0     1   423 0004002 [SLPQ ttyin 
0xc168a010][SLP] getty
   422 c1750e00 cc35e000    0     1   422 0004002 [SLPQ ttyin 
0xc168a210][SLP] getty
   421 c1553a80 cbeb4000    0     1   421 0004002 [SLPQ ttyin 
0xc168a410][SLP] getty
   420 c1804e00 ccbb4000    0     1   420 0004002 [SLPQ ttyin 
0xc168a610][SLP] getty
   419 c1553540 cbeb1000    0     1   419 0004002 [SLPQ ttyin 
0xc168a810][SLP] getty
   418 c1553e00 cbeb6000    0     1   418 0004002 [SLPQ ttyin 
0xc152e210][SLP] getty
   384 c1806000 ccbb5000    0     1   384 0000000 [SLPQ nanslp 
0xc080e3f0][SLP] cron
   372 c1804700 ccb8f000   25     1   372 0000100 [SLPQ pause 
0xc1804738][SLP] sendmail
   366 c18061c0 ccbb6000    0     1   366 0000100 [SLPQ select 
0xc0811de4][SLP] sendmail
   360 c1804540 ccb8e000    0     1   360 0000100 [SLPQ select 
0xc0811de4][SLP] sshd
   325 c18041c0 ccb8c000    0     1   325 0000000 [SLPQ select 
0xc0811de4][SLP] usbd
   249 c18048c0 ccb90000    0     1   249 0000000 [SLPQ select 
0xc0811de4][SLP] syslogd
   229 c1750a80 cc35c000    0     1   229 0000000 [SLPQ select 
0xc0811de4][SLP] devd
   202 c1804380 ccb8d000    0     1   202 0000000 [SLPQ select 
0xc0811de4][SLP] dhclient
   152 c1553c40 cbeb5000    0     1   152 0000000 [SLPQ pause 
0xc1553c78][SLP] adjkerntz
    52 c1750000 cc314000    0     0     0 0000204 [SLPQ - 0xc081988c][SLP] 
nfsiod 3
    51 c17501c0 cc357000    0     0     0 0000204 [SLPQ - 0xc0819888][SLP] 
nfsiod 2
    50 c1750380 cc358000    0     0     0 0000204 [SLPQ - 0xc0819884][SLP] 
nfsiod 1
    49 c1750540 cc359000    0     0     0 0000204 [SLPQ - 0xc0819880][SLP] 
nfsiod 0
    48 c1750700 cc35a000    0     0     0 0000204 [SLPQ syncer 
0xc080e16c][SLP] syncer
    47 c17508c0 cc35b000    0     0     0 0000204 [SLPQ vlruwt 
0xc17508c0][SLP] vnlru
    46 c14d5a80 cbe7c000    0     0     0 0000204 [SLPQ psleep 
0xc08123ac][SLP] bufdaemon
    45 c14d5c40 cbe7d000    0     0     0 000020c [SLPQ pgzero 
0xc08200ec][SLP] pagezero
    44 c14d5e00 cbe7e000    0     0     0 0000204 [SLPQ psleep 
0xc0820140][SLP] vmdaemon
    43 c1551000 cbe84000    0     0     0 0000204 [SLPQ psleep 
0xc08200fc][SLP] pagedaemon
    42 c15511c0 cbe85000    0     0     0 0000204 [IWAIT] swi0: sio
    41 c1551380 cbe86000    0     0     0 0000204 [SLPQ usbevt 
0xc1658210][SLP] usb2
    40 c1551540 cbe87000    0     0     0 0000204 [SLPQ usbevt 
0xc1653210][SLP] usb1
    39 c1551700 cbea9000    0     0     0 0000204 [SLPQ usbtsk 
0xc0806218][SLP] usbtask
    38 c15518c0 cbeaa000    0     0     0 0000204 [SLPQ usbevt 
0xc1636210][SLP] usb0
    37 c1551a80 cbeab000    0     0     0 0000204 [SLPQ cbb cv 
0xc1521bf0][SLP] cbb1
    36 c1551c40 cbeac000    0     0     0 0000204 [SLPQ cbb cv 
0xc15203f0][SLP] cbb0
     9 c1551e00 cbead000    0     0     0 0000204 [SLPQ actask 
0xc09219ec][SLP] acpi_task2
     8 c1553000 cbeae000    0     0     0 0000204 [SLPQ actask 
0xc09219ec][SLP] acpi_task1
     7 c14c5540 cbe4f000    0     0     0 0000204 [SLPQ actask 
0xc09219ec][SLP] acpi_task0
     6 c14c5700 cbe50000    0     0     0 0000204 [SLPQ - 0xc14e7a40][SLP] 
thread taskq
    35 c14c58c0 cbe51000    0     0     0 0000204 [IWAIT] swi6:+
    34 c14c5a80 cbe52000    0     0     0 0000204 [IWAIT] swi6: acpitaskq
    33 c14c5c40 cbe53000    0     0     0 0000204 [IWAIT] swi6: task queue
     5 c14c5e00 cbe75000    0     0     0 0000204 [SLPQ - 0xc14e7c00][SLP] 
kqueue taskq
    32 c14d5000 cbe76000    0     0     0 0000204 [IWAIT] swi3: cambio
    31 c14d51c0 cbe77000    0     0     0 0000204 [IWAIT] swi2: camnet
    30 c14d5380 cbe78000    0     0     0 0000204 [IWAIT] swi6:+
     4 c14d5540 cbe79000    0     0     0 0000204 [SLPQ - 0xc0808a28][SLP] 
g_down
     3 c14d5700 cbe7a000    0     0     0 0000204 [SLPQ - 0xc0808a24][SLP] g_up
     2 c14d58c0 cbe7b000    0     0     0 0000204 [SLPQ - 0xc0808a1c][SLP] 
g_event
    29 c14a11c0 cb4d9000    0     0     0 0000204 [IWAIT] swi1: net
    28 c14a1380 cb4da000    0     0     0 0000204 [IWAIT] swi4: vm
    27 c14a1540 cb4db000    0     0     0 000020c [IWAIT] swi5: clock sio
    26 c14a1700 cb4fd000    0     0     0 0000204 [IWAIT] irq15: ata1
    25 c14a18c0 cb4fe000    0     0     0 0000204 [IWAIT] irq14: ata0
    24 c14a1a80 cb4ff000    0     0     0 0000204 [IWAIT] irq13:
    23 c14a1c40 cb500000    0     0     0 0000204 [IWAIT] irq12: cbb0 vr0+
    22 c14a1e00 cb501000    0     0     0 0000204 [IWAIT] irq11:
    21 c14c5000 cbe4c000    0     0     0 0000204 [IWAIT] irq10:
    20 c14c51c0 cbe4d000    0     0     0 0000204 [IWAIT] irq9: acpi0
    19 c14c5380 cbe4e000    0     0     0 0000204 [IWAIT] irq8: rtc
    18 c1497000 cb48d000    0     0     0 0000204 [IWAIT] irq7: uhci2
    17 c14971c0 cb4d0000    0     0     0 0000204 [IWAIT] irq6:
    16 c1497380 cb4d1000    0     0     0 0000204 [IWAIT] irq5: cbb1 fwohci0+
    15 c1497540 cb4d2000    0     0     0 0000204 [IWAIT] irq4: sio0
    14 c1497700 cb4d3000    0     0     0 0000204 [IWAIT] irq3: sio1
    13 c14978c0 cb4d4000    0     0     0 0000204 [IWAIT] irq1: atkbd0
    12 c1497a80 cb4d5000    0     0     0 0000204 [IWAIT] irq0: clk
    11 c1497c40 cb4d6000    0     0     0 000020c [Can run] idle
     1 c1497e00 cb4d7000    0     0     1 0004200 [SLPQ wait 
0xc1497e00][SLP] init
    10 c14a1000 cb4d8000    0     0     0 0000204 [SLPQ ktrace 
0xc080c398][SLP] ktrace
     0 c0808b20 c0c1f000    0     0     0 0000200 [SLPQ sched 
0xc0808b20][SLP] swapper
db>

%dmesg
Copyright (c) 1992-2004 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
         The Regents of the University of California. All rights reserved.
FreeBSD 5.3-BETA1 #0: Mon Aug 23 15:21:32 EDT 2004
     mdtancsa_at_53beta.sentex.ca:/usr/obj/usr/src/sys/itx
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: VIA C3 Nehemiah+RNG+ACE (1199.79-MHz 686-class CPU)
   Origin = "CentaurHauls"  Id = 0x698  Stepping = 8
   Features=0x381b83f<FPU,VME,DE,PSE,TSC,MSR,SEP,MTRR,PGE,CMOV,PAT,MMX,FXSR,SSE>
real memory  = 251592704 (239 MB)
avail memory = 236650496 (225 MB)
npx0: [FAST]
npx0: <math processor> on motherboard
npx0: INT 16 interface
acpi0: <VT9174 AWRDACPI> on motherboard
acpi0: Power Button (fixed)
Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x408-0x40b on acpi0
cpu0: <ACPI CPU (3 Cx states)> on acpi0
acpi_button0: <Power Button> on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
ACPI link \\_SB_.PCI0.LNKD has invalid initial irq 9, ignoring
pci0: <ACPI PCI bus> on pcib0
agp0: <VIA Generic host to PCI bridge> mem 0xe6000000-0xe63fffff at device 
0.0 on pci0
pcib1: <PCI-PCI bridge> at device 1.0 on pci0
pci1: <PCI bus> on pcib1
pci1: <display, VGA> at device 0.0 (no driver attached)
cbb0: <RF5C476 PCI-CardBus Bridge> mem 0xe6400000-0xe6400fff irq 12 at 
device 10.0 on pci0
cardbus0: <CardBus bus> on cbb0
pccard0: <16-bit PCCard bus> on cbb0
cbb1: <RF5C476 PCI-CardBus Bridge> mem 0xe6405000-0xe6405fff irq 5 at 
device 10.1 on pci0
cardbus1: <CardBus bus> on cbb1
pccard1: <16-bit PCCard bus> on cbb1
fwohci0: <VIA Fire II (VT6306)> port 0xb000-0xb07f mem 
0xe640a000-0xe640a7ff irq 5 at device 13.0 on pci0
fwohci0: [GIANT-LOCKED]
fwohci0: OHCI version 1.0 (ROM=1)
fwohci0: No. of Isochronous channels is 4.
fwohci0: EUI64 00:40:63:50:00:01:a5:87
fwohci0: Phy 1394a available S400, 2 ports.
fwohci0: Link S400, max_rec 2048 bytes.
firewire0: <IEEE1394(FireWire) bus> on fwohci0
sbp0: <SBP-2/SCSI over FireWire> on firewire0
fwe0: <Ethernet over FireWire> on firewire0
if_fwe0: Fake Ethernet address: 02:40:63:01:a5:87
fwe0: Ethernet address: 02:40:63:01:a5:87
fwohci0: Initiate bus reset
fwohci0: node_id=0xc800ffc0, gen=1, CYCLEMASTER mode
firewire0: 1 nodes, maxhop <= 0, cable IRM = 0 (me)
firewire0: bus manager 0 (me)
uhci0: <VIA 83C572 USB controller> port 0xb400-0xb41f irq 12 at device 16.0 
on pci0
uhci0: [GIANT-LOCKED]
usb0: <VIA 83C572 USB controller> on uhci0
usb0: USB revision 1.0
uhub0: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
uhci1: <VIA 83C572 USB controller> port 0xb800-0xb81f irq 5 at device 16.1 
on pci0
uhci1: [GIANT-LOCKED]
usb1: <VIA 83C572 USB controller> on uhci1
usb1: USB revision 1.0
uhub1: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
uhci2: <VIA 83C572 USB controller> port 0xbc00-0xbc1f irq 7 at device 16.2 
on pci0
uhci2: [GIANT-LOCKED]
usb2: <VIA 83C572 USB controller> on uhci2
usb2: USB revision 1.0
uhub2: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub2: 2 ports with 2 removable, self powered
pci0: <serial bus, USB> at device 16.3 (no driver attached)
isab0: <PCI-ISA bridge> at device 17.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <VIA 8235 UDMA133 controller> port 
0xc000-0xc00f,0x376,0x170-0x177,0x3f6,0x1f0-0x1f7 at device 17.1 on pci0
ata0: channel #0 on atapci0
ata1: channel #1 on atapci0
vr0: <VIA VT6102 Rhine II 10/100BaseTX> port 0xc800-0xc8ff mem 
0xe640c000-0xe640c0ff irq 12 at device 18.0 on pci0
miibus0: <MII bus> on vr0
ukphy0: <Generic IEEE 802.3u media interface> on miibus0
ukphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
vr0: Ethernet address: 00:40:63:d6:7a:cc
vr0: [GIANT-LOCKED]
sio0 port 0x3f8-0x3ff irq 4 on acpi0
sio0: type 16550A, console
sio1 port 0x2f8-0x2ff irq 3 on acpi0
sio1: type 16550A
atkbdc0: <Keyboard controller (i8042)> port 0x64,0x60 irq 1 on acpi0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
orm0: <ISA Option ROM> at iomem 0xc0000-0xcdfff on isa0
fdc0: ready for input in output
fdc0: cmd 3 failed at out byte 1 of 3
ppc0: parallel port not found.
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x100>
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
Timecounter "TSC" frequency 1199794461 Hz quality 800
Timecounters tick every 10.000 msec
acpi_cpu: throttling enabled, 2 steps (100% to 50.0%), currently 100.0%
ad0: 58827MB <QUANTUM FIREBALLP AS60.0/A1Y.1300> [119521/16/63] at 
ata0-master UDMA100
Mounting root from ufs:/dev/ad0s1a
vr0: Using force reset command.








--------------------------------------------------------------------
Mike Tancsa,                                      tel +1 519 651 3400
Sentex Communications,                            mike_at_sentex.net
Providing Internet since 1994                    www.sentex.net
Cambridge, Ontario Canada                         www.sentex.net/mike
Received on Tue Aug 24 2004 - 13:01:34 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:08 UTC