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


Groups > gnu.bash.bug > #14952

Re: Memory continusely increase

From Eduardo A. Bustamante López <dualbus@gmail.com>
Newsgroups gnu.bash.bug
Subject Re: Memory continusely increase
Date 2018-12-25 21:35 -0800
Message-ID <mailman.6295.1545802519.1284.bug-bash@gnu.org> (permalink)
References <1545199834453-0.post@n7.nabble.com> <8ba9e82f-020a-3bf5-87c5-ce250f89e269@case.edu> <CACJSzi1GZxS_4=Tw2tXauaokW7C1dTOW0pPFWWhuhA1bX5gdjw@mail.gmail.com>

Show all headers | View raw


On Mon, Dec 24, 2018 at 10:51:00AM +0800, chen liu wrote:
> Chet Ramey <chet.ramey@case.edu> 于2018年12月22日周六 上午12:51写道:
(...)
> > What is the hard limit on the number of processes for a process started in
> > this environment? (The value of `ulimit -n'.)

Ah, interesting. Thanks for the pointer Chet.

(...)
> Below is all of the values of the bash ulimit optionals, this issue
> present in this environment
> ----------------------------------------------------------------------
> root@localhost:/root> cat ulimit.txt
(...)
> 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.

As you probably found out already, the changes between 4.3 and 4.4 that make
this issue "disappear" are related to how bash stores the exit status of
child processes.

The threads that prompted this change provide some insight:

- https://lists.gnu.org/archive/html/bug-bash/2015-04/msg00069.html
- http://lists.gnu.org/archive/html/bug-bash/2015-04/msg00075.html

And the note in the changelog:

http://git.savannah.gnu.org/cgit/bash.git/tree/CWRU/old-changelogs/CWRU.chlog.v15?h=ab8ded9c30b51a6bc0c8145553263da044b565ea#n9811

> jobs.[ch]
> 	- bgpids: new implementation from a patch from John Fremlin
> 	  <john@fb.com>, uses an array for the list of the last CHILD_MAX
> 	  terminated background pids, and a separate hash table to search it.
> 	  The storage can be freed as a unit, and the size of the hash table
> 	  (currently 4096) is independent of the size of the bgpids table

http://git.savannah.gnu.org/cgit/bash.git/tree/CHANGES-4.4?h=ab8ded9c30b51a6bc0c8145553263da044b565ea#n220

> e.  There is a new implementation of the code that saves the last CHILD_MAX
>     exited background pids so their status can be queried later.

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


Thread

Re: Memory continusely increase Eduardo A. Bustamante López <dualbus@gmail.com> - 2018-12-25 21:35 -0800

csiph-web