hostapd 0.7.2 segmentation fault
Dan Williams
dcbw
Tue Jun 1 22:19:46 PDT 2010
On Wed, 2010-05-26 at 02:35 -0700, Dan Williams wrote:
> On Wed, 2010-05-26 at 16:34 +0900, Alan wrote:
> > Hello,
> >
> > I get a segmentation fault every time I try to run hostapd version
> > 0.7.2. Version 0.6.10 works fine.
> >
> > My hardware is: Atheros AR5008
> > Linux is 2.6.34 and I'm using madwifi from subversion, release 4129.
> > I built hostapd using the same source of madwifi as I'm using for the
> > kernel module.
> > ath_pci.ko parameters are: countrycode=840 autocreate=ap
> > I don't change anything via sysctl or iwpriv.
> > ath0 is in a bridge with other 3 network interfaces.
> >
> > This is my /etc/hostapd.conf file:
> > --------------------
> > ctrl_interface=/var/run/hostapd
> > #driver=nl80211
> > driver=madwifi
> > bridge=br0
> > interface=ath0
> > ssid=r1
> > hw_mode=g
> > ieee80211n=1
> > ht_capab=[HT40-][SHORT-GI-40][DSSS_CCK-40][AMPDU]
> > # no sirve: ht_capab=[HT40-][HT40+][SHORT-GI-40][DSSS_CCK-40]
> > channel=11
> >
> > auth_algs=3
> > wpa=3
> > wpa_passphrase=chavez sucks
> > wpa_key_mgmt=WPA-PSK
> > wpa_pairwise=TKIP
> > rsn_pairwise=CCMP
> > --------------------
> >
> > This is a gdb backtrace:
> >
> > (gdb) run -B -P /var/run/hostapd.pid /etc/hostapd.conf
> > Starting program: /usr/sbin/hostapd -B -P /var/run/hostapd.pid /etc/hostapd.conf
> > Configuration file: /etc/hostapd.conf
> > Using interface ath0 with hwaddr 00:23:6c:be:e3:eb and ssid 'r1'
> >
> > Program received signal SIGSEGV, Segmentation fault.
> > 0x0809a840 in hostapd_eid_ht_capabilities (hapd=0x80b2db8,
> > eid=0x80b3abe "-\032N\020") at ../src/ap/ieee802_11_ht.c:42
> > 42 cap->a_mpdu_params = hapd->iface->current_mode->a_mpdu_params;
>
> When you get here, grab the output of the following too:
>
> print hapd
> print hapd->iface
> print hapd->iface->current_mode
>
> to get an idea of exactly what is causing the segfault.
>
> Dan
>
> > (gdb) bt
> > #0 0x0809a840 in hostapd_eid_ht_capabilities (hapd=0x80b2db8,
> > eid=0x80b3abe "-\032N\020") at ../src/ap/ieee802_11_ht.c:42
> > #1 0x08094d4c in ieee802_11_set_beacon (hapd=0x80b2db8) at
> > ../src/ap/beacon.c:418
> > #2 0x080530f9 in hostapd_setup_bss (hapd=0x80b2db8, first=1) at
> > ../src/ap/hostapd.c:611
> > #3 0x08053535 in hostapd_setup_interface_complete (iface=0x80b23e0,
> > err=0) at ../src/ap/hostapd.c:739
> > #4 0x08053321 in setup_interface (iface=0x80b23e0) at ../src/ap/hostapd.c:685
> > #5 0x08053606 in hostapd_setup_interface (iface=0x80b23e0) at
> > ../src/ap/hostapd.c:776
> > #6 0x0804d280 in hostapd_interface_init (interfaces=0xbffff720,
> > config_fname=0xbffff976 "/etc/hostapd.conf", debug=0) at main.c:313
> > #7 0x0804d666 in main (argc=5, argv=0xbffff814) at main.c:541
Off-list reply from Alan reproduced here:
---------
Ok, so here is what you requested, it looks like the structure is
there but hapd->iface->current_mode is NULL
(gdb) bt
#0 0x0809a840 in hostapd_eid_ht_capabilities (hapd=0x80b2dc0,
eid=0x80b3ac6 "-\032N\020") at ../src/ap/ieee802_11_ht.c:42
#1 0x08094d4c in ieee802_11_set_beacon (hapd=0x80b2dc0)
at ../src/ap/beacon.c:418
#2 0x080530f9 in hostapd_setup_bss (hapd=0x80b2dc0, first=1)
at ../src/ap/hostapd.c:611
#3 0x08053535 in hostapd_setup_interface_complete (iface=0x80b23e0,
err=0)
at ../src/ap/hostapd.c:739
#4 0x08053321 in setup_interface (iface=0x80b23e0)
at ../src/ap/hostapd.c:685
#5 0x08053606 in hostapd_setup_interface (iface=0x80b23e0)
at ../src/ap/hostapd.c:776
#6 0x0804d280 in hostapd_interface_init (interfaces=0xbffffc30,
config_fname=0xbffffe84 "/etc/hostapd-ath0.conf", debug=0) at
main.c:313
#7 0x0804d666 in main (argc=5, argv=0xbffffd24) at main.c:541
(gdb) print hapd
$1 = (struct hostapd_data *) 0x80b2dc0
(gdb) print hapd->iface
$2 = (struct hostapd_iface *) 0x80b23e0
(gdb) print hapd->iface->current_mode
$3 = (struct hostapd_hw_modes *) 0x0
----------
More information about the Hostap
mailing list