<div dir="ltr">So did the patch fix the problem and is it going to be added to the official procd repo?<br><br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 28, 2016 at 5:32 PM, Felix Fietkau <span dir="ltr"><<a href="mailto:nbd@openwrt.org" target="_blank">nbd@openwrt.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 2016-01-28 15:39, Kenneth Johansson wrote:<br>
> when using rpcd and updating config files using the ubus interface there<br>
> is a memory leak in procd.<br>
><br>
> here is a script that shows the error.<br>
><br>
><br>
> ------------<br>
> #!/bin/sh<br>
><br>
> touch /etc/config/playapp<br>
><br>
> while true<br>
> do<br>
>      ubus call uci add '{"config":"playapp","type":"blabla"}'<br>
>      ubus call uci commit '{"config":"playapp"}'<br>
>      ps | grep procd|grep -v grep<br>
> done<br>
> ------------<br>
><br>
> the issue happens in libubusbox function json_script_get_file() that<br>
> recreates a new json_script_file all the time.<br>
><br>
> json_script_get_file() end up calling rule_load_script() in procd<br>
> (system/trigger.c) and that do the allocation.<br>
> then json_script_get_file adds it to a avl tree.<br>
><br>
> but its done over and over every call.<br>
><br>
> not sure what the solution is here. where is the deallocation supposed<br>
> to happen?<br>
</span>Please try this patch: <a href="http://nbd.name/procd-trigger.patch" rel="noreferrer" target="_blank">http://nbd.name/procd-trigger.patch</a><br>
<br>
Thanks,<br>
<br>
- Felix<br>
<div class="HOEnZb"><div class="h5">_______________________________________________<br>
openwrt-devel mailing list<br>
<a href="mailto:openwrt-devel@lists.openwrt.org">openwrt-devel@lists.openwrt.org</a><br>
<a href="https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel" rel="noreferrer" target="_blank">https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt;text-align:justify"><span style="font-size:12px;font-family:Verdana;color:#4d4f53;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">Amine Hamed</span><span style="font-size:12px;font-family:Verdana;color:#ff850c;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline"> | Software Engineer</span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt;text-align:justify"><span style="font-size:12px;font-family:Verdana;color:#ff850c;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline"><br></span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt;text-align:justify"><span style="font-size:11.333333333333332px;font-family:Verdana;color:#ff850c;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline"> </span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt;text-align:justify"><span style="font-size:10px;font-family:Verdana;color:#ff9900;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline"><img src="https://lh4.googleusercontent.com/8B5yxCEN2oollZXecK9eKNXuC75Ixe1z_o1_utaFMisiaEIuyeHpB1Ue751mhA10jB1AqcU3Jd7h1E5Pmg5FK6nNggia3w4xNbeeK7X1mISuaf8vdvLuhs4uFHyAHp0_=s1600" style="border:none" height="16px;" width="85px;"></span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt;text-align:justify"><br><span style="font-size:10px;font-family:Verdana;color:#ff9900;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline"></span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt;text-align:justify"><span style="font-size:10px;font-family:Verdana;color:#4d4f53;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline"> </span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt;text-align:justify"><span style="font-size:12px;font-family:Verdana;color:#4d4f53;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">Ocedo GmbH | Hirschstrasse 7 | 76133 Karlsruhe | Germany</span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt;text-align:justify"><span style="font-size:12px;font-family:Verdana;color:#4d4f53;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">Email</span><span style="font-size:12px;font-family:Verdana;color:#444444;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline"> </span><span style="font-size:12px;font-family:Verdana;color:#ff850c;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline"><a href="mailto:ahamed@ocedo.com" target="_blank">ahamed@ocedo.com</a></span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt;text-align:justify"><span style="font-size:12px;font-family:Verdana;color:#ff850c;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline"><a href="mailto:ahamed@ocedo.com" target="_blank"><br></a></span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt;text-align:justify"><span style="font-size:9.333333333333332px;font-family:Verdana;color:#4d4f53;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline"> </span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt;text-align:justify"><span style="font-size:9.333333333333332px;font-family:Verdana;color:#4d4f53;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">REGISTERED OFFICE: KARLSRUHE | DISTRICT COURT: MANNHEIM | REGISTER NUMBER: HRB 717873   </span></p><span style="font-size:9.333333333333332px;font-family:Verdana;color:#4d4f53;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">MANAGING DIRECTOR: MARKUS HENNIG|JAN HICHERT</span></div></div></div></div></div></div>
</div>