Modify

Opened 6 years ago

Last modified 4 years ago

#11846 accepted defect

Memory leak with ipv6 neighbour table overflow

Reported by: john-openwrt@… Owned by: jow
Priority: normal Milestone: Barrier Breaker 14.07
Component: kernel Version: Trunk
Keywords: memory leak ipv6 Cc:

Description

I'm running hnyman's trunk build of OpenWRT so I'm not sure if this is the right place to report this. I've run a search of the tickets and haven't seen this reported yet.

I've noticed a memory leak in trunk build of OpenWRT (r32462) with kernel 3.3.8 and ipv6 enabled. The leak is occurring when attached via cable modem (i.e., lots of neighbors) running the default tuning for ipv6 neighbor table sizes.

The leak is accompanied by the following error messages in the kernel log:

Jul  6 18:19:55 192.168.1.1 <kern.warning> kernel: [  123.740000] ipv6: Neighbour table overflow.
Jul  6 18:19:55 192.168.1.1 <kern.warning> kernel: [  123.740000] ipv6: Neighbour table overflow.
Jul  6 18:19:55 192.168.1.1 <kern.warning> kernel: [  123.750000] ipv6: Neighbour table overflow.
Jul  6 18:19:55 192.168.1.1 <kern.warning> kernel: [  123.810000] ipv6: Neighbour table overflow.
Jul  6 18:19:55 192.168.1.1 <kern.warning> kernel: [  123.810000] ipv6: Neighbour table overflow.
Jul  6 18:19:55 192.168.1.1 <kern.warning> kernel: [  123.820000] ipv6: Neighbour table overflow.
Jul  6 18:19:55 192.168.1.1 <kern.warning> kernel: [  124.030000] ipv6: Neighbour table overflow.
Jul  6 18:19:55 192.168.1.1 <kern.warning> kernel: [  124.030000] ipv6: Neighbour table overflow.
Jul  6 18:19:55 192.168.1.1 <kern.warning> kernel: [  124.040000] ipv6: Neighbour table overflow.
Jul  6 18:19:55 192.168.1.1 <kern.warning> kernel: [  124.040000] ipv6: Neighbour table overflow.

The leak would occur until no more memory was available for processes, resulting in an eventual reboot. The attached image shows the memory leak and eventual resolution.

No image "leak.png" attached to attachment

I was able to resolve the leak by increasing the ipv6 neighbor table gc thresholds using the following sysctls.

net.ipv6.neigh.default.gc_thresh1 = 512
net.ipv6.neigh.default.gc_thresh2 = 2048
net.ipv6.neigh.default.gc_thresh3 = 4096

Attachments (1)

leak.png (29.3 KB) - added by john-openwrt@… 6 years ago.
Memory leak history

Download all attachments as: .zip

Change History (7)

Changed 6 years ago by john-openwrt@…

Memory leak history

comment:1 Changed 5 years ago by sfisher143@…

I am new, how do I do this? I don't know where to put the fix or apply it? Could someone please explain this in more detail?

comment:2 Changed 5 years ago by jow

  • Owner changed from developers to jow
  • Status changed from new to accepted

comment:3 Changed 5 years ago by anonymous

I think /etc/sysctl.conf will be used to configure the parameter for kernel.

comment:4 Changed 5 years ago by anonymous

Thank you, you are correct it did fix this issue...

comment:5 Changed 4 years ago by openwrt@…

FWIW, this serverfault question might be useful, it even points to a possible patch that went into mainline in Linux 3.6-rc1 ("Attitude Adjustment" comes with 3.3.8).

comment:6 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

Action
as accepted .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.