hush - memory leak?

Denys Vlasenko vda.linux at googlemail.com
Wed Dec 22 03:38:04 UTC 2010


On Tue, Dec 21, 2010 at 10:51 PM, Piotr Grudzinski
<piotr at powersmiths.com> wrote:
> With the patch applied, the problem persists.

Cannot reproduce. I built busybox with your .config,
run "while true; do free; done" in it, and run
busybox top in another xterm. Pressed s, r, and I see
steady, non-growing memory usage:

top - 04:23:54 up  4:03,  3 users,  load average: 0.46, 0.17, 0.05
Tasks: 206 total,   3 running, 203 sleeping,   0 stopped,   0 zombie
Mem total:2056428 anon:246376 map:77432 free:903516
 slab:116460 buf:73412 cache:613024 dirty:9016 write:0
Swap total:4128764 free:4128764
  PID   VSZ*VSZRW   RSS (SHR) DIRTY (SHR) STACK COMMAND
 1477   964   140   120   108    12     0   132 runsv ftpd_bbox
 1478   964   140   128   108    20     0   132 runsv sshd
 1479   964   140   124   108    16     0   132 runsv tidy_tmp
 1470   964   140   128   108    20     0   132 runsv dhcp_eth0
 1467   964   140   128   108    20     0   132 runsv syslog
...
 5535  1460   304   376   120    48     0   132 ./busybox hush

You need to help here to find out what's going on.

What do you see in top?

Does the leak depend on applet called in the loop?
Try "while true; do sleep 0; done" and  "while true; do true; done" -
do these also leak?

Does the leak go away if you turn off FEATURE_PREFER_APPLETS
and FEATURE_SH_STANDALONE?

-- 
vda


More information about the busybox mailing list