[BUG] reproduceable PANIC in recent hostap driver
JuanJo Ciarlante
jjo-hostap-dated-1067090346.ac6e47
Mon Oct 20 06:58:53 PDT 2003
[same previous response to Jouni, re-sent to list]
On Sun, Oct 19, 2003 at 09:01:29PM -0700, Jouni Malinen wrote:
> On Mon, Oct 20, 2003 at 12:17:33AM -0300, JuanJo Ciarlante wrote:
>
> > stupid me |-( : ifconfig wlan0 down
>
> I was unable to reproduce this. I tested with Linux 2.4.22, ospfd from
> zebra 0.93b (using pretty much the sample configuration file with router
> and network entry uncommented), and Host AP driver 0.1.1. Setting wlan0
> up or down did not tricker any errors. However, I don't know whether
> ospfd really did anything in this case.
>
> Please give more details about your setup. It would be ideal if you
> could send me a sample configuration file for ospfd and all the commands
> needed to reproduce this (i.e., ifconfig with IP addresses etc.). The
> simpler the test, the better..
I'm attaching my /etc/network/interfaces and /etc/zebra/ospfd.conf
(default zebra.conf, edited /etc/zebra/daemons file to spawn osfpd on start)
With that files "installed", the following sequence should trigger:
(unfortunately from memory, can confirm tonight)
killall -v zebra ospfd
ifup wlan0
/etc/init.d/zebra start
ps ax | egrep '(zebra|ospfd)' # confirm ospfd process running
ifconfig wlan0 down
Some notes:
1) reading my /etc/network/interfaces I recalled that sometime ago I've added
a 2ndary address ("ip addr add dev wlan0 ...")
I could try removing this additional address (this night).
2) To see if ospfd was "enabled" on the interface you can run
vtysh -e 'sh ip o in' # abbreb. of "show ip ospf interfaces"
To see which interfaces have 224.0.0.5 multicast address:
ip maddr
(Attached .out files show my output for both)
>
> > interesting... ip monitor all on my 2.4.22 shows the following errors about
> > 2~3/second while wlan0 is up (although is doesn't panic as ospfd when
> > downing the iface):
> >
> > bash# ip monitor all
> > BUG: nil ifname
>
> Yes, ip does not know how to parse all the netlink messages, but this
> should not be related to the panic in any way.
Does it also happens on 2.6 ?
> > dunno, but I'll try to strace it ``to death''.
> > What I'm sure is that ospfd process hold a raw socket (from lsof) that I
> > assume to be netlink .
>
> That should be fine; so did ip monitor without a crash.
I straced ospfd to death 2 times, in both cases the panic emerged just after
setsockopt(... IP_DROP_MEMBERSHIP ...)
this should trigger IGMP msg.
I'll try to debug this further, in particular, try to show 'ifindex' value
passed to setsockopt syscall.
IMPORTANT: Paying yet more attention to OOps found that it pointed
to kernel/sched.c line 564 "Scheduling in interrupt" BUG().
I'll try to catch more addresses, I have a short window because after
panic hostap driver shows the "wlan0: SW TICK stuck " lines (mhhh... I should
comment them on src).
OTOH waiting P166 boot requires 1995's patience 8)
> Have you tested whether you can trigger similar kernel panic without Host AP driver?
I've tried by playing the ospfd/ifdown game with eth0 with no news.
> Do you happen to be using Linux bridge code or is this just IP routing (or
> is it enough to just run 'ifconfig wlan0 up; ifconfig wlan0 down' to
> trigger the panic)?
No bridging, routing enabled (but not used during last testset).
Two openvpn links (they appear as UDP streams on wlan0) without OSPF
on corresp. tun[01] interfaces.
BTW the wlan network has a "permanent" albeit not "heavy"
constant traffic (mcast OSPF from neighbors, unicast usage, etc).
Regards
--
--Juanjo
# Juan Jose Ciarlante (JuanJo PGP) jjo ;at; mendoza.gov.ar #
# Key fingerprint = 76 60 A5 76 FD D2 53 E3 50 C7 90 20 22 8C F1 2D #
-------------- next part --------------
auto lo
iface lo inet loopback
address 127.0.0.1
network 127.0.0.0
netmask 255.0.0.0
auto eth0
iface eth0 inet static
address 10.55.14.1
network 10.55.14.0
netmask 255.255.255.0
broadcast 10.55.14.255
auto wlan0
iface wlan0 inet static
address 10.55.0.14
network 10.55.0.0
netmask 255.255.255.0
broadcast 10.55.0.255
gateway 10.55.0.7
#workaround to avoid PANIC:
pre-down killall ospfd zebra;rm -fv /var/run/zebra.pid
#
down ip addr del dev wlan0 10.55.0.114
up ip addr add dev wlan0 10.55.0.114
up test -d /proc/net/hostap && /sbin/iwconfig wlan0 mode managed essid lugmen && \
/sbin/iwconfig wlan0 txpower auto && \
exit 0
-------------- next part --------------
! -*- ospf -*-
!
! OSPFd sample configuration file
! para mendoza-wireless
!
! Editame y cambia' el nro 14 (aparece 3 veces: router-id, net y area)
! por _TU_ nro de estacion.
!
!
hostname ospfd
!password [passwd]
!enable password [passwd]
!
interface eth0
interface wlan0
ip ospf priority 100
!
router ospf
router-id 10.55.0.14
network 10.55.0.0/24 area 0
network 10.55.14.0/24 area 14
redistribute kernel
redistribute connected
distribute-list net-10-55-0-0 out connected
distribute-list net-10-55-0-0 out kernel
passive-interface eth0
!
!access-list net-10-0-0-0 permit 10.0.0.0/8
!access-list net-10-0-0-0 deny any
access-list net-10-55-0-0 permit 10.55.0.0/16
access-list net-10-55-0-0 deny any
!
! Solamente permitir las siguientes rutas
!
route-map just-10-55-0-0 permit 10
match ip address net-10-55-0-0
!
! log stdout
log file /var/log/zebra/ospfd.log
-------------- next part --------------
eth0 is up, line protocol is up
Internet Address 10.55.14.1/24, Area (0.0.0.14)
Router ID 10.55.0.14, Network Type BROADCAST, Cost: 10
Transmit Delay is 1 sec, State DR, Priority 1
Designated Router (ID) 10.55.0.14, Interface Address 10.55.14.1
No backup designated router on this network
Timer intarvals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
No Hellos (Passive interface)
Neighbor Count is 0, Adjacent neighbor count is 0
wlan0 is up, line protocol is up
Internet Address 10.55.0.14/24, Area (0.0.0.0)
Router ID 10.55.0.14, Network Type BROADCAST, Cost: 10
Transmit Delay is 1 sec, State DR, Priority 100
Designated Router (ID) 10.55.0.14, Interface Address 10.55.0.14
Backup Designated Router (ID) 10.55.0.2, Interface Address 10.55.0.2
Timer intarvals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:03
Neighbor Count is 1, Adjacent neighbor count is 1
Internet Address 10.55.0.114/32, Area (0.0.0.0)
Router ID 10.55.0.14, Network Type BROADCAST, Cost: 10
Transmit Delay is 1 sec, State DR, Priority 100
Designated Router (ID) 10.55.0.14, Interface Address 10.55.0.114
No backup designated router on this network
Timer intarvals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:02
Neighbor Count is 0, Adjacent neighbor count is 0
lo is up, line protocol is up
OSPF not enabled on this interface
tun0 is up, line protocol is up
OSPF not enabled on this interface
tun1 is up, line protocol is up
OSPF not enabled on this interface
-------------- next part --------------
1: lo
inet 224.0.0.1
2: eth0
link 01:00:5e:00:00:06
link 01:00:5e:00:00:05
link 01:00:5e:00:00:01
inet 224.0.0.6
inet 224.0.0.5
inet 224.0.0.1
3: wlan0
link 01:00:5e:00:00:06
link 01:00:5e:00:00:05
link 01:00:5e:00:00:01
inet 224.0.0.6
inet 224.0.0.5
inet 224.0.0.1
8: tun0
inet 224.0.0.1
9: tun1
inet 224.0.0.1
More information about the Hostap
mailing list