[Ninux-Wireless] Debug of possible memory leak in the Kernel (OpenWrt Ninux Firmware)

Saverio Proto zioproto a gmail.com
Mar 2 Lug 2013 19:42:49 CEST


Antonio look at this:
[ 1361.750000] wlan0: deauthenticated from 00:15:6d:8c:b8:c1 (Reason: 2)
[ 1361.750000] ------------[ cut here ]------------
[ 1361.760000] WARNING: at
/home/saverio/SORGENTI/attitude_adjustment/build_dir/linux-ar71xx_generic/compat-wireless-2013-02-22/net/mac80211/chan.c:186
0x80d2524c()

full dmesg attached.

Saverio


2013/7/2 Saverio Proto <zioproto a gmail.com>:
>> Saverio, what kernel version is your node using? If I got it correctly the node
>> suffering from the memory leak is the STA, right?
>
> Hello Antonio,
>
> root a NSM5GalliaNazza:~# uname -a
> Linux NSM5GalliaNazza 3.3.8 #2 Fri May 10 12:40:35 CEST 2013 mips GNU/Linux
> root a NSM5GalliaNazza:~#
>
> It is Attitude Adjustment, you can find the exact git commit in the ninux github
>
> Saverio
-------------- parte successiva --------------
root a NSM5GalliaNazza:~# dmesg 
[    0.000000] Linux version 3.3.8 (saverio a nockid) (gcc version 4.6.3 20120201 (prerelease) (Linaro GCC 4.6-2012.02) ) #2 Fri May 10 12:40:35 CEST 2013
[    0.000000] MyLoader: sysp=aaaaaaaa, boardp=aaa2aaa2, parts=aaaaaaaa
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU revision is: 00019374 (MIPS 24Kc)
[    0.000000] SoC: Atheros AR7241 rev 1
[    0.000000] Clocks: CPU:390.000MHz, DDR:390.000MHz, AHB:195.000MHz, Ref:5.000MHz
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 02000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone PFN ranges:
[    0.000000]   Normal   0x00000000 -> 0x00002000
[    0.000000] Movable zone start PFN for each node
[    0.000000] Early memory PFN ranges
[    0.000000]     0: 0x00000000 -> 0x00002000
[    0.000000] On node 0 totalpages: 8192
[    0.000000] free_area_init_node: node 0, pgdat 802eadc0, node_mem_map 81000000
[    0.000000]   Normal zone: 64 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 8128 pages, LIFO batch:0
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
[    0.000000] Kernel command line:  board=UBNT-BM console=ttyS0,115200 mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,1024k(kernel),6528k(rootfs),256k(cfg)ro,64k(EEPROM)ro,7552k a 0x50000(firmware) rootfstype=squashfs,jffs2 noinitrd
[    0.000000] PID hash table entries: 128 (order: -3, 512 bytes)
[    0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[    0.000000] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 29024k/32768k available (2191k kernel code, 3744k reserved, 414k data, 212k init, 0k highmem)
[    0.000000] SLUB: Genslabs=9, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:51
[    0.000000] Calibrating delay loop... 259.27 BogoMIPS (lpj=1296384)
[    0.070000] pid_max: default: 32768 minimum: 301
[    0.070000] Mount-cache hash table entries: 512
[    0.080000] NET: Registered protocol family 16
[    0.080000] gpiochip_add: registered GPIOs 0 to 17 on device: ath79
[    0.090000] MIPS: machine is Ubiquiti Bullet M
[    0.090000] registering PCI controller with io_map_base unset
[    0.300000] bio: create slab <bio-0> at 0
[    0.310000] PCI host bridge to bus 0000:00
[    0.310000] pci_bus 0000:00: root bus resource [mem 0x10000000-0x13ffffff]
[    0.320000] pci_bus 0000:00: root bus resource [io  0x0000]
[    0.320000] pci 0000:00:00.0: [168c:002a] type 0 class 0x000280
[    0.320000] pci 0000:00:00.0: fixup device configuration
[    0.330000] pci 0000:00:00.0: reg 10: [mem 0x10000000-0x1000ffff 64bit]
[    0.330000] pci 0000:00:00.0: supports D1
[    0.330000] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
[    0.330000] pci 0000:00:00.0: BAR 0: assigned [mem 0x10000000-0x1000ffff 64bit]
[    0.330000] pci 0000:00:00.0: using irq 40 for pin 1
[    0.340000] Switching to clocksource MIPS
[    0.340000] NET: Registered protocol family 2
[    0.350000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.350000] TCP established hash table entries: 1024 (order: 1, 8192 bytes)
[    0.360000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.360000] TCP: Hash tables configured (established 1024 bind 1024)
[    0.370000] TCP reno registered
[    0.370000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.380000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.390000] NET: Registered protocol family 1
[    0.390000] PCI: CLS 0 bytes, default 32
[    0.410000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.410000] JFFS2 version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.430000] msgmni has been set to 56
[    0.430000] io scheduler noop registered
[    0.430000] io scheduler deadline registered (default)
[    0.440000] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    0.470000] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11) is a 16550A
[    0.470000] console [ttyS0] enabled, bootconsole disabled
[    0.490000] m25p80 spi0.0: found s25fl064k, expected m25p80
[    0.490000] m25p80 spi0.0: s25fl064k (8192 Kbytes)
[    0.500000] 7 cmdlinepart partitions found on MTD device spi0.0
[    0.500000] Creating 7 MTD partitions on "spi0.0":
[    0.510000] 0x000000000000-0x000000040000 : "u-boot"
[    0.520000] 0x000000040000-0x000000050000 : "u-boot-env"
[    0.520000] 0x000000050000-0x000000150000 : "kernel"
[    0.530000] 0x000000150000-0x0000007b0000 : "rootfs"
[    0.540000] mtd: partition "rootfs" set to be root filesystem
[    0.540000] mtd: partition "rootfs_data" created automatically, ofs=5C0000, len=1F0000 
[    0.550000] 0x0000005c0000-0x0000007b0000 : "rootfs_data"
[    0.560000] 0x0000007b0000-0x0000007f0000 : "cfg"
[    0.560000] 0x0000007f0000-0x000000800000 : "EEPROM"
[    0.570000] 0x000000050000-0x0000007b0000 : "firmware"
[    0.590000] ag71xx_mdio: probed
[    0.590000] eth0: Atheros AG71xx at 0xb9000000, irq 4
[    1.150000] ag71xx ag71xx.0: eth0: connected to PHY at ag71xx-mdio.1:04 [uid=004dd041, driver=Generic PHY]
[    1.160000] TCP cubic registered
[    1.160000] NET: Registered protocol family 17
[    1.170000] Bridge firewalling registered
[    1.170000] 8021q: 802.1Q VLAN Support v1.8
[    1.180000] VFS: Mounted root (squashfs filesystem) readonly on device 31:3.
[    1.190000] Freeing unused kernel memory: 212k freed
[    3.720000] Registered led device: ubnt:red:link1
[    3.720000] Registered led device: ubnt:orange:link2
[    3.720000] Registered led device: ubnt:green:link3
[    3.720000] Registered led device: ubnt:green:link4
[    6.150000] eth0: link up (100Mbps/Full duplex)
[    7.090000] JFFS2 notice: (399) jffs2_build_xattr_subsystem: complete building xattr subsystem, 1 of xdatum (1 unchecked, 0 orphan) and 30 of xref (0 dead, 5 orphan) found.
[    7.300000] eth0: link down
[    9.560000] Compat-drivers backport release: compat-drivers-2013-01-21-1
[    9.570000] Backport based on wireless-testing.git master-2013-02-22
[    9.570000] compat.git: wireless-testing.git
[    9.750000] cfg80211: Calling CRDA to update world regulatory domain
[    9.750000] cfg80211: World regulatory domain updated:
[    9.760000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[    9.770000] cfg80211:   (2400000 KHz - 2483000 KHz @ 40000 KHz), (N/A, 3000 mBm)
[    9.770000] cfg80211:   (5140000 KHz - 5860000 KHz @ 40000 KHz), (N/A, 3000 mBm)
[   10.060000] NET: Registered protocol family 10
[   10.450000] usbcore: registered new interface driver usbfs
[   10.460000] usbcore: registered new interface driver hub
[   10.470000] usbcore: registered new device driver usb
[   11.160000] PCI: Enabling device 0000:00:00.0 (0000 -> 0002)
[   11.170000] ath: EEPROM regdomain: 0x0
[   11.170000] ath: EEPROM indicates default country code should be used
[   11.170000] ath: doing EEPROM country->regdmn map search
[   11.170000] ath: country maps to regdmn code: 0x3a
[   11.170000] ath: Country alpha2 being used: US
[   11.170000] ath: Regpair used: 0x3a
[   11.180000] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[   11.190000] Registered led device: ath9k-phy0
[   11.190000] ieee80211 phy0: Atheros AR9280 Rev:2 mem=0xb0000000, irq=40
[   11.240000] NET: Registered protocol family 15
[   11.260000] cfg80211: Calling CRDA for country: US
[   11.260000] cfg80211: Regulatory domain changed to country: US
[   11.270000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[   11.270000] cfg80211:   (2400000 KHz - 2483000 KHz @ 40000 KHz), (N/A, 3000 mBm)
[   11.280000] cfg80211:   (5140000 KHz - 5860000 KHz @ 40000 KHz), (N/A, 3000 mBm)
[   11.480000] Initializing XFRM netlink socket
[   11.720000] PPP generic driver version 2.4.2
[   11.770000] tun: Universal TUN/TAP device driver, 1.6
[   11.770000] tun: (C) 1999-2004 Max Krasnyansky <maxk a qualcomm.com>
[   11.940000] IPv4 over IPv4 tunneling driver
[   13.000000] L2TP core driver, V2.0
[   13.020000] L2TP netlink interface
[   13.050000] L2TP ethernet pseudowire support (L2TPv3)
[   13.070000] L2TP IP encapsulation support (L2TPv3)
[   13.120000] GRE over IPv4 demultiplexor driver
[   13.140000] GRE over IPv4 tunneling driver
[   13.290000] ip_tables: (C) 2000-2006 Netfilter Core Team
[   13.590000] NET: Registered protocol family 24
[   13.710000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[   13.750000] nf_conntrack version 0.5.0 (456 buckets, 1824 max)
[   15.110000] xt_time: kernel timezone is -0000
[   16.040000] xt_length2: Unknown symbol ipv6_find_hdr (err 0)
[   16.170000] xt_RAWNAT: Unknown symbol ipv6_find_hdr (err 0)
[   16.220000] xt_SYSRQ: Unknown symbol ipv6_find_hdr (err 0)
[   16.380000] Ebtables v2.0 registered
[   16.860000] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   17.240000] NF_TPROXY: Transparent proxy support initialized, version 4.1.0
[   17.250000] NF_TPROXY: Copyright (c) 2006-2007 BalaBit IT Ltd.
[   17.390000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[   21.640000] ADDRCONF(NETDEV_UP): eth0: link is not ready
[   22.570000] eth0: link up (100Mbps/Full duplex)
[   22.570000] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   25.960000] ADDRCONF(NETDEV_UP): wlan0: link is not ready
[   28.650000] wlan0: authenticate with 00:15:6d:8c:b8:c1
[   28.670000] wlan0: direct probe to 00:15:6d:8c:b8:c1 (try 1/3)
[   28.790000] wlan0: direct probe to 00:15:6d:8c:b8:c1 (try 2/3)
[   28.900000] wlan0: send auth to 00:15:6d:8c:b8:c1 (try 3/3)
[   28.900000] wlan0: authenticated
[   28.930000] wlan0: associate with 00:15:6d:8c:b8:c1 (try 1/3)
[   28.930000] wlan0: RX AssocResp from 00:15:6d:8c:b8:c1 (capab=0x1 status=0 aid=2)
[   28.940000] wlan0: associated
[   28.940000] ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[   33.910000] device eth0 entered promiscuous mode
[  136.800000] wlan0: deauthenticating from 00:15:6d:8c:b8:c1 by local choice (reason=3)
[  137.290000] ADDRCONF(NETDEV_UP): wlan0: link is not ready
[  146.040000] wlan0: Creating new IBSS network, BSSID 00:15:6d:8c:b8:c1
[  146.070000] ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[  362.420000] ADDRCONF(NETDEV_UP): wlan0: link is not ready
[  362.440000] wlan0: Selected IBSS BSSID ca:fe:ca:fe:ca:fe based on configured SSID
[  362.470000] ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[  416.890000] ADDRCONF(NETDEV_UP): wlan0: link is not ready
[  416.930000] wlan0: Selected IBSS BSSID ca:fe:ca:fe:ca:fe based on configured SSID
[  416.950000] ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[  573.570000] ADDRCONF(NETDEV_UP): wlan0: link is not ready
[  605.350000] wlan0: authenticate with 00:15:6d:8c:b8:c1
[  605.350000] wlan0: send auth to 00:15:6d:8c:b8:c1 (try 1/3)
[  605.360000] wlan0: authenticated
[  605.370000] wlan0: associate with 00:15:6d:8c:b8:c1 (try 1/3)
[  605.370000] wlan0: RX AssocResp from 00:15:6d:8c:b8:c1 (capab=0x1 status=0 aid=2)
[  605.380000] wlan0: associated
[  605.390000] ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[ 1361.750000] wlan0: deauthenticated from 00:15:6d:8c:b8:c1 (Reason: 2)
[ 1361.750000] ------------[ cut here ]------------
[ 1361.760000] WARNING: at /home/saverio/SORGENTI/attitude_adjustment/build_dir/linux-ar71xx_generic/compat-wireless-2013-02-22/net/mac80211/chan.c:186 0x80d2524c()
[ 1361.770000] Modules linked in: xt_LED ath79_wdt ohci_hcd ledtrig_usbdev ledtrig_netdev xt_TPROXY xt_socket nf_tproxy_core xt_hashlimit ip6t_REJECT ip6t_LOG ip6t_rt ip6t_hbh ip6t_mh ip6t_ipv6header ip6t_frag ip6t_eui64 ip6t_ah ip6table_raw ip6_queue ip6table_mangle ip6table_filter ip6_tables nf_conntrack_ipv6 nf_defrag_ipv6 ebt_redirect ebt_mark ebt_vlan ebt_stp ebt_pkttype ebt_mark_m ebt_limit ebt_among ebt_802_3 ebtable_nat ebtable_filter ebtable_broute ebtables xt_CHAOS(O) xt_TARPIT(O) xt_STEAL(O) xt_quota2(O) xt_psd(O) xt_LUA(O) xt_lscan(O) xt_LOGMARK(O) xt_ipv4options(O) xt_ipp2p(O) xt_IPMARK(O) xt_iface(O) xt_geoip(O) xt_fuzzy(O) xt_DNETMAP(O) xt_DHCPMAC(O) xt_DELUDE(O) xt_condition(O) xt_ACCOUNT(O) ipt_ULOG xt_u32 xt_TEE nf_nat_irc nf_conntrack_irc nf_nat_ftp nf_conntrack_ftp xt_policy xt_esp ipt_ah xt_iprange xt_HL xt_hl xt_ecn ipt_ECN xt_CLASSIFY xt_time xt_tcpmss xt_statistic xt_mark xt_length xt_DSCP xt_dscp xt_string xt_layer7 xt_quota xt_pkttype xt_physdev xt_owner compat_xtables(O) ipt_REDIRECT ipt_NETMAP ipt_MASQUERADE iptable_nat nf_nat xt_recent xt_helper xt_connmark xt_connbytes pppoe xt_conntrack xt_CT xt_NOTRACK iptable_raw xt_state nf_conntrack_ipv4 nf_defrag_ipv4 nf_conntrack ehci_hcd pppox ipt_REJECT xt_TCPMSS ipt_LOG xt_comment xt_multiport xt_mac xt_limit iptable_mangle iptable_filter ip_tables xt_tcpudp x_tables ip_gre gre ifb l2tp_ip l2tp_eth l2tp_netlink l2tp_core ipcomp6 xfrm6_tunnel xfrm6_mode_tunnel xfrm6_mode_transport xfrm6_mode_beet esp6 ah6 ipcomp xfrm4_tunnel xfrm4_mode_tunnel xfrm4_mode_transport xfrm4_mode_beet esp4 ah4 ipip ip6_tunnel tunnel6 tunnel4 tun ppp_async ppp_generic slhc xfrm_user xfrm_ipcomp af_key ath9k(O) ath9k_common(O) ath9k_hw(O) ath(O) mac80211(O) usbcore usb_common nls_base ts_fsm ts_bm ts_kmp crc_ccitt ipv6 cfg80211(O) compat(O) chainiv eseqiv crypto_wq sha1_generic krng rng md5 hmac des_generic deflate cbc authenc arc4 aes_generic crypto_blkcipher cryptomgr aead crypto_hash crypto_algapi ledtrig_timer ledtrig_default_on leds_gpio gpio_button_hotplug(O)
[ 1361.970000] Call Trace:[<8027ee98>] 0x8027ee98
[ 1361.980000] [<8027ee98>] 0x8027ee98
[ 1361.980000] [<80071a0c>] 0x80071a0c
[ 1361.980000] [<80d2524c>] 0x80d2524c
[ 1361.990000] [<80071a50>] 0x80071a50
[ 1361.990000] [<80d2524c>] 0x80d2524c
[ 1362.000000] [<80d25774>] 0x80d25774
[ 1362.000000] [<80d25ce8>] 0x80d25ce8
[ 1362.000000] [<80d2a1b8>] 0x80d2a1b8
[ 1362.010000] [<80077454>] 0x80077454
[ 1362.010000] [<800630ec>] 0x800630ec
[ 1362.020000] [<80d0e6a8>] 0x80d0e6a8
[ 1362.020000] [<8009524c>] 0x8009524c
[ 1362.020000] [<80094784>] 0x80094784
[ 1362.030000] [<80d0e404>] 0x80d0e404
[ 1362.030000] [<80085e60>] 0x80085e60
[ 1362.030000] [<80095210>] 0x80095210
[ 1362.040000] [<80086910>] 0x80086910
[ 1362.040000] [<80282544>] 0x80282544
[ 1362.040000] [<800866e4>] 0x800866e4
[ 1362.050000] [<800866e4>] 0x800866e4
[ 1362.050000] [<8008a234>] 0x8008a234
[ 1362.060000] [<80064af0>] 0x80064af0
[ 1362.060000] [<8008a1ac>] 0x8008a1ac
[ 1362.060000] [<80064ae0>] 0x80064ae0
[ 1362.070000] 
[ 1362.070000] ---[ end trace 4de618e42e031ea7 ]---
[ 1363.630000] wlan0: authenticate with 00:15:6d:8c:b8:c1
[ 1363.630000] wlan0: send auth to 00:15:6d:8c:b8:c1 (try 1/3)
[ 1363.640000] wlan0: authenticated
[ 1363.660000] wlan0: associate with 00:15:6d:8c:b8:c1 (try 1/3)
[ 1363.670000] wlan0: RX AssocResp from 00:15:6d:8c:b8:c1 (capab=0x1 status=0 aid=2)
[ 1363.670000] wlan0: associated
[ 1669.450000] wlan0: deauthenticated from 00:15:6d:8c:b8:c1 (Reason: 2)
[ 1671.010000] wlan0: authenticate with 00:15:6d:8c:b8:c1
[ 1671.010000] wlan0: send auth to 00:15:6d:8c:b8:c1 (try 1/3)
[ 1671.020000] wlan0: authenticated
[ 1671.030000] wlan0: associate with 00:15:6d:8c:b8:c1 (try 1/3)
[ 1671.030000] wlan0: RX AssocResp from 00:15:6d:8c:b8:c1 (capab=0x1 status=0 aid=2)
[ 1671.040000] wlan0: associated
root a NSM5GalliaNazza:~# 



Maggiori informazioni sulla lista Wireless