Re: memory leak in bash only during boot up in Bash-3.2.48

2018-12-26 Thread Chet Ramey
On 12/22/18 3:47 AM, ABHISHEK PALIWAL wrote: > Hi Chet, > >>What is the hard limit on the number of processes for a process started in >>this environment? (The value of `ulimit -n'.) > > Here are the Hard and soft limits for open files and max user processes. > root@localhost:/root> ulimit -Hn >

Re: memory leak in bash only during boot up in Bash-3.2.48

2018-12-22 Thread ABHISHEK PALIWAL
Hi Chet, >What is the hard limit on the number of processes for a process started in >this environment? (The value of `ulimit -n'.) Here are the Hard and soft limits for open files and max user processes. root@localhost:/root> ulimit -Hn 1024 root@localhost:/root> ulimit -Hu 516046 root@localhost

Re: memory leak in bash only during boot up in Bash-3.2.48

2018-12-21 Thread Chet Ramey
On 12/19/18 12:54 AM, abhishpaliwal wrote: > create a shell script from below given code. name it testing.sh. > > #!/bin/bash > logger "Started testing" > while(true); do > while (true); do ls > /dev/null ; done > done > > Steps. > # chmod 755 /root/testing.sh > modify any /etc/init.d/

Re: memory leak in bash

2017-05-11 Thread Eduardo Bustamante
On Thu, May 11, 2017 at 3:47 AM, wuzongyong (A) wrote: [...] > My bash version is version 4.2.46(1)-release, valgrind version is 3.11.0 , > could someone help to tell me if it is a bug please? And I wanna to know the > deeply level reason. Try with a more recent version. Version 4.2.46 is a f

Re: Memory leak in bash 4.3

2015-06-22 Thread Jean Delvare
Hi Chet, On Mon, 22 Jun 2015 09:40:36 -0400, Chet Ramey wrote: > > My hope was that the updated patch I'm about to send would be released > > as bash43-040 in bash-4.3-patches/. Does that make sense, or am I > > missing something obvious? > > Here's a corrected patch, and eventually this will be

Re: Memory leak in bash 4.3

2015-06-22 Thread Chet Ramey
> My hope was that the updated patch I'm about to send would be released > as bash43-040 in bash-4.3-patches/. Does that make sense, or am I > missing something obvious? Here's a corrected patch, and eventually this will be released as an official patch. Chet *** ../bash-4.3-patched/subst.c 2014

Re: Memory leak in bash 4.3

2015-06-15 Thread Jean Delvare
On Mon, 15 Jun 2015 09:12:58 -0400, Chet Ramey wrote: > On 6/15/15 9:09 AM, Jean Delvare wrote: > > >> I made > >> this change back in October 2014 as part of an unrelated fix for an > >> array element quoting issue. > > > I'll submit an updated patch. > > See above. I know it's fixed in the de

Re: Memory leak in bash 4.3

2015-06-15 Thread Chet Ramey
On 6/15/15 9:09 AM, Jean Delvare wrote: >> I made >> this change back in October 2014 as part of an unrelated fix for an >> array element quoting issue. > I'll submit an updated patch. See above. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita

Re: Memory leak in bash 4.3

2015-06-15 Thread Jean Delvare
Hi Chet, Thanks for your reply. On Thu, 11 Jun 2015 10:54:31 -0400, Chet Ramey wrote: > On 6/9/15 3:42 PM, Jean Delvare wrote: > > > I think I have a minimal test case now: > > > > #!/bin/bash > > > > declare -a ARRAY > > > > ARRAY[0]=foo > > FOO=${ARRAY[0]} # <-- leaks > > echo $FOO > > > >

Re: Memory leak in bash 4.3

2015-06-11 Thread Chet Ramey
On 6/9/15 3:42 PM, Jean Delvare wrote: > I think I have a minimal test case now: > > #!/bin/bash > > declare -a ARRAY > > ARRAY[0]=foo > FOO=${ARRAY[0]} # <-- leaks > echo $FOO > > And a candidate fix: > > bash 4.3: Fix memory leak in parameter_brace_expand_word Thanks for the report. This

Re: Memory leak in bash 4.3

2015-06-09 Thread Jean Delvare
On Tue, 9 Jun 2015 18:02:31 +0200, Jean Delvare wrote: > I built bash 4.3.39 with --without-bash-malloc and then ran the daemon > under valgrind for 1 minute. The back trace for the leak is: > > 3,973 bytes in 430 blocks are definitely lost in loss record 1,610 of 1,613 >at 0x4C277AB: malloc (