Possible resource leak
Petr Titěra
petr@titera.eu
Tue Dec 9 12:25:00 GMT 2014
On 9.12.2014 10:58, Marco Atzeri wrote:
> On 12/9/2014 9:53 AM, Petr TitÄra wrote:
>> Hello,
>>
>> I'm dealing with possible resource leak in cygwin on Windows-7. I'm
>> running a script which repeatedly calls another script (every 5
>> seconds). After a while script ends with memory error. All my memory
>> seems to be eaten by Page Table entries and in the memory map I see a
>> lot of cygwin processes with 4 pages allocated (I can provide screenshot
>> if neccessary). Is this known issue?
>>
>> Attached is cygcheck output without any modification.
>>
>>
>> Petr Titera
>>
>
> without the scripts or a simplified version that exhibits the issue,
> it is impossible to state if it is due to any cygwin programs or it is
> due to https://cygwin.com/acronyms/#PEBCAK
>
Hello,
I can understand this. And it might definitely be PEBKAC. But what I see
is real and I do not thing I've screwed my scripts so much.
Attached is simple reproducer I was able to get from my scripts. If you
will test it you will have to change base url in fetchData.sh.
When I run this script for a while I see a lot of 'zombie' bash, sleep
and wget processes in RamMap (they do not show in task manager). I can
provide screenshot.
If that would matter I run this scrips from truecrypted disk.
Petr Titera
> By the way, script in which language ?
>
> Regards
> Marco
>
>
> --
> Problem reports: http://cygwin.com/problems.html
> FAQ: http://cygwin.com/faq/
> Documentation: http://cygwin.com/docs.html
> Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
-------------- next part --------------
#!/bin/bash
#
# Arguments
# MODEL
#
function getFileNoCheck() {
wget -O ${1} ${2}
sleep $(($RANDOM % 5))
}
function getFileCheck() {
if [ ! -e $1 ]; then
wget -O ${1} ${2}
sleep $(($RANDOM % 5))
fi
}
model=${1}
downloadRoot="automatic/${model}"
operationBaseName="${downloadRoot}/model"
mkdir -p ${downloadRoot}
for i in `seq 300`; do
if [ ! -e "${operationBaseName}_$i.xml" ] ; then
getFileCheck "${operationBaseName}_$i.xml" "http://<url>/index.html?_dc=$(date +%s)"
fi
done
#Done
-------------- next part --------------
#!/bin/bash
for i in `seq 50000`
do
./fetchData.sh $i
done
-------------- next part --------------
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin
mailing list