From: "Vitaly Zuevsky" <vitaly.zuevsky@gmail.com>
To: 'Harald van Dijk' <harald@gigawatt.nl>,
'Andrej Shadura' <andrew@shadura.me>,
953421@bugs.debian.org, dash@vger.kernel.org
Cc: 'Debian Bug Tracking System' <submit@bugs.debian.org>
Subject: RE: Bug#953421: dash: Resident Set Size growth is unbound (memory leak) on an infinite shell loop
Date: Tue, 31 Mar 2020 20:07:55 +0100 [thread overview]
Message-ID: <083501d6078f$afb4fc80$0f1ef580$@gmail.com> (raw)
In-Reply-To: <a2efaae8-db1b-39ae-d7c2-8d119a4f14d4@gigawatt.nl>
Hi Harald,
> set -- $(seq 1 100)
> for i
> do
> : &
> sleep .1
> done
> for i
> do
> wait %$i
> done
>
>This is a valid script and works fine in dash. Your change breaks this by not keeping the jobs around long enough, and I hope this test script shows that there is no way to keep the jobs around long enough but by allocating ever more memory.
I must have confused two concepts: waited process in OS -vs- waited job inside shell interpreter. I am trying to see how it work in practice:
# true & false &
#
[2] + Done(1) false
[1] + Done true
# wait 2
# echo $?
127
As we preserve job exit codes, I would expect wait command to read them and free associated jobtab slots. In above example I expect to see 1 in place of 127. What do I miss here?
Many thanks for your help.
Best,
Vitaly
next prev parent reply other threads:[~2020-03-31 19:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <158376996556.31988.8584094104007124674.reportbug@ec2-34-240-101-198.eu-west-1.compute.amazonaws.com>
[not found] ` <CACujMDPfs5mJs8CVaxqM6wkCRANYQ71wTUkvHiNvOg+MPSTECQ@mail.gmail.com>
2020-03-29 17:54 ` Bug#953421: dash: Resident Set Size growth is unbound (memory leak) on an infinite shell loop Vitaly Zuevsky
2020-03-29 19:06 ` Harald van Dijk
2020-03-29 22:07 ` Jilles Tjoelker
2020-03-29 23:07 ` Harald van Dijk
2020-03-31 19:07 ` Vitaly Zuevsky [this message]
2020-03-31 21:04 ` Harald van Dijk
2020-04-02 13:18 ` Vitaly Zuevsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='083501d6078f$afb4fc80$0f1ef580$@gmail.com' \
--to=vitaly.zuevsky@gmail.com \
--cc=953421@bugs.debian.org \
--cc=andrew@shadura.me \
--cc=dash@vger.kernel.org \
--cc=harald@gigawatt.nl \
--cc=submit@bugs.debian.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox