bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Memory leak in wait


From: Jean Delvare
Subject: Memory leak in wait
Date: Thu, 6 Nov 2014 14:09:58 +0100

Hi all,

A memory leak has been reported in a bash script I maintain [1]. After
investigation, I was able to shrink the test case down to:

while true
do
        sleep 1 &
        wait $!
done

The above loop has an always-rising memory consumption (RSS value as
reported by ps -o rss.) This one OTOH:

while true
do
        sleep 1 &
        wait
done

shows steady memory consumption, so it would seem that the leak only
occurs when passing a parameter to "wait". I've seen the problem with
bash versions 3.1.14, 4.2.53 and 4.3.30. Version 3.0.16 is not affected.

If this a known problem?

[1] http://lists.lm-sensors.org/pipermail/lm-sensors/2014-November/042913.html

Thanks,
-- 
Jean Delvare
SUSE L3 Support



reply via email to

[Prev in Thread] Current Thread [Next in Thread]