>Number: 6465
>Category: kernel
>Synopsis: kernel panic on ifconfig tsec1 down, no media connected, but
>enabled in hostname.tsec1
>Confidential: yes
>Severity: serious
>Priority: medium
>Responsible: bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: unknown
>Arrival-Date: Tue Sep 14 17:00:01 GMT 2010
>Closed-Date:
>Last-Modified:
>Originator:
>Release:
>Organization:
>Environment:
System : OpenBSD 4.8
Details : OpenBSD 4.8-current (GENERIC) #44: Tue Sep 7 05:17:33
MDT 2010
[email protected]:/usr/src/sys/arch/socppc/compile/GENERIC
Architecture: OpenBSD.socppc
Machine : socppc, Mikrotik RB600A
>Description:
This problem seems like it might be a quirk with the tsec driver.
Basically, by accident,
I copied over some old configuration, which included hostname.tsec1. tsec1 was
not connected.
After playing around with the system I saw that tsec1 was UP, but I remembered
nothing was connected,
so of course I typed "ifconfig tsec1 down". This caused a kernel panic
immediately. After
rebooting, I tried taking other interfaces up and down; this caused no trouble.
But when I issued
the "ifconfig tsec1 down" again, the kernel panicked again. I did this a few
more times to be sure.
>How-To-Repeat:
1. Boot your RB600A with /etc/hostname.tsec1 containing a static IP
address, be sure the port
is disconnected.
2. Log in. "ifconfig -a" should show tsec1 as UP.
3. Issue "ifconfig tsec1 down". The kernel will now panic.
>Fix:
If you connect ethernet to the port before issuing "ifconfig tsec1
down" the kernel will not
panic. It also seems that you may also leave the interface in the UP
state indefinitely,
provided "ifconfig tsec1 down" isn't executed.
dmesg:
OpenBSD 4.8-current (GENERIC) #44: Tue Sep 7 05:17:33 MDT 2010
[email protected]:/usr/src/sys/arch/socppc/compile/GENERIC
real mem = 134217728 (128MB)
avail mem = 124489728 (118MB)
mainbus0 at root
cpu0 at mainbus0: 8347
obio0 at mainbus0
"wdt" at obio0 offset 0x00200 not configured
com0 at obio0 offset 0x04500 ivec 9: st16650, no working fifo
com0: console
socpcic0 at obio0 offset 0x08500
pci0 at socpcic0 bus 0
"Freescale MPC8343" rev 0x30 at pci0 dev 0 function 0 not configured
vge0 at pci0 dev 11 function 0 "VIA VT612x" rev 0x11: ivec 21, address
00:0c:42:41:be:c3
ciphy0 at vge0 phy 1: CS8201 10/100/1000TX PHY, rev. 2
athn0 at pci0 dev 14 function 0 "Atheros AR9280" rev 0x01: ivec 18, address
00:0c:42:61:39:b3
athn0: AR9280 rev 2 (2T2R), ROM rev 21
ipic0 at obio0 offset 0x00700
"mdio" at obio0 offset 0x24520 not configured
tsec0 at obio0 offset 0x25000 ivec 35: address 00:0c:42:41:be:c1
rgephy0 at tsec0 phy 0: RTL8169S/8110S PHY, rev. 2
tsec1 at obio0 offset 0x24000 ivec 32: address 00:0c:42:41:be:c2
rgephy1 at tsec1 phy 1: RTL8169S/8110S PHY, rev. 2
"gpio" at obio0 offset 0x00c08 not configured
"beeper" at obio0 offset 0x00500 not configured
"led" at obio0 not configured
"fancon" at mainbus0 not configured
"nand" at mainbus0 not configured
"nnand" at mainbus0 not configured
"flash" at mainbus0 not configured
wdc0 at mainbus0
wd0 at wdc0 channel 0 drive 0: <ELITE PRO CF CARD 16GB>
wd0: 1-sector PIO, LBA, 15279MB, 31293360 sectors
wd0(wdc0:0:0): using BIOS timings
wdc1 at mainbus0
wd1 at wdc1 channel 0 drive 0: <SanDisk SDCFB-128>
wd1: 1-sector PIO, LBA, 122MB, 250880 sectors
wd1(wdc1:0:0): using BIOS timings
softraid0 at root
root on wd0a swap on wd0b dump on wd0b
WARNING: / was not properly unmounted
WARNING: clock lost 14802 days, using FS time -- CHECK AND RESET THE DATE!
usbdevs:
usbdevs: no USB controllers found
pcidump:
Domain /dev/pci0:
0:0:0: Freescale MPC8343
0x0000: Vendor ID: 1957 Product ID: 0087
0x0004: Command: 0106 Status ID: 20b0
0x0008: Class: 0b Subclass: 20 Interface: 00 Revision: 30
0x000c: BIST: 00 Header Type: 00 Latency Timer: 00 Cache Line Size: 08
0x0010: BAR mem 32bit addr: 0x00000000/0x00100000
0x0014: BAR empty (00000000)
0x0018: BAR mem 64bit addr: 0x0000000000000000/0x00000000
0x0020: BAR mem prefetchable 64bit addr: 0x0000000000000000/0x10000000
0x0028: Cardbus CIS: 00000000
0x002c: Subsystem Vendor ID: 0000 Product ID: 0000
0x0030: Expansion ROM Base Address: 00000000
0x0038: 00000000
0x003c: Interrupt Pin: 01 Line: 00 Min Gnt: 00 Max Lat: 00
0x0048: Capability 0x06: CompactPCI Hot Swap
0x0000: 00871957 20b00106 0b200030 00000008
0x0010: 00000000 00000000 00000004 00000000
0x0020: 0000000c 00000000 00000000 00000000
0x0030: 00000000 00000048 00000000 00000100
0x0040: 00000000 00000020 00000006 00000000
0x0050: 00000000 00000000 00000000 00000000
0x0060: 00000000 00000000 00000000 00000000
0x0070: 00000000 00000000 00000000 00000000
0x0080: 00000000 00000000 00000000 00000000
0x0090: 00000000 00000000 00000000 00000000
0x00a0: 00000000 00000000 00000000 00000000
0x00b0: 00000000 00000000 00000000 00000000
0x00c0: 00000000 00000000 00000000 00000000
0x00d0: 00000000 00000000 00000000 00000000
0x00e0: 00000000 00000000 00000000 00000000
0x00f0: 00000000 00000000 00000000 00000000
0:11:0: VIA VT612x
0x0000: Vendor ID: 1106 Product ID: 3119
0x0004: Command: 0007 Status ID: 0230
0x0008: Class: 02 Subclass: 00 Interface: 00 Revision: 11
0x000c: BIST: 00 Header Type: 00 Latency Timer: 00 Cache Line Size: 00
0x0010: BAR io addr: 0x00000000/0x0100
0x0014: BAR mem 32bit addr: 0x80000000/0x00000100
0x0018: BAR empty (00000000)
0x001c: BAR empty (00000000)
0x0020: BAR empty (00000000)
0x0024: BAR empty (00000000)
0x0028: Cardbus CIS: 00000000
0x002c: Subsystem Vendor ID: 100d Product ID: 086c
0x0030: Expansion ROM Base Address: 00000000
0x0038: 00000000
0x003c: Interrupt Pin: 01 Line: f1 Min Gnt: 00 Max Lat: 00
0x0050: Capability 0x01: Power Management
0x0000: 31191106 02300007 02000011 00000000
0x0010: 00000001 80000000 00000000 00000000
0x0020: 00000000 00000000 00000000 086c100d
0x0030: 00000000 00000050 00000000 000001f1
0x0040: 00000000 00000000 00000000 00000000
0x0050: f6820001 00000000 00000000 00000000
0x0060: 00000000 00000000 00000000 00000000
0x0070: 00000000 00000000 00000000 00000000
0x0080: 00000000 00000000 00000000 00000000
0x0090: 00000000 00000000 00000000 00000000
0x00a0: 00000000 00000000 00000000 00000000
0x00b0: 00000000 00000000 00000000 00000000
0x00c0: 00000000 00000000 00000000 00000000
0x00d0: 00000000 00000000 00000000 00000000
0x00e0: 00000000 00000000 00000000 00000000
0x00f0: 00000000 00000000 00000000 00000000
0:14:0: Atheros AR9280
0x0000: Vendor ID: 168c Product ID: 0029
0x0004: Command: 0006 Status ID: 02b0
0x0008: Class: 02 Subclass: 80 Interface: 00 Revision: 01
0x000c: BIST: 00 Header Type: 00 Latency Timer: a8 Cache Line Size: 00
0x0010: BAR mem 32bit addr: 0x80010000/0x00010000
0x0014: BAR empty (00000000)
0x0018: BAR empty (00000000)
0x001c: BAR empty (00000000)
0x0020: BAR empty (00000000)
0x0024: BAR empty (00000000)
0x0028: Cardbus CIS: 00000000
0x002c: Subsystem Vendor ID: 168c Product ID: 4204
0x0030: Expansion ROM Base Address: 00000000
0x0038: 00000000
0x003c: Interrupt Pin: 01 Line: 00 Min Gnt: 00 Max Lat: 00
0x0044: Capability 0x01: Power Management
0x0000: 0029168c 02b00006 02800001 0000a800
0x0010: 80010000 00000000 00000000 00000000
0x0020: 00000000 00000000 00000000 4204168c
0x0030: 00000000 00000044 00000000 00000100
0x0040: 00000080 48820001 00000000 00000000
0x0050: 00000000 00000000 00000000 00000000
0x0060: 00000000 00000000 00000000 00000000
0x0070: 00000000 00000000 00000000 00000000
0x0080: 00000000 00000000 00000000 00000000
0x0090: 00000000 00000000 00000000 00000000
0x00a0: 00000000 00000000 00000000 00000000
0x00b0: 00000000 00000000 00000000 00000000
0x00c0: 00000000 00000000 00000000 00000000
0x00d0: 00000000 00000000 00000000 00000000
0x00e0: 00000000 00000000 00000000 00000000
0x00f0: 00000000 00000000 00000000 00000000
acpidump:
trace/ps/other:
tsec_watchdog
panic: kernel diagnostic assertion "n != 100" failed: file
"../../../../arch/socppc/dev/if_tsec.c", line 1214
Stopped at Debugger+0x10: lwz r0,20(r1)
RUN AT LEAST 'trace' AND 'ps' AND INCLUDE OUTPUT WHEN REPORTING THIS PANIC!
DO NOT EVEN BOTHER REPORTING THIS WITHOUT INCLUDING THAT INFORMATION!
ddb> trace
000000fc: tlbdsmsize+0x14 fp e367fc60 nfp e367fc70
002b1518: panic+0xc8 fp e367fc70 nfp e367fcd0
002b1614: __assert+0x2c fp e367fcd0 nfp e367fce0
0043c164: tsec_stop_dma+0xe0 fp e367fce0 nfp e367fd00
0043c7e8: tsec_down+0x44 fp e367fd00 nfp e367fd20
0043d524: tsec_ioctl+0x1c4 fp e367fd20 nfp e367fd50
002f77b8: ifioctl+0x900 fp e367fd50 nfp e367fe00
002b89b8: soo_ioctl+0x218 fp e367fe00 nfp e367fe10
002b5018: sys_ioctl+0x210 fp e367fe10 nfp e367fed0
0042de1c: trap+0x76c fp e367fed0 nfp e367ff50
0020080c: ddblow+0x1ac fp e367ff50 nfp fffc6b30
ddb> ps
PID PPID PGRP UID S FLAGS WAIT COMMAND
*14984 3589 14984 0 7 0x4000 ifconfig
2933 17414 2933 1000 3 0x4080 kqread tmux
17414 25056 17414 1000 3 0x4080 pause ksh
25056 26670 26670 1000 3 0x180 select sshd
26670 28775 26670 0 3 0x4180 netio sshd
16497 1 16497 0 3 0x4080 ttyin getty
3589 10079 3589 0 3 0x4080 pause ksh
10079 18359 10079 1000 3 0x4080 pause ksh
18359 1 18359 1000 2 0 tmux
22475 1 22475 0 3 0x40180 select sendmail
12996 1 12996 0 3 0x80 select cron
14854 1 14854 0 3 0x180 select inetd
5416 1 5416 77 3 0x180 poll dhcpd
28775 1 28775 0 3 0x80 select sshd
2458 0 0 0 3 0x100200 acct acct
14727 12659 10463 83 3 0x180 poll ntpd
12659 10463 10463 83 3 0x180 poll ntpd
10463 1 10463 0 3 0x80 poll ntpd
1813 22101 22101 70 3 0x180 select named
22101 1 22101 0 3 0x180 netio named
31787 15598 15598 74 3 0x180 bpf pflogd
15598 1 15598 0 3 0x80 netio pflogd
18840 12559 12559 73 3 0x180 poll syslogd
12559 1 12559 0 3 0x88 netio syslogd
10 0 0 0 3 0x100200 bored crypto
9 0 0 0 3 0x100200 aiodoned aiodoned
8 0 0 0 3 0x100200 syncer update
7 0 0 0 3 0x100200 cleaner cleaner
6 0 0 0 3 0x100200 reaper reaper
5 0 0 0 3 0x100200 pgdaemon pagedaemon
4 0 0 0 3 0x100200 pftm pfpurge
3 0 0 0 3 0x100200 bored syswq
2 0 0 0 3 0x40100200 idle0
1 0 1 0 3 0x4080 wait init
0 -1 0 0 3 0x80200 scheduler swapper
ddb> boot reboot
rebooting
tsec_watchdog
panic: kernel diagnostic assertion "n != 100" failed: file "../../../../arch/so
cppc/dev/if_tsec.c", line 1214
Stopped at Debugger+0x10: lwz r0,20(r1)
RUN AT LEAST 'trace' AND 'ps' AND INCLUDE OUTPUT WHEN REPORTING THIS PANIC!
DO NOT EVEN BOTHER REPORTING THIS WITHOUT INCLUDING THAT INFORMATION!
ddb> ps
PID PPID PGRP UID S FLAGS WAIT COMMAND
* 8634 29263 8634 0 7 0x4000 ifconfig
20322 1 20322 77 2 0x180 dhclient
15847 1 20744 0 3 0x80 poll dhclient
29263 12522 29263 0 3 0x4080 pause ksh
12522 14864 12522 1000 3 0x4080 pause ksh
14864 27419 27419 1000 2 0x100 sshd
27419 3175 27419 0 3 0x4180 netio sshd
30586 1 30586 0 3 0x40180 select sendmail
4009 1 4009 0 3 0x4080 ttyin getty
25611 1 25611 0 3 0x80 select cron
27365 1 27365 0 3 0x180 select inetd
17574 1 17574 77 3 0x180 poll dhcpd
3175 1 3175 0 3 0x80 select sshd
29939 0 0 0 3 0x100200 acct acct
20885 21681 32532 83 3 0x180 poll ntpd
21681 32532 32532 83 3 0x180 poll ntpd
32532 1 32532 0 3 0x80 poll ntpd
13869 28443 28443 70 3 0x180 select named
28443 1 28443 0 3 0x180 netio named
201 9159 9159 74 3 0x180 bpf pflogd
9159 1 9159 0 3 0x80 netio pflogd
20848 29542 29542 73 3 0x180 poll syslogd
29542 1 29542 0 3 0x88 netio syslogd
10 0 0 0 3 0x100200 bored crypto
9 0 0 0 3 0x100200 aiodoned aiodoned
8 0 0 0 3 0x100200 syncer update
7 0 0 0 3 0x100200 cleaner cleaner
6 0 0 0 3 0x100200 reaper reaper
5 0 0 0 3 0x100200 pgdaemon pagedaemon
4 0 0 0 3 0x100200 pftm pfpurge
3 0 0 0 3 0x100200 bored syswq
2 0 0 0 3 0x40100200 idle0
1 0 1 0 3 0x4080 wait init
0 -1 0 0 3 0x80200 scheduler swapper
ddb> trace
000000fc: tlbdsmsize+0x14 fp e3625c60 nfp e3625c70
002b1518: panic+0xc8 fp e3625c70 nfp e3625cd0
002b1614: __assert+0x2c fp e3625cd0 nfp e3625ce0
0043c164: tsec_stop_dma+0xe0 fp e3625ce0 nfp e3625d00
0043c7e8: tsec_down+0x44 fp e3625d00 nfp e3625d20
0043d524: tsec_ioctl+0x1c4 fp e3625d20 nfp e3625d50
002f77b8: ifioctl+0x900 fp e3625d50 nfp e3625e00
002b89b8: soo_ioctl+0x218 fp e3625e00 nfp e3625e10
002b5018: sys_ioctl+0x210 fp e3625e10 nfp e3625ed0
0042de1c: trap+0x76c fp e3625ed0 nfp e3625f50
0020080c: ddblow+0x1ac fp e3625f50 nfp fffee530
ddb> boot reboot
rebooting
# ifconfig -a
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33200
priority: 0
groups: lo
inet 127.0.0.1 netmask 0xff000000
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x6
vge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
lladdr 00:1f:90:48:b2:7c
priority: 0
groups: egress
media: Ethernet autoselect (100baseTX full-duplex)
status: active
inet6 fe80::21f:90ff:fe48:b27c%vge0 prefixlen 64 scopeid 0x1
athn0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
lladdr 00:0c:42:61:39:b3
priority: 4
groups: wlan
media: IEEE802.11 autoselect (autoselect hostap)
status: active
ieee80211: nwid "new bogota" chan 1 bssid 00:0c:42:61:39:b3 wpapsk
<key> wpaprotos wpa2 wpaakms psk wpaciphers tkip,ccmp wpagroupcipher tkip
inet 172.32.32.222 netmask 0xffffffe0 broadcast 172.32.32.223
inet6 fe80::20c:42ff:fe61:39b3%athn0 prefixlen 64 scopeid 0x2
tsec0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
lladdr 00:0c:42:41:be:c1
priority: 0
media: Ethernet autoselect (1000baseT full-duplex)
status: active
inet 172.32.32.62 netmask 0xffffffe0 broadcast 172.32.32.63
inet6 fe80::20c:42ff:fe41:bec1%tsec0 prefixlen 64 scopeid 0x3
tsec1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
lladdr 00:0c:42:41:be:c2
priority: 0
media: Ethernet autoselect (none)
status: no carrier
inet 172.32.32.94 netmask 0xffffffe0 broadcast 172.32.32.95
inet6 fe80::20c:42ff:fe41:bec2%tsec1 prefixlen 64 scopeid 0x4
enc0: flags=0<>
priority: 0
groups: enc
status: active
pflog0: flags=141<UP,RUNNING,PROMISC> mtu 33200
priority: 0
groups: pflog
# ifconfig tsec1 down
panic: kernel diagnostic assertion "n != 100" failed: file
"../../../../arch/socppc/dev/if_tsec.c", line 1214
Stopped at Debugger+0x10: lwz r0,20(r1)
RUN AT LEAST 'trace' AND 'ps' AND INCLUDE OUTPUT WHEN REPORTING THIS PANIC!
DO NOT EVEN BOTHER REPORTING THIS WITHOUT INCLUDING THAT INFORMATION!
ddb> trace
000000fc: tlbdsmsize+0x14 fp e3675c60 nfp e3675c70
002b1518: panic+0xc8 fp e3675c70 nfp e3675cd0
002b1614: __assert+0x2c fp e3675cd0 nfp e3675ce0
0043c164: tsec_stop_dma+0xe0 fp e3675ce0 nfp e3675d00
0043c7e8: tsec_down+0x44 fp e3675d00 nfp e3675d20
0043d524: tsec_ioctl+0x1c4 fp e3675d20 nfp e3675d50
002f77b8: ifioctl+0x900 fp e3675d50 nfp e3675e00
002b89b8: soo_ioctl+0x218 fp e3675e00 nfp e3675e10
002b5018: sys_ioctl+0x210 fp e3675e10 nfp e3675ed0
0042de1c: trap+0x76c fp e3675ed0 nfp e3675f50
0020080c: ddblow+0x1ac fp e3675f50 nfp fffefb50
ddb> ps
PID PPID PGRP UID S FLAGS WAIT COMMAND
*28218 31735 28218 0 7 0x4000 ifconfig
9492 11436 7380 0 3 0x44180 netio ping
11436 32742 7380 0 3 0x4080 pause sh
20323 1 20323 0 3 0x40180 select sendmail
31735 1 31735 0 3 0x4080 pause ksh
553 1 553 0 3 0x80 select cron
25323 1 25323 0 3 0x180 select inetd
23776 1 23776 77 3 0x180 poll dhcpd
15221 1 15221 0 3 0x80 select sshd
5652 0 0 0 3 0x100200 acct acct
7643 23510 24081 83 3 0x180 poll ntpd
23510 24081 24081 83 3 0x180 poll ntpd
24081 1 24081 0 3 0x80 poll ntpd
21405 31699 31699 70 2 0x100 named
31699 1 31699 0 3 0x180 netio named
31767 23673 23673 74 3 0x180 bpf pflogd
23673 1 23673 0 3 0x80 netio pflogd
25748 32557 32557 73 3 0x180 poll syslogd
32557 1 32557 0 3 0x88 netio syslogd
23697 1 23697 77 3 0x180 piperd dhclient
32742 1 7380 0 3 0x80 wait dhclient
10 0 0 0 3 0x100200 bored crypto
9 0 0 0 3 0x100200 aiodoned aiodoned
8 0 0 0 3 0x100200 syncer update
7 0 0 0 3 0x100200 cleaner cleaner
6 0 0 0 3 0x100200 reaper reaper
5 0 0 0 3 0x100200 pgdaemon pagedaemon
4 0 0 0 3 0x100200 pftm pfpurge
3 0 0 0 3 0x100200 bored syswq
2 0 0 0 3 0x40100200 idle0
1 0 1 0 3 0x4080 wait init
0 -1 0 0 3 0x80200 scheduler swapper
ddb>
>Release-Note:
>Audit-Trail:
>Unformatted: