Memory leakage on APs when using radius AND some rejected customer - Please check!!

Hi,

I have reported this several times: The AP keeps leaking memory until it is finally exhausted. At least on 2.4.1 it reboots when there is no more memory.

The problem *ONLY* happens on an AP which contains a customer who has been denied connection by radius (access-reject). The customer keeps trying to connect continuosly and the AP drops the connection continually. After few hours or days the gui becomes unresponsible (web server crash due to out of memory), then the snmp, the cli and finally it reboots.

Please check the logs below. This AP has been working for weeks without issues, then a customer declined to pay the bill and its connection has been disabled in the radius (radius authentication returns access reject)

SM[00:04:56:c2:c3:2f] aid=1 disassociated. Reason: COMMUNICATION LOST

the log is full of lines like this

---

reclaimable:19040kB kernel_stack:224kB pagetables:216kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? no
lowmem_reserve[]: 0 0
Normal: 17*4kB 12*8kB 1*16kB 0*32kB 1*64kB 2*128kB 0*256kB 1*512kB 0*1024kB 0*2048kB 0*4096kB = 1012kB
7195 total pagecache pages
0 pages in swap cache
Swap cache stats: add 0, delete 0, find 0/0
Free swap  = 0kB
Total swap = 0kB
16384 pages RAM
880 pages reserved
1545 pages shared
14450 pages non-shared
Out of memory: kill process 6058 (snmpd.check) score 32 or a child
Killed process 6061 (snmpd)
SM[00:04:56:c2:c3:2f] aid=1 disassociated. Reason: COMMUNICATION LOST
SM[00:04:56:c2:c3:2f] aid=1 disassociated. Reason: COMMUNICATION LOST
snmpd invoked oom-killer: gfp_mask=0xd0, order=0, oom_adj=0
Call Trace:
[<802492b4>] dump_stack+0x8/0x34
[<800aedec>] oom_kill_process+0x6c/0x200
[<800af404>] __out_of_memory+0x164/0x198
[<800af4ac>] out_of_memory+0x74/0xa0
[<800b2594>] __alloc_pages_nodemask+0x488/0x588
[<800b26ac>] __get_free_pages+0x18/0x4c
[<80077aa8>] mm_init+0xa0/0x108
[<800dd0a0>] bprm_mm_init+0x2c/0x158
[<800dd28c>] do_execve+0xc0/0x284
[<80068e88>] sys_execve+0x4c/0x78
[<8006d1c4>] stack_done+0x20/0x3c

Mem-Info:
Normal per-cpu:
CPU    0: hi:   18, btch:   3 usd:   4
active_anon:397 inactive_anon:428 isolated_anon:0
 active_file:0 inactive_file:1 isolated_file:0
 unevictable:7171 dirty:0 writeback:0 unstable:0
 free:253 slab_reclaimable:234 slab_unreclaimable:4752
 mapped:679 shmem:23 pagetables:57 bounce:0
Normal free:1012kB min:1016kB low:1268kB high:1524kB active_anon:1588kB inactive_anon:1712kB active_file:0kB inactive_file:4kB unevictable:28684kB isolated(anon):0kB isolated(file):0kB present:65024kB mlocked:0kB dirty:0kB writeback:0kB mapped:2716kB shmem:92kB slab_reclaimable:936kB slab_unreclaimable:19008kB kernel_stack:232kB pagetables:228kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? no
lowmem_reserve[]: 0 0
Normal: 17*4kB 8*8kB 1*16kB 1*32kB 1*64kB 2*128kB 0*256kB 1*512kB 0*1024kB 0*2048kB 0*4096kB = 1012kB
7195 total pagecache pages
0 pages in swap cache
Swap cache stats: add 0, delete 0, find 0/0
Free swap  = 0kB
Total swap = 0kB
16384 pages RAM
880 pages reserved
1631 pages shared
14425 pages non-shared
Out of memory: kill process 6067 (snmpd) score 33 or a child
Killed process 6068 (snmpd)
snmpd invoked oom-killer: gfp_mask=0x200da, order=0, oom_adj=0
Call Trace:
[<802492b4>] dump_stack+0x8/0x34
[<800aedec>] oom_kill_process+0x6c/0x200
[<800af404>] __out_of_memory+0x164/0x198
[<800af4ac>] out_of_memory+0x74/0xa0
[<800b2594>] __alloc_pages_nodemask+0x488/0x588
[<800c2e2c>] handle_mm_fault+0x230/0x7a4
[<8006f190>] do_page_fault+0x100/0x2f0
[<80065160>] ret_from_exception+0x0/0xc

Mem-Info:
Normal per-cpu:
CPU    0: hi:   18, btch:   3 usd:  13
active_anon:394 inactive_anon:428 isolated_anon:0
 active_file:0 inactive_file:0 isolated_file:0
 unevictable:7171 dirty:0 writeback:0 unstable:0
 free:253 slab_reclaimable:234 slab_unreclaimable:4752
 mapped:679 shmem:23 pagetables:54 bounce:0
Normal free:1012kB min:1016kB low:1268kB high:1524kB active_anon:1576kB inactive_anon:1712kB active_file:0kB inactive_file:0kB unevictable:28684kB isolated(anon):0kB isolated(file):0kB present:65024kB mlocked:0kB dirty:0kB writeback:0kB mapped:2716kB shmem:92kB slab_reclaimable:936kB slab_unreclaimable:19008kB kernel_stack:232kB pagetables:216kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:1 all_unreclaimable? yes
lowmem_reserve[]: 0 0
Normal: 17*4kB 8*8kB 1*16kB 1*32kB 1*64kB 2*128kB 0*256kB 1*512kB 0*1024kB 0*2048kB 0*4096kB = 1012kB
7194 total pagecache pages
0 pages in swap cache
Swap cache stats: add 0, delete 0, find 0/0
Free swap  = 0kB
Total swap = 0kB
16384 pages RAM
880 pages reserved
1577 pages shared
14446 pages non-shared
Out of memory: kill process 6064 (snmpd.check) score 32 or a child
Killed process 6067 (snmpd)
SM[00:04:56:c2:c3:2f] aid=1 disassociated. Reason: COMMUNICATION LOST
snmpd invoked oom-killer: gfp_mask=0x200da, order=0, oom_adj=0
Call Trace:
[<802492b4>] dump_stack+0x8/0x34
[<800aedec>] oom_kill_process+0x6c/0x200
[<800af404>] __out_of_memory+0x164/0x198
[<800af4ac>] out_of_memory+0x74/0xa0
[<800b2594>] __alloc_pages_nodemask+0x488/0x588
[<800ba880>] shmem_getpage+0x544/0x808
[<800ad1d8>] generic_file_buffered_write+0x100/0x344
[<800ada7c>] __generic_file_aio_write+0x448/0x4a4
[<800adb5c>] generic_file_aio_write+0x84/0xfc
[<800d6b8c>] do_sync_write+0xd4/0x13c
[<800d77d4>] vfs_write+0xac/0x170
[<800d798c>] sys_write+0x58/0xa0
[<8006d1c4>] stack_done+0x20/0x3c

Mem-Info:
Normal per-cpu:
CPU    0: hi:   18, btch:   3 usd:  15
active_anon:332 inactive_anon:428 isolated_anon:0
 active_file:0 inactive_file:0 isolated_file:0
 unevictable:7171 dirty:0 writeback:0 unstable:0
 free:253 slab_reclaimable:234 slab_unreclaimable:4768
 mapped:659 shmem:23 pagetables:45 bounce:0
Normal free:1012kB min:1016kB low:1268kB high:1524kB active_anon:1328kB inactive_anon:1712kB active_file:0kB inactive_file:0kB unevictable:28684kB isolated(anon):0kB isolated(file):0kB present:65024kB mlocked:0kB dirty:0kB writeback:0kB mapped:2636kB shmem:92kB slab_reclaimable:936kB slab_unreclaimable:19072kB kernel_stack:200kB pagetables:180kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? yes
lowmem_reserve[]: 0 0
Normal: 35*4kB 31*8kB 5*16kB 1*32kB 0*64kB 0*128kB 0*256kB 1*512kB 0*1024kB 0*2048kB 0*4096kB = 1012kB
7194 total pagecache pages
0 pages in swap cache
Swap cache stats: add 0, delete 0, find 0/0
Free swap  = 0kB
Total swap = 0kB
16384 pages RAM
880 pages reserved
1332 pages shared
14468 pages non-shared
Out of memory: kill process 1691 (lighttpd) score 29 or a child
Killed process 1691 (lighttpd)
SM[00:04:56:c2:c3:2f] aid=1 disassociated. Reason: COMMUNICATION LOST
SM[00:04:56:c2:c3:2f] aid=1 disassociated. Reason: COMMUNICATION LOST
SM[00:04:56:c2:c3:2f] aid=1 disassociated. Reason: COMMUNICATION LOST
SM[00:04:56:c2:c3:2f] aid=1 disassociated. Reason: COMMUNICATION LOST
SM[00:04:56:c2:c3:2f] aid=1 disassociated. Reason: COMMUNICATION LOST
SM[00:04:56:c2:c3:2f] aid=1 disassociated. Reason: COMMUNICATION LOST
SM[00:04:56:c2:c3:2f] aid=1 disassociated. Reason: COMMUNICATION LOST
SM[00:04:56:c2:c3:2f] aid=1 disassociated. Reason: COMMUNICATION LOST
SM[00:04:56:c2:c3:2f] aid=1 disassociated. Reason: COMMUNICATION LOST
SM[00:04:56:c2:c3:2f] aid=1 disassociated. Reason: COMMUNICATION LOST
SM[00:04:56:c2:c3:2f] aid=1 disassociated. Reason: COMMUNICATION LOST
SM[00:04:56:c2:c3:2f] aid=1 disassociated. Reason: COMMUNICATION LOST
lock invoked oom-killer: gfp_mask=0x200da, order=0, oom_adj=0
Call Trace:
[<802492b4>] dump_stack+0x8/0x34
[<800aedec>] oom_kill_process+0x6c/0x200
[<800af404>] __out_of_memory+0x164/0x198
[<800af4ac>] out_of_memory+0x74/0xa0
[<800b2594>] __alloc_pages_nodemask+0x488/0x588
[<800c0ec8>] __do_fault+0xf4/0x44c
[<800c2ff0>] handle_mm_fault+0x3f4/0x7a4
[<8006f190>] do_page_fault+0x100/0x2f0
[<80065160>] ret_from_exception+0x0/0xc
[<80174eb4>] __bzero+0x38/0x164
[<801128e4>] padzero+0x48/0x6c
[<801137b4>] load_elf_binary+0xa80/0x111c
[<800dc1cc>] search_binary_handler+0xa4/0x2ac
[<800dd34c>] do_execve+0x180/0x284
[<80068e88>] sys_execve+0x4c/0x78
[<8006d1c4>] stack_done+0x20/0x3c

Mem-Info:
Normal per-cpu:
CPU    0: hi:   18, btch:   3 usd:  10
active_anon:371 inactive_anon:392 isolated_anon:0
 active_file:0 inactive_file:0 isolated_file:0
 unevictable:7171 dirty:0 writeback:0 unstable:0
 free:252 slab_reclaimable:234 slab_unreclaimable:4794
 mapped:530 shmem:23 pagetables:65 bounce:0
Normal free:1008kB min:1016kB low:1268kB high:1524kB active_anon:1484kB inactive_anon:1568kB active_file:0kB inactive_file:0kB unevictable:28684kB isolated(anon):0kB isolated(file):0kB present:65024kB mlocked:0kB dirty:0kB writeback:0kB mapped:2120kB shmem:92kB slab_reclaimable:936kB slab_unreclaimable:19176kB kernel_stack:256kB pagetables:260kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:1 all_unreclaimable? yes
lowmem_reserve[]: 0 0
Normal: 4*4kB 22*8kB 3*16kB 1*32kB 1*64kB 1*128kB 0*256kB 1*512kB 0*1024kB 0*2048kB 0*4096kB = 976kB
7194 total pagecache pages
0 pages in swap cache
Swap cache stats: add 0, delete 0, find 0/0
Free swap  = 0kB
Total swap = 0kB
16384 pages RAM
880 pages reserved
1581 pages shared
14603 pages non-shared
Out of memory: kill process 6073 (snmpd) score 33 or a child
Killed process 6074 (lock)
lock invoked oom-killer: gfp_mask=0x200da, order=0, oom_adj=0
Call Trace:
[<802492b4>] dump_stack+0x8/0x34
[<800aedec>] oom_kill_process+0x6c/0x200
[<800af404>] __out_of_memory+0x164/0x198
[<800af4ac>] out_of_memory+0x74/0xa0
[<800b2594>] __alloc_pages_nodemask+0x488/0x588
[<800c0ec8>] __do_fault+0xf4/0x44c
[<800c2ff0>] handle_mm_fault+0x3f4/0x7a4
[<8006f190>] do_page_fault+0x100/0x2f0
[<80065160>] ret_from_exception+0x0/0xc
[<80174eb4>] __bzero+0x38/0x164
[<801128e4>] padzero+0x48/0x6c
[<801137b4>] load_elf_binary+0xa80/0x111c
[<800dc1cc>] search_binary_handler+0xa4/0x2ac
[<800dd34c>] do_execve+0x180/0x284
[<80068e88>] sys_execve+0x4c/0x78
[<8006d1c4>] stack_done+0x20/0x3c

Mem-Info:
Normal per-cpu:
CPU    0: hi:   18, btch:   3 usd:  16
active_anon:360 inactive_anon:392 isolated_anon:0
 active_file:0 inactive_file:0 isolated_file:0
 unevictable:7171 dirty:0 writeback:0 unstable:0
 free:255 slab_reclaimable:234 slab_unreclaimable:4802
 mapped:530 shmem:23 pagetables:62 bounce:0
Normal free:1020kB min:1016kB low:1268kB high:1524kB active_anon:1440kB inactive_anon:1568kB active_file:0kB inactive_file:0kB unevictable:28684kB isolated(anon):0kB isolated(file):0kB present:65024kB mlocked:0kB dirty:0kB writeback:0kB mapped:2120kB shmem:92kB slab_reclaimable:936kB slab_unreclaimable:19208kB kernel_stack:248kB pagetables:248kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? no
lowmem_reserve[]: 0 0
Normal: 9*4kB 21*8kB 5*16kB 1*32kB 1*64kB 1*128kB 1*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 764kB
7194 total pagecache pages
0 pages in swap cache
Swap cache stats: add 0, delete 0, find 0/0
Free swap  = 0kB
Total swap = 0kB
16384 pages RAM
880 pages reserved
1541 pages shared
14651 pages non-shared
Out of memory: kill process 6070 (snmpd.check) score 32 or a child
Killed process 6073 (snmpd)
SM[00:04:56:c2:c3:2f] aid=1 disassociated. Reason: COMMUNICATION LOST
SM[00:04:56:c2:c3:2f] aid=1 disassociated. Reason: COMMUNICATION LOST
dropbear invoked oom-killer: gfp_mask=0x200da, order=0, oom_adj=0
Call Trace:
[<802492b4>] dump_stack+0x8/0x34
[<800aedec>] oom_kill_process+0x6c/0x200
[<800af404>] __out_of_memory+0x164/0x198
[<800af4ac>] out_of_memory+0x74/0xa0
[<800b2594>] __alloc_pages_nodemask+0x488/0x588
[<800c2e2c>] handle_mm_fault+0x230/0x7a4
[<8006f190>] do_page_fault+0x100/0x2f0
[<80065160>] ret_from_exception+0x0/0xc

Mem-Info:
Normal per-cpu:
CPU    0: hi:   18, btch:   3 usd:   3
active_anon:319 inactive_anon:392 isolated_anon:0
 active_file:0 inactive_file:0 isolated_file:0
 unevictable:7171 dirty:0 writeback:0 unstable:0
 free:252 slab_reclaimable:234 slab_unreclaimable:4802
 mapped:546 shmem:23 pagetables:56 bounce:0
Normal free:1008kB min:1016kB low:1268kB high:1524kB active_anon:1276kB inactive_anon:1568kB active_file:0kB inactive_file:0kB unevictable:28684kB isolated(anon):0kB isolated(file):0kB present:65024kB mlocked:0kB dirty:0kB writeback:0kB mapped:2184kB shmem:92kB slab_reclaimable:936kB slab_unreclaimable:19208kB kernel_stack:232kB pagetables:224kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? yes
lowmem_reserve[]: 0 0
Normal: 60*4kB 26*8kB 5*16kB 1*32kB 1*64kB 1*128kB 1*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 1008kB
7194 total pagecache pages
0 pages in swap cache
Swap cache stats: add 0, delete 0, find 0/0
Free swap  = 0kB
Total swap = 0kB
16384 pages RAM
880 pages reserved
1425 pages shared
14578 pages non-shared
Out of memory: kill process 6079 (snmpd) score 33 or a child
Killed process 6080 (lock)
snmpd invoked oom-killer: gfp_mask=0xd0, order=1, oom_adj=0
Call Trace:
[<802492b4>] dump_stack+0x8/0x34
[<800aedec>] oom_kill_process+0x6c/0x200
[<800af404>] __out_of_memory+0x164/0x198
[<800af4ac>] out_of_memory+0x74/0xa0
[<800b2594>] __alloc_pages_nodemask+0x488/0x588
[<800b26ac>] __get_free_pages+0x18/0x4c
[<80078508>] copy_process+0xbc/0xc6c
[<80079230>] do_fork+0x178/0x304
[<80068b04>] _sys_fork+0x34/0x40
[<8006d1c4>] stack_done+0x20/0x3c

Mem-Info:
Normal per-cpu:
CPU    0: hi:   18, btch:   3 usd:   5
active_anon:312 inactive_anon:392 isolated_anon:0
 active_file:0 inactive_file:0 isolated_file:0
 unevictable:7171 dirty:0 writeback:0 unstable:0
 free:257 slab_reclaimable:234 slab_unreclaimable:4802
 mapped:547 shmem:23 pagetables:53 bounce:0
Normal free:1028kB min:1016kB low:1268kB high:1524kB active_anon:1248kB inactive_anon:1568kB active_file:0kB inactive_file:0kB unevictable:28684kB isolated(anon):0kB isolated(file):0kB present:65024kB mlocked:0kB dirty:0kB writeback:0kB mapped:2188kB shmem:92kB slab_reclaimable:936kB slab_unreclaimable:19208kB kernel_stack:224kB pagetables:212kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? no
lowmem_reserve[]: 0 0
Normal: 63*4kB 27*8kB 5*16kB 1*32kB 1*64kB 1*128kB 1*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 1028kB
7194 total pagecache pages
0 pages in swap cache
Swap cache stats: add 0, delete 0, find 0/0
Free swap  = 0kB
Total swap = 0kB
16384 pages RAM
880 pages reserved
1392 pages shared
14565 pages non-shared
Out of memory: kill process 6076 (snmpd.check) score 32 or a child
Killed process 6079 (snmpd)

Hi - Thank you for the logs. We're investigating this now. 

Thanks,
Sriram

Hi, 

We're having trouble reproducing this issue. Can you please provide us a little bit more information to help troubleshoot this:

What is AP's configuration:
- it is TDD or ePTP?
- what is the DL/UL ratio (if in TDD mode)?
- what kind of traffic is present on the AP? What is the approximate load?
- are there any other services like PPPoE, etc.?
 
Also, will you be willing to provide us remote access to the AP?
 
Thanks,
Sriram