bug-bash
[Top][All Lists]
Advanced

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

Re: Memory continusely increase


From: chen liu
Subject: Re: Memory continusely increase
Date: Wed, 26 Dec 2018 19:01:23 +0800

Eduardo A. Bustamante López <dualbus@gmail.com> 于2018年12月26日周三 下午1:35写道:
>
> 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

Thanks for you support:)
The change has introduced in bash since bash-4.4-alpha. This patch
fixed this issue.
And the note in Changelog
------------------------------------------------------------------------------------------------------
 jobs.c
       - delete_job: only add J_ASYNC (and not J_FOREGROUND) jobs to the
         bgpids array, since Posix says shells only need to save the status
         of async jobs.  Report and fix from John Fremlin <john@fb.com>
---------------------------------------------------------------------------------------------------------

Thanks,
Chen.


> - 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.



reply via email to

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