mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* why would i get "Out of memory" error in a sandbox build?
@ 2014-07-02 19:50 Robert P. J. Day
  2014-07-03  6:26 ` Sascha Hauer
  0 siblings, 1 reply; 4+ messages in thread
From: Robert P. J. Day @ 2014-07-02 19:50 UTC (permalink / raw)
  To: U-Boot Version 2 (barebox)


  playing around with an absolutely generic sandbox build and i ran
into the following issue. i built sandbox on my fedora rawhide system
with no customization whatsoever, and executed it with no root
privilege, so i definitely expected some things not to work. i got the
following:

$ ./barebox


barebox 2014.06.0-00365-g96c53b1 #1 Wed Jul 2 15:03:37 EDT 2014


Board: barebox sandbox
could not open /dev/net/tun: Permission denied
tap tap0: probe failed: Operation not permitted
malloc space: 0x7f249f5e9010 -> 0x7f249fde900f (size 8 MiB)
environment load /dev/env0: No such file or directory
Maybe you have to create the partition.
no valid environment found on /dev/env0. Using default environment
running /env/bin/init...
\nHit any key to stop autoboot:  0
booting net
ifup: Cannot find device eth0
ifup: No such file or directory
running automount command 'ifup eth0 && mount -t tftp $eth0.serverip
/mnt/tftp' failed
ifup: Cannot find device eth0
ifup: No such file or directory
running automount command 'ifup eth0 && mount -t tftp $eth0.serverip
/mnt/tftp' failed
could not open /mnt/tftp/none-linux-barebox: No such file or directory
Booting net failed: No such file or directory
booting net failed: No such file or directory
boot: No such file or directory
barebox@barebox sandbox:/

  i'm actually good with this, it's about what i expected since i set
no environment or networking, etc.  but just for fun, i "cd"ed down
into /mnt/tftp, knowing this shouldn't work, and here's what happened:

barebox@barebox sandbox:/ cd /mnt/tftp
ifup: Cannot find device eth0
ifup: No such file or directory
running automount command 'ifup eth0 && mount -t tftp $eth0.serverip
/mnt/tftp' failed
barebox@barebox sandbox:/mnt/tftp cd /
ERROR: out of memory

no stack data available
[rpjday@localhost barebox_build]$

  in short, "cd"ing into /mnt/tftp failed as it should have, but just
trying to "cd" back to the root caused the "out of memory" error. it
seems entirely reproducible. should i have expected this?

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: why would i get "Out of memory" error in a sandbox build?
  2014-07-02 19:50 why would i get "Out of memory" error in a sandbox build? Robert P. J. Day
@ 2014-07-03  6:26 ` Sascha Hauer
  2014-07-03 11:23   ` Robert P. J. Day
  0 siblings, 1 reply; 4+ messages in thread
From: Sascha Hauer @ 2014-07-03  6:26 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: U-Boot Version 2 (barebox)

On Wed, Jul 02, 2014 at 03:50:36PM -0400, Robert P. J. Day wrote:
> 
> barebox@barebox sandbox:/
> 
>   i'm actually good with this, it's about what i expected since i set
> no environment or networking, etc.  but just for fun, i "cd"ed down
> into /mnt/tftp, knowing this shouldn't work, and here's what happened:
> 
> barebox@barebox sandbox:/ cd /mnt/tftp
> ifup: Cannot find device eth0
> ifup: No such file or directory
> running automount command 'ifup eth0 && mount -t tftp $eth0.serverip
> /mnt/tftp' failed
> barebox@barebox sandbox:/mnt/tftp cd /
> ERROR: out of memory
> 
> no stack data available
> [rpjday@localhost barebox_build]$
> 
>   in short, "cd"ing into /mnt/tftp failed as it should have, but just
> trying to "cd" back to the root caused the "out of memory" error. it
> seems entirely reproducible. should i have expected this?

This is an interesting bug you triggered. by changing the cwd to an
automount directory you found a way to trigger the automount function
from the automount function resulting in an endless loop. This loop
gets interrupted when we are out of memory.

I sent a fix to the list which fixes this.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: why would i get "Out of memory" error in a sandbox build?
  2014-07-03  6:26 ` Sascha Hauer
@ 2014-07-03 11:23   ` Robert P. J. Day
  2014-07-04  5:30     ` Sascha Hauer
  0 siblings, 1 reply; 4+ messages in thread
From: Robert P. J. Day @ 2014-07-03 11:23 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: U-Boot Version 2 (barebox)

On Thu, 3 Jul 2014, Sascha Hauer wrote:

> On Wed, Jul 02, 2014 at 03:50:36PM -0400, Robert P. J. Day wrote:
> >
> > barebox@barebox sandbox:/
> >
> >   i'm actually good with this, it's about what i expected since i set
> > no environment or networking, etc.  but just for fun, i "cd"ed down
> > into /mnt/tftp, knowing this shouldn't work, and here's what happened:
> >
> > barebox@barebox sandbox:/ cd /mnt/tftp
> > ifup: Cannot find device eth0
> > ifup: No such file or directory
> > running automount command 'ifup eth0 && mount -t tftp $eth0.serverip
> > /mnt/tftp' failed
> > barebox@barebox sandbox:/mnt/tftp cd /
> > ERROR: out of memory
> >
> > no stack data available
> > [rpjday@localhost barebox_build]$
> >
> >   in short, "cd"ing into /mnt/tftp failed as it should have, but just
> > trying to "cd" back to the root caused the "out of memory" error. it
> > seems entirely reproducible. should i have expected this?
>
> This is an interesting bug you triggered. by changing the cwd to an
> automount directory you found a way to trigger the automount function
> from the automount function resulting in an endless loop. This loop
> gets interrupted when we are out of memory.
>
> I sent a fix to the list which fixes this.

  i *swear*, i'm not *trying* to find the most obscure bugs
imaginable. :-)

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: why would i get "Out of memory" error in a sandbox build?
  2014-07-03 11:23   ` Robert P. J. Day
@ 2014-07-04  5:30     ` Sascha Hauer
  0 siblings, 0 replies; 4+ messages in thread
From: Sascha Hauer @ 2014-07-04  5:30 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: U-Boot Version 2 (barebox)

On Thu, Jul 03, 2014 at 07:23:07AM -0400, Robert P. J. Day wrote:
> On Thu, 3 Jul 2014, Sascha Hauer wrote:
> 
> > On Wed, Jul 02, 2014 at 03:50:36PM -0400, Robert P. J. Day wrote:
> > >
> > > barebox@barebox sandbox:/
> > >
> > >   i'm actually good with this, it's about what i expected since i set
> > > no environment or networking, etc.  but just for fun, i "cd"ed down
> > > into /mnt/tftp, knowing this shouldn't work, and here's what happened:
> > >
> > > barebox@barebox sandbox:/ cd /mnt/tftp
> > > ifup: Cannot find device eth0
> > > ifup: No such file or directory
> > > running automount command 'ifup eth0 && mount -t tftp $eth0.serverip
> > > /mnt/tftp' failed
> > > barebox@barebox sandbox:/mnt/tftp cd /
> > > ERROR: out of memory
> > >
> > > no stack data available
> > > [rpjday@localhost barebox_build]$
> > >
> > >   in short, "cd"ing into /mnt/tftp failed as it should have, but just
> > > trying to "cd" back to the root caused the "out of memory" error. it
> > > seems entirely reproducible. should i have expected this?
> >
> > This is an interesting bug you triggered. by changing the cwd to an
> > automount directory you found a way to trigger the automount function
> > from the automount function resulting in an endless loop. This loop
> > gets interrupted when we are out of memory.
> >
> > I sent a fix to the list which fixes this.
> 
>   i *swear*, i'm not *trying* to find the most obscure bugs
> imaginable. :-)

Well I have no problem with that. Go out and find more bugs, it can only
be good for the project ;)

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

end of thread, other threads:[~2014-07-04  5:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-02 19:50 why would i get "Out of memory" error in a sandbox build? Robert P. J. Day
2014-07-03  6:26 ` Sascha Hauer
2014-07-03 11:23   ` Robert P. J. Day
2014-07-04  5:30     ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox