bug-bash
[Top][All Lists]
Advanced

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

Re: Memory continusely increase


From: Eduardo A . Bustamante López
Subject: Re: Memory continusely increase
Date: Tue, 25 Dec 2018 21:35:01 -0800
User-agent: Mutt/1.10.1 (2018-07-13)

On Mon, Dec 24, 2018 at 10:51:00AM +0800, chen liu wrote:
> Chet Ramey <address@hidden> 于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
> ----------------------------------------------------------------------
> address@hidden:/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
>         <address@hidden>, 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.



reply via email to

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