All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] bash: Disable custom memory allocator
@ 2015-10-09 22:21 Aníbal Limón
  2015-10-10  0:25 ` Khem Raj
  2015-10-13 15:58 ` Benjamin Esquivel
  0 siblings, 2 replies; 6+ messages in thread
From: Aníbal Limón @ 2015-10-09 22:21 UTC (permalink / raw)
  To: openembedded-core

Bash is failing trying to allocate memory [1] using the custom
memory allocator if we disable it the issue is fixed.

The major distributions also disabled by default [2], so we
don't have a good reason to use it.

[YOCTO #8452]

[1] https://bugzilla.yoctoproject.org/show_bug.cgi?id=8452#c0
[2] https://bugzilla.yoctoproject.org/show_bug.cgi?id=8452#c5

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
---
 meta/recipes-extended/bash/bash.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-extended/bash/bash.inc b/meta/recipes-extended/bash/bash.inc
index c06f157..020409f 100644
--- a/meta/recipes-extended/bash/bash.inc
+++ b/meta/recipes-extended/bash/bash.inc
@@ -7,7 +7,7 @@ DEPENDS = "ncurses bison-native"
 inherit autotools gettext texinfo update-alternatives ptest
 
 EXTRA_AUTORECONF += "--exclude=autoheader"
-EXTRA_OECONF = "--enable-job-control"
+EXTRA_OECONF = "--enable-job-control --without-bash-malloc"
 
 # If NON_INTERACTIVE_LOGIN_SHELLS is defined, all login shells read the
 # startup files, even if they are not interactive.
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] bash: Disable custom memory allocator
  2015-10-09 22:21 [PATCH] bash: Disable custom memory allocator Aníbal Limón
@ 2015-10-10  0:25 ` Khem Raj
  2015-10-13 15:58 ` Benjamin Esquivel
  1 sibling, 0 replies; 6+ messages in thread
From: Khem Raj @ 2015-10-10  0:25 UTC (permalink / raw)
  To: Aníbal Limón; +Cc: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 1827 bytes --]


> On Oct 9, 2015, at 3:21 PM, Aníbal Limón <anibal.limon@linux.intel.com> wrote:
> 
> Bash is failing trying to allocate memory [1] using the custom
> memory allocator if we disable it the issue is fixed.
> 
> The major distributions also disabled by default [2], so we
> don't have a good reason to use it.

The fix is OK but commit message needs improvement. The underlying issue is due to bash’s malloc using brk() calls
to allocate memory, which fail when address randomization is enabled in kernel. sbrk() based custom allocators are obsolete
on the downside we will lose a bit of performance but correctness is more important here.

> 
> [YOCTO #8452]
> 
> [1] https://bugzilla.yoctoproject.org/show_bug.cgi?id=8452#c0
> [2] https://bugzilla.yoctoproject.org/show_bug.cgi?id=8452#c5
> 
> Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
> ---
> meta/recipes-extended/bash/bash.inc | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-extended/bash/bash.inc b/meta/recipes-extended/bash/bash.inc
> index c06f157..020409f 100644
> --- a/meta/recipes-extended/bash/bash.inc
> +++ b/meta/recipes-extended/bash/bash.inc
> @@ -7,7 +7,7 @@ DEPENDS = "ncurses bison-native"
> inherit autotools gettext texinfo update-alternatives ptest
> 
> EXTRA_AUTORECONF += "--exclude=autoheader"
> -EXTRA_OECONF = "--enable-job-control"
> +EXTRA_OECONF = "--enable-job-control --without-bash-malloc"
> 
> # If NON_INTERACTIVE_LOGIN_SHELLS is defined, all login shells read the
> # startup files, even if they are not interactive.
> --
> 1.9.1
> 
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 211 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] bash: Disable custom memory allocator
  2015-10-09 22:21 [PATCH] bash: Disable custom memory allocator Aníbal Limón
  2015-10-10  0:25 ` Khem Raj
@ 2015-10-13 15:58 ` Benjamin Esquivel
  2015-10-13 16:06   ` Aníbal Limón
  1 sibling, 1 reply; 6+ messages in thread
From: Benjamin Esquivel @ 2015-10-13 15:58 UTC (permalink / raw)
  To: Aníbal Limón, openembedded-core

Hey Anibal, a line or 2 in mentioning the issue at the git commit
message would be required. You're only mentioning that there is an
issue and it would be informational to say what it is, even though the
bug number is at the end.

On Fri, 2015-10-09 at 17:21 -0500, Aníbal Limón wrote:
> Bash is failing trying to allocate memory [1] using the custom
> memory allocator if we disable it the issue is fixed.
> 
> The major distributions also disabled by default [2], so we
> don't have a good reason to use it.
> 
> [YOCTO #8452]
> 
> [1] https://bugzilla.yoctoproject.org/show_bug.cgi?id=8452#c0
> [2] https://bugzilla.yoctoproject.org/show_bug.cgi?id=8452#c5
> 
> Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
> ---
>  meta/recipes-extended/bash/bash.inc | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-extended/bash/bash.inc b/meta/recipes
> -extended/bash/bash.inc
> index c06f157..020409f 100644
> --- a/meta/recipes-extended/bash/bash.inc
> +++ b/meta/recipes-extended/bash/bash.inc
> @@ -7,7 +7,7 @@ DEPENDS = "ncurses bison-native"
>  inherit autotools gettext texinfo update-alternatives ptest
>  
>  EXTRA_AUTORECONF += "--exclude=autoheader"
> -EXTRA_OECONF = "--enable-job-control"
> +EXTRA_OECONF = "--enable-job-control --without-bash-malloc"
>  
>  # If NON_INTERACTIVE_LOGIN_SHELLS is defined, all login shells read
> the
>  # startup files, even if they are not interactive.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] bash: Disable custom memory allocator
  2015-10-13 15:58 ` Benjamin Esquivel
@ 2015-10-13 16:06   ` Aníbal Limón
  2015-10-13 16:24     ` Benjamin Esquivel
  2015-10-14  5:05     ` Richard Purdie
  0 siblings, 2 replies; 6+ messages in thread
From: Aníbal Limón @ 2015-10-13 16:06 UTC (permalink / raw)
  To: benjamin.esquivel, openembedded-core

Hi Benjamin,

This commit is already merged Ross or RP improved the message.

Cheers,
     alimon

On 13/10/15 10:58, Benjamin Esquivel wrote:
> Hey Anibal, a line or 2 in mentioning the issue at the git commit
> message would be required. You're only mentioning that there is an
> issue and it would be informational to say what it is, even though the
> bug number is at the end.
>
> On Fri, 2015-10-09 at 17:21 -0500, Aníbal Limón wrote:
>> Bash is failing trying to allocate memory [1] using the custom
>> memory allocator if we disable it the issue is fixed.
>>
>> The major distributions also disabled by default [2], so we
>> don't have a good reason to use it.
>>
>> [YOCTO #8452]
>>
>> [1] https://bugzilla.yoctoproject.org/show_bug.cgi?id=8452#c0
>> [2] https://bugzilla.yoctoproject.org/show_bug.cgi?id=8452#c5
>>
>> Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
>> ---
>>   meta/recipes-extended/bash/bash.inc | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/meta/recipes-extended/bash/bash.inc b/meta/recipes
>> -extended/bash/bash.inc
>> index c06f157..020409f 100644
>> --- a/meta/recipes-extended/bash/bash.inc
>> +++ b/meta/recipes-extended/bash/bash.inc
>> @@ -7,7 +7,7 @@ DEPENDS = "ncurses bison-native"
>>   inherit autotools gettext texinfo update-alternatives ptest
>>   
>>   EXTRA_AUTORECONF += "--exclude=autoheader"
>> -EXTRA_OECONF = "--enable-job-control"
>> +EXTRA_OECONF = "--enable-job-control --without-bash-malloc"
>>   
>>   # If NON_INTERACTIVE_LOGIN_SHELLS is defined, all login shells read
>> the
>>   # startup files, even if they are not interactive.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] bash: Disable custom memory allocator
  2015-10-13 16:06   ` Aníbal Limón
