Modify

Opened 2 years ago

Last modified 2 years ago

#21459 new defect

Procd memory leak on hotplug events

Reported by: hanipouspilot@… Owned by: developers
Priority: normal Milestone:
Component: packages Version: Chaos Calmer 15.05
Keywords: Cc:

Description

I created a hotplug script /etc/hotplug.d/iface/30-wan_led

#!/bin/sh

[ "$ACTION" = ifup -o "$ACTION" = ifdown ] && [ "$INTERFACE" = wan ] || exit 0

. /lib/functions/network.sh

network_get_ipaddr ip wan
NET=`echo $ip | cut -d"." -f1`

if [ -n "$NET" -a 100 != "$NET" ]; then {
	echo 'none' > /sys/class/leds/d-link:orange:planet/trigger
	echo 'netdev' > /sys/class/leds/d-link:blue:planet/trigger
	echo 'br-wan' > sys/class/leds/d-link:blue:planet/device_name
	echo 'link tx rx' > /sys/class/leds/d-link:blue:planet/mode
   } else {
	echo 'none' > /sys/class/leds/d-link:blue:planet/trigger
	echo 'netdev' > /sys/class/leds/d-link:orange:planet/trigger
	echo 'br-wan' > /sys/class/leds/d-link:orange:planet/device_name
	echo 'link tx rx' > /sys/class/leds/d-link:orange:planet/mode
   }
fi

Every dhcp renew after some time procd increases memory usage.
The ISP does renew every 5 minutes. Finally the device runs out of memory.

Attachments (0)

Change History (4)

comment:1 Changed 2 years ago by Pilot6 <hanipoispilot@…>

The script is irrelevant. Procd leaks without the script as well. It starts after a few hours of usage with 5 min lease renew.

I use DIR-825 with wan as a bridge with a switch vlan port.

comment:2 Changed 2 years ago by Pilot6 <hanipouspilot@…>

I finally found what was the problem.

The leak is caused by igmpproxy init script and procd.
It adds an interface trigger on each dhcp renew. If it is done frequent enough, that leads to running out of RAM.

I fixed it in an old-fashioned way. I removed the interface trigger, disabled igmpproxy in startup and added reload as a hotplug event. This is not a "canonical" way for CC, but it works.

The igmpproxy.init script in CC does not run anything on startup, because the upstream interface may be slow to be up.

So I suggest fixing it in some way. A "stable" release should not become unusable on installation of a package. Out of memory is critical for this kind of a device.

comment:3 follow-up: Changed 2 years ago by hanipouspilot@…

I finally found what was the problem.

The leak is caused by igmpproxy init script and procd.
It adds an interface trigger on each dhcp renew. If it is done frequent enough, that leads to running out of RAM.

I fixed it in an old-fashioned way. I removed the interface trigger, disabled igmpproxy in startup and added reload as a hotplug event. This is not a "canonical" way for CC, but it works.

The igmpproxy.init script in CC does not run anything on startup, because the upstream interface may be slow to be up.

So I suggest fixing it in some way. A "stable" release should not become unusable on installation of a package. Out of memory is critical for this kind of a device.

comment:4 in reply to: ↑ 3 Changed 2 years ago by puleglot

Confirming this. ~22Mb in a month:

S     0     1     0 22684 21924 0:0   Dec05 00:01:24 /sbin/procd

Replying to hanipouspilot@…:

The igmpproxy.init script in CC does not run anything on startup, because the upstream interface may be slow to be up.

This is another bug. See #20443

Add Comment

Modify Ticket

Action
as new .
Author


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

 
Note: See TracTickets for help on using tickets.