[OpenWrt-Devel] memory leak in procd

Amine Aouled Hamed amine.ahd at gmail.com
Mon Feb 1 08:17:01 EST 2016


So did the patch fix the problem and is it going to be added to the
official procd repo?



On Thu, Jan 28, 2016 at 5:32 PM, Felix Fietkau <nbd at openwrt.org> wrote:

> On 2016-01-28 15:39, Kenneth Johansson wrote:
> > when using rpcd and updating config files using the ubus interface there
> > is a memory leak in procd.
> >
> > here is a script that shows the error.
> >
> >
> > ------------
> > #!/bin/sh
> >
> > touch /etc/config/playapp
> >
> > while true
> > do
> >      ubus call uci add '{"config":"playapp","type":"blabla"}'
> >      ubus call uci commit '{"config":"playapp"}'
> >      ps | grep procd|grep -v grep
> > done
> > ------------
> >
> > the issue happens in libubusbox function json_script_get_file() that
> > recreates a new json_script_file all the time.
> >
> > json_script_get_file() end up calling rule_load_script() in procd
> > (system/trigger.c) and that do the allocation.
> > then json_script_get_file adds it to a avl tree.
> >
> > but its done over and over every call.
> >
> > not sure what the solution is here. where is the deallocation supposed
> > to happen?
> Please try this patch: http://nbd.name/procd-trigger.patch
>
> Thanks,
>
> - Felix
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>



-- 

Amine Hamed | Software Engineer



Ocedo GmbH | Hirschstrasse 7 | 76133 Karlsruhe | Germany

Email ahamed at ocedo.com


<ahamed at ocedo.com>

REGISTERED OFFICE: KARLSRUHE | DISTRICT COURT: MANNHEIM | REGISTER NUMBER:
HRB 717873
MANAGING DIRECTOR: MARKUS HENNIG|JAN HICHERT
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20160201/78772360/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list