@ 2015-10-13 16:24     ` Benjamin Esquivel
  2015-10-14  5:05     ` Richard Purdie
  1 sibling, 0 replies; 6+ messages in thread
From: Benjamin Esquivel @ 2015-10-13 16:24 UTC (permalink / raw)
  To: Aníbal Limón, openembedded-core

Great!

On Tue, 2015-10-13 at 11:06 -0500, Aníbal Limón wrote:
> Hi Benjamin,
> 
> This commit is already merged Ross or RP improved the message.
> 
> Cheers,
>      alimon
> 
> On 13/10/15 10:58, Benjamin Esquivel wrote:
> > Hey Anibal, a line or 2 in mentioning the issue at the git commit
> > message would be required. You're only mentioning that there is an
> > issue and it would be informational to say what it is, even though
> > the
> > bug number is at the end.
> > 
> > On Fri, 2015-10-09 at 17:21 -0500, Aníbal Limón wrote:
> > > Bash is failing trying to allocate memory [1] using the custom
> > > memory allocator if we disable it the issue is fixed.
> > > 
> > > The major distributions also disabled by default [2], so we
> > > don't have a good reason to use it.
> > > 
> > > [YOCTO #8452]
> > > 
> > > [1] https://bugzilla.yoctoproject.org/show_bug.cgi?id=8452#c0
> > > [2] https://bugzilla.yoctoproject.org/show_bug.cgi?id=8452#c5
> > > 
> > > Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
> > > ---
> > >   meta/recipes-extended/bash/bash.inc | 2 +-
> > >   1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/meta/recipes-extended/bash/bash.inc b/meta/recipes
> > > -extended/bash/bash.inc
> > > index c06f157..020409f 100644
> > > --- a/meta/recipes-extended/bash/bash.inc
> > > +++ b/meta/recipes-extended/bash/bash.inc
> > > @@ -7,7 +7,7 @@ DEPENDS = "ncurses bison-native"
> > >   inherit autotools gettext texinfo update-alternatives ptest
> > >   
> > >   EXTRA_AUTORECONF += "--exclude=autoheader"
> > > -EXTRA_OECONF = "--enable-job-control"
> > > +EXTRA_OECONF = "--enable-job-control --without-bash-malloc"
> > >   
> > >   # If NON_INTERACTIVE_LOGIN_SHELLS is defined, all login shells
> > > read
> > > the
> > >   # startup files, even if they are not interactive.
> 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] bash: Disable custom memory allocator
  2015-10-13 16:06   ` Aníbal Limón
  2015-10-13 16:24     ` Benjamin Esquivel
@ 2015-10-14  5:05     ` Richard Purdie
  1 sibling, 0 replies; 6+ messages in thread
From: Richard Purdie @ 2015-10-14  5:05 UTC (permalink / raw)
  To: Aníbal Limón; +Cc: openembedded-core

On Tue, 2015-10-13 at 11:06 -0500, Aníbal Limón wrote:
> Hi Benjamin,
> 
> This commit is already merged Ross or RP improved the message.

I did that since I wanted to get the fix merged due to the issues it was
causing on the autobuilder and with the release. Nice find btw!

Cheers,

Richard



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-10-14  5:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-09 22:21 [PATCH] bash: Disable custom memory allocator Aníbal Limón
2015-10-10  0:25 ` Khem Raj
2015-10-13 15:58 ` Benjamin Esquivel
2015-10-13 16:06   ` Aníbal Limón
2015-10-13 16:24     ` Benjamin Esquivel
2015-10-14  5:05     ` Richard Purdie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.