Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #14947

Re: Memory continusely increase

From chen liu <chen.liu.opensource@gmail.com>
Newsgroups gnu.bash.bug
Subject Re: Memory continusely increase
Date 2018-12-24 10:51 +0800
Message-ID <mailman.6234.1545620249.1284.bug-bash@gnu.org> (permalink)
References <1545199834453-0.post@n7.nabble.com> <8ba9e82f-020a-3bf5-87c5-ce250f89e269@case.edu>

Show all headers | View raw


Chet Ramey <chet.ramey@case.edu> 于2018年12月22日周六 上午12:51写道:
>
> On 12/19/18 1:10 AM, jake wrote:
> > Hi all,
> >
> > I did a test about run a bash scriplt never quit,but met a memory usage
> > issue that cause used memory continuous increase.
> > This issue was present in bash-3.2.x, bash-4.0.x, bash-4.1.x, bash-4.2.x,
> > bash-4.3.x. However, This issue was disappeared in bash-4.4.0, I can't trace
> > which patch fixed the issue or which new feature was introduced in
> > bash-4.4.0.
> >
> > Here is bash script:
> > ------------------------------------------------------------------------------
> > #!/bin/bash
> >
> > logger "Started testing"
> > while(true);do
> >  while (true); do
> >    ls > /dev/null
> >  done
> > done
>
> What is the hard limit on the number of processes for a process started in
> this environment? (The value of `ulimit -n'.)

Hi Chet,

Below is all of the values of the bash ulimit optionals, this issue
present in this environment
----------------------------------------------------------------------
root@localhost:/root> cat ulimit.txt
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 516046
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 516046
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
---------------------------------------------------------------------------
But found change the -u optionals value through the ( ulimit -u 1024)
will let this issue disapeared.

Thanks,
Chen.


>
> --
> ``The lyf so short, the craft so long to lerne.'' - Chaucer
>                  ``Ars longa, vita brevis'' - Hippocrates
> Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/

Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread


Thread

Re: Memory continusely increase chen liu <chen.liu.opensource@gmail.com> - 2018-12-24 10:51 +0800

csiph-web