Re: xmalloc crash

2018-01-08 Thread Eduardo Bustamante
On Mon, Jan 8, 2018 at 8:22 AM, Chet Ramey wrote: > On 1/6/18 2:40 PM, Eduardo A. Bustamante López wrote: > >> So the allocation fails, even if the system has enough memory to handle it. >> Upon closer inspection: >> >> dualbus@ubuntu:~/src/gnu/bash/lib/malloc$ cat -n malloc.c | sed -n >> '77

Re: xmalloc crash

2018-01-08 Thread Chet Ramey
On 1/7/18 2:27 AM, Eduardo A. Bustamante López wrote: > > This is not related to Linux VM overcommit / OOM killer. > > > From what I can see, Bash's internal memory allocator (lib/malloc/malloc.c, > internal_malloc) is actually unable to allocate the ~580 MiB of VM, even if > there's enough fre

Re: xmalloc crash

2018-01-08 Thread Chet Ramey
On 1/6/18 2:40 PM, Eduardo A. Bustamante López wrote: > So the allocation fails, even if the system has enough memory to handle it. > Upon closer inspection: > > dualbus@ubuntu:~/src/gnu/bash/lib/malloc$ cat -n malloc.c | sed -n > '777,781p' >777 /* Silently reject too-large req

Re: xmalloc crash

2018-01-08 Thread Chet Ramey
On 1/5/18 6:42 PM, Alfred Baroti wrote: > Hi, > I found this from long long time ago. > Is this a serious bug? > > > [root@n1x ~]#su nix > nix@n1x:/root$ printf "%s\n" > {{a..z},{A..Z},{0..9}}{{a..z},{A..Z},{0..9}}{{a..z},{A..Z},{0..9}}{{a..z},{A..Z},{0..9}}{{a..z},{A..Z},{0..9}} > bash: xmalloc:

Re: xmalloc crash

2018-01-06 Thread Eduardo A . Bustamante López
On Sat, Jan 06, 2018 at 09:13:17PM -0700, Bob Proulx wrote: > > You can see that the brk() system call actually succeeds. > > If you are running under the Linux kernel in the default configuration > then memory overcommit is enabled. > > $ sysctl vm.overcommit_memory > > With overcommit enable

Re: xmalloc crash

2018-01-06 Thread Bob Proulx
Eduardo A. Bustamante López wrote: > Alfred Baroti wrote: > > Hi, > > I found this from long long time ago. > > Is this a serious bug? > [...] > > This is not a serious bug at all. It's just a memory allocation failure. Agreed. Not a bug at all. > You can see that the brk() system call actually

Re: xmalloc crash

2018-01-06 Thread Eduardo A . Bustamante López
On Sat, Jan 06, 2018 at 01:42:25AM +0200, Alfred Baroti wrote: > Hi, > I found this from long long time ago. > Is this a serious bug? [...] This is not a serious bug at all. It's just a memory allocation failure. > [root@n1x ~]#su nix > nix@n1x:/root$ printf "%s\n" > {{a..z},{A..Z},{0..9}}{{a..z}