This is current/i386 on an ALIX - dmesg below
It's my home wifi router via athn(4).

It seems that changing the wpakey causes a panic
if there are wifi clients associated. After I tweak the
hostname.athn0 to used the new wpakey,

        # cat /etc/hostname.athn0
        inet 192.168.33.1 255.255.255.0 NONE
        media autoselect mediaopt hostap mode 11g chan 11
        nwid stare.cz wpakey PASSWORDHERE

this is what happens:

# sh -x /etc/netstart athn0
+ set +o sh
+ id -u
+ let 0 != 0
+ . /etc/rc.d/rc.subr
+ FUNCS_ONLY=1
+ _rc_actions=start stop restart reload check
+ readonly _rc_actions
+ [ -n 1 ]
+ return
+ _rc_parse_conf
+ PRINT_ONLY=false
+ V4_DHCPCONF=false
+ V6_AUTOCONF=false
+ getopts :n opt
+ shift 0
+ false
+ false
p sysctl -q net.inet6.ip6.soiikey=7ba282b71ed026ff4cc964c9e57a0e71
+ let 1 > 0
+ aifstart athn0
nic: ieee80211_encrypt: key unset for sw crypto: 0
Stopped at      db_enter+0x4:   popl    %ebp
    TID    PID    UID     PRFLAGS     PFLAGS  CPU  COMMAND
*402536  42511      0         0x3          0    0  ifconfig
db_enter() at db_enter+0x4
panic(d0b780c2) at panic+0xcc
ieee80211_encrypt(d193e030,d195c000,d193eb00) at ieee80211_encrypt+0x70
ar5008_tx(d193e000,d195c000,d1990000,2) at ar5008_tx+0x9b
ar5008_swba_intr(d193e000) at ar5008_swba_intr+0x238
ar5008_intr(d193e000) at ar5008_intr+0x12f
intr_handler(f372944c,d1935480) at intr_handler+0x18
Xintr_legacy9_untramp() at Xintr_legacy9_untramp+0xf7
end of kernel
https://www.openbsd.org/ddb.html describes the minimum info required in bug
reports.  Insufficient info makes it difficult to find and fix bugs.

ddb> trace
db_enter() at db_enter+0x4
panic(d0b780c2) at panic+0xcc
ieee80211_encrypt(d193e030,d195c000,d193eb00) at ieee80211_encrypt+0x70
ar5008_tx(d193e000,d195c000,d1990000,2) at ar5008_tx+0x9b
ar5008_swba_intr(d193e000) at ar5008_swba_intr+0x238
ar5008_intr(d193e000) at ar5008_intr+0x12f
intr_handler(f372944c,d1935480) at intr_handler+0x18
Xintr_legacy9_untramp() at Xintr_legacy9_untramp+0xf7
end of kernel

ddb> ps
   PID     TID   PPID    UID  S       FLAGS  WAIT          COMMAND
*42511  402536  16918      0  7         0x3                ifconfig
 16918   65954   7176      0  3    0x10008b  pause         sh
  7176  195115      1      0  3    0x10008b  pause         ksh
 39636  276573      1      0  3    0x100098  poll          cron
 50319  116399  67423     74  3    0x100092  bpf           pflogd
 67423  115038      1      0  3        0x80  netio         pflogd
  6429  504036      1     79  3    0x100090  kqread        tftpd
 89081  471963  97968     95  3    0x100092  kqread        smtpd
 69172  235576  97968    103  3    0x100092  kqread        smtpd
 93551  495188  97968     95  3    0x100092  kqread        smtpd
 48333  425981  97968     95  3    0x100092  kqread        smtpd
 74393  225787  97968     95  3    0x100092  kqread        smtpd
 23071  274116  97968     95  3    0x100092  kqread        smtpd
 97968  252852      1      0  3    0x100080  kqread        smtpd
 54496  519475      1     77  3    0x100090  poll          dhcpd
 83016  322113      1      0  3        0x80  select        sshd
 55084  409085      1      0  3    0x100080  poll          ntpd
 19536   72605   9702     83  3    0x100092  poll          ntpd
  9702   89424      1     83  3    0x100092  poll          ntpd
 82303  414616      1     53  3        0x90  kqread        unbound
 80058  460534  32429     97  3    0x100090  kqread        nsd
-32429or193013  94599     97  3    0x100090  poll          nsd
 94599  500502      1     97  3    0x100090  kqread        nsd
 81325  222879  42514     74  3    0x100092  bpf           pflogd
 42514  289357      1      0  3        0x80  netio         pflogd
 57711  190343   7938     73  3    0x100090  kqread        syslogd
  7938  237583      1      0  3    0x100082  netio         syslogd
 50143   65556  59920    115  3    0x100092  kqread        slaacd
  7553  158390  59920    115  3    0x100092  kqread        slaacd
 59920   27928      1      0  3    0x100080  kqread        slaacd
 50619   91852      0      0  2     0x14200                zerothread
 95698  341284      0      0  3     0x14200  aiodoned      aiodoned
 78346  384185      0      0  3     0x14200  syncer        update
 35483   96485      0      0  3     0x14200  cleaner       cleaner
 37455  212619      0      0  3     0x14200  reaper        reaper
 97057  373157      0      0  3     0x14200  pgdaemon      pagedaemon
 91493   60759      0      0  3     0x14200  bored         crynlk
 35056   57745      0      0  3     0x14200  bored         crypto
 98887  438542      0      0  3     0x14200  usbtsk        usbtask
  7033  285367      0      0  3     0x14200  usbatsk       usbatsk
 67842   14075      0      0  3     0x14200  bored         sensors
 64913  152421      0      0  3     0x14200  bored         softnet
 58192  505341      0      0  3     0x14200  bored         systqmp
 14935  112859      0      0  3     0x14200  bored         systq
-41646or205859      0      0  3  0x40014200  bored         softclock
 63289  164039      0      0  3  0x40014200                idle0
 33873  301870      0      0  3     0x14200  bored         smr
 51627   52627      0      0  3     0x14200  kmalloc       kmthread
     1  371028      0      0  3        0x82  wait          init
     0       0     -1      0  3     0x10200  scheduler     swapper
ddb> show panic
ieee80211_encrypt: key unset for sw crypto: 0


This never happens if there are no clients attached. For example,
I can switch between two unused wpakeys and run 'netstart athn0'
over and back ten times. But as soon as I change it back to my
real wpakey, a client will attach, and the next 'netstart athn0'
will result in the above panic.

Am I missing something obvious?
Is this a known caveat of athn?
How can I further debug this?

        Jan


OpenBSD 6.6-current (GENERIC) #398: Sun Nov 24 09:25:34 MST 2019
    dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC
real mem  = 267931648 (255MB)
avail mem = 247406592 (235MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: date 11/05/08, BIOS32 rev. 0 @ 0xfd088
pcibios0 at bios0: rev 2.1 @ 0xf0000/0x10000
pcibios0: pcibios_get_intr_routing - function not supported
pcibios0: PCI IRQ Routing information unavailable.
pcibios0: PCI bus #0 is the last bus
bios0: ROM list: 0xe0000/0xa800
cpu0 at mainbus0: (uniprocessor)
cpu0: Geode(TM) Integrated Processor by AMD PCS ("AuthenticAMD" 586-class) 499 
MHz, 05-0a-02
cpu0: FPU,DE,PSE,TSC,MSR,CX8,SEP,PGE,CMOV,CFLUSH,MMX,MMXX,3DNOW2,3DNOW
mtrr: K6-family MTRR support (2 registers)
pci0 at mainbus0 bus 0: configuration mode 1 (no bios)
pchb0 at pci0 dev 1 function 0 "AMD Geode LX" rev 0x33
glxsb0 at pci0 dev 1 function 2 "AMD Geode LX Crypto" rev 0x00: RNG AES
vr0 at pci0 dev 9 function 0 "VIA VT6105M RhineIII" rev 0x96: irq 10, address 
00:0d:b9:1a:a4:10
ukphy0 at vr0 phy 1: Generic IEEE 802.3u media interface, rev. 3: OUI 0x004063, 
model 0x0034
vr1 at pci0 dev 10 function 0 "VIA VT6105M RhineIII" rev 0x96: irq 11, address 
00:0d:b9:1a:a4:11
ukphy1 at vr1 phy 1: Generic IEEE 802.3u media interface, rev. 3: OUI 0x004063, 
model 0x0034
vr2 at pci0 dev 11 function 0 "VIA VT6105M RhineIII" rev 0x96: irq 15, address 
00:0d:b9:1a:a4:12
ukphy2 at vr2 phy 1: Generic IEEE 802.3u media interface, rev. 3: OUI 0x004063, 
model 0x0034
athn0 at pci0 dev 12 function 0 "Atheros AR9280" rev 0x01: irq 9
athn0: AR9280 rev 2 (2T2R), ROM rev 22, address 04:f0:21:01:d6:86
glxpcib0 at pci0 dev 15 function 0 "AMD CS5536 ISA" rev 0x03: rev 3, 32-bit 
3579545Hz timer, watchdog, gpio, i2c
gpio0 at glxpcib0: 32 pins
iic0 at glxpcib0
maxtmp0 at iic0 addr 0x4c: lm86
pciide0 at pci0 dev 15 function 2 "AMD CS5536 IDE" rev 0x01: DMA, channel 0 
wired to compatibility, channel 1 wired to compatibility
wd0 at pciide0 channel 0 drive 0: <SDCFHS-016G>
wd0: 1-sector PIO, LBA48, 15279MB, 31293360 sectors
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 2
pciide0: channel 1 ignored (disabled)
ohci0 at pci0 dev 15 function 4 "AMD CS5536 USB" rev 0x02: irq 12, version 1.0, 
legacy support
ehci0 at pci0 dev 15 function 5 "AMD CS5536 USB" rev 0x02: irq 12
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 configuration 1 interface 0 "AMD EHCI root hub" rev 2.00/1.00 
addr 1
isa0 at glxpcib0
isadma0 at isa0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
com0: console
com1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
usb1 at ohci0: USB revision 1.0
uhub1 at usb1 configuration 1 interface 0 "AMD OHCI root hub" rev 1.00/1.00 
addr 1
nvram: invalid checksum
vscsi0 at root
scsibus1 at vscsi0: 256 targets
softraid0 at root
scsibus2 at softraid0: 256 targets
root on wd0a (9cd0e5ba033bd225.a) swap on wd0b dump on wd0b
clock: unknown CMOS layout

Reply via email to