Scott Garman | 18 Nov 20:39
Picon
Favicon

qemu needs > 2 GB of RAM to build?

Hi all,

I'm testing building core-image-minimal in a resource-constrained 
environment (a VirtualBox VM with 2300 MB of RAM allocated to it). With 
PARALLEL_MAKE set to -j4 (the VM does have two CPUs allocated), I'm 
finding that the build of qemu-native fails because the OOM killer steps 
in and kills gcc. This is happening during the linking phase of building 
qemu.

If this is true, I assume it would pretty much mean that no one can 
build our images without more than 2 GB of RAM. Is this true? Is this 
something for us to be concerned about?

Scott

--

-- 
Scott Garman
Embedded Linux Engineer - Yocto Project
Intel Open Source Technology Center
Khem Raj | 18 Nov 20:49
Picon
Gravatar

Re: qemu needs > 2 GB of RAM to build?

On Fri, Nov 18, 2011 at 11:39 AM, Scott Garman
<scott.a.garman@...> wrote:
> Hi all,
>
> I'm testing building core-image-minimal in a resource-constrained
> environment (a VirtualBox VM with 2300 MB of RAM allocated to it). With
> PARALLEL_MAKE set to -j4 (the VM does have two CPUs allocated), I'm finding
> that the build of qemu-native fails because the OOM killer steps in and
> kills gcc. This is happening during the linking phase of building qemu.
>

what distro are you running on guest ? it could be something wrong
with the distro gcc or system

> If this is true, I assume it would pretty much mean that no one can build
> our images without more than 2 GB of RAM. Is this true? Is this something
> for us to be concerned about?

I have not seen such an error on a system which has 2G RAM all builds
qemu-native fine here

>
> Scott
>
> --
> Scott Garman
> Embedded Linux Engineer - Yocto Project
> Intel Open Source Technology Center
>
> _______________________________________________
(Continue reading)

Joshua Lock | 18 Nov 20:59
Picon

Re: qemu needs > 2 GB of RAM to build?


On 18/11/11 11:49, Khem Raj wrote:
> On Fri, Nov 18, 2011 at 11:39 AM, Scott Garman
<scott.a.garman@...> wrote:
>> Hi all,
>>
>> I'm testing building core-image-minimal in a resource-constrained
>> environment (a VirtualBox VM with 2300 MB of RAM allocated to it). With
>> PARALLEL_MAKE set to -j4 (the VM does have two CPUs allocated), I'm finding
>> that the build of qemu-native fails because the OOM killer steps in and
>> kills gcc. This is happening during the linking phase of building qemu.

What's BB_NUMBER_THREADS set to? I had to reduce to 1 to build
qemu-native on a laptop with 2GB RAM. iirc it had a habit of linking
something equally large such as eglibc, qt or the kernel at the same time.

> what distro are you running on guest ? it could be something wrong
> with the distro gcc or system

I've seen this on F14 (Gnome 2.x) and F15 (Gnome 3) with a laptop with
only 2GB RAM.

> 
>> If this is true, I assume it would pretty much mean that no one can build
>> our images without more than 2 GB of RAM. Is this true? Is this something
>> for us to be concerned about?
> 
> I have not seen such an error on a system which has 2G RAM all builds
> qemu-native fine here

(Continue reading)

Scott Garman | 18 Nov 21:24
Picon
Favicon

Re: qemu needs > 2 GB of RAM to build?

On 11/18/2011 11:59 AM, Joshua Lock wrote:
>
>
> On 18/11/11 11:49, Khem Raj wrote:
>> On Fri, Nov 18, 2011 at 11:39 AM, Scott
Garman<scott.a.garman@...>  wrote:
>>> Hi all,
>>>
>>> I'm testing building core-image-minimal in a resource-constrained
>>> environment (a VirtualBox VM with 2300 MB of RAM allocated to it). With
>>> PARALLEL_MAKE set to -j4 (the VM does have two CPUs allocated), I'm finding
>>> that the build of qemu-native fails because the OOM killer steps in and
>>> kills gcc. This is happening during the linking phase of building qemu.
>
> What's BB_NUMBER_THREADS set to? I had to reduce to 1 to build
> qemu-native on a laptop with 2GB RAM. iirc it had a habit of linking
> something equally large such as eglibc, qt or the kernel at the same time.

I had it set to 2, but I'm able to reproduce the problem when rebuilding 
*only* qemu-native.

>> what distro are you running on guest ? it could be something wrong
>> with the distro gcc or system
>
> I've seen this on F14 (Gnome 2.x) and F15 (Gnome 3) with a laptop with
> only 2GB RAM.

This is a Fedora 14 host running GNOME 2.x

> I think BB_NUMBER_THREADS is the key here. And whether you're running
(Continue reading)

Joshua Lock | 18 Nov 21:28
Picon

Re: qemu needs > 2 GB of RAM to build?


On 18/11/11 12:24, Scott Garman wrote:
> On 11/18/2011 11:59 AM, Joshua Lock wrote:
>>
>>
>> On 18/11/11 11:49, Khem Raj wrote:
>>> On Fri, Nov 18, 2011 at 11:39 AM, Scott
>>> Garman<scott.a.garman@...>  wrote:
>>>> Hi all,
>>>>
>>>> I'm testing building core-image-minimal in a resource-constrained
>>>> environment (a VirtualBox VM with 2300 MB of RAM allocated to it). With
>>>> PARALLEL_MAKE set to -j4 (the VM does have two CPUs allocated), I'm
>>>> finding
>>>> that the build of qemu-native fails because the OOM killer steps in and
>>>> kills gcc. This is happening during the linking phase of building qemu.
>>
>> What's BB_NUMBER_THREADS set to? I had to reduce to 1 to build
>> qemu-native on a laptop with 2GB RAM. iirc it had a habit of linking
>> something equally large such as eglibc, qt or the kernel at the same
>> time.
> 
> I had it set to 2, but I'm able to reproduce the problem when rebuilding
> *only* qemu-native.
> 
>>> what distro are you running on guest ? it could be something wrong
>>> with the distro gcc or system
>>
>> I've seen this on F14 (Gnome 2.x) and F15 (Gnome 3) with a laptop with
>> only 2GB RAM.
(Continue reading)

Martin Jansa | 18 Nov 22:17
Picon
Gravatar

Re: qemu needs > 2 GB of RAM to build?

On Fri, Nov 18, 2011 at 12:24:25PM -0800, Scott Garman wrote:
> On 11/18/2011 11:59 AM, Joshua Lock wrote:
> >
> >
> > On 18/11/11 11:49, Khem Raj wrote:
> >> On Fri, Nov 18, 2011 at 11:39 AM, Scott Garman<scott.a.garman@...m>  wrote:
> >>> Hi all,
> >>>
> >>> I'm testing building core-image-minimal in a resource-constrained
> >>> environment (a VirtualBox VM with 2300 MB of RAM allocated to it). With
> >>> PARALLEL_MAKE set to -j4 (the VM does have two CPUs allocated), I'm finding
> >>> that the build of qemu-native fails because the OOM killer steps in and
> >>> kills gcc. This is happening during the linking phase of building qemu.
> >
> > What's BB_NUMBER_THREADS set to? I had to reduce to 1 to build
> > qemu-native on a laptop with 2GB RAM. iirc it had a habit of linking
> > something equally large such as eglibc, qt or the kernel at the same time.
> 
> I had it set to 2, but I'm able to reproduce the problem when rebuilding 
> *only* qemu-native.
> 
> >> what distro are you running on guest ? it could be something wrong
> >> with the distro gcc or system
> >
> > I've seen this on F14 (Gnome 2.x) and F15 (Gnome 3) with a laptop with
> > only 2GB RAM.
> 
> This is a Fedora 14 host running GNOME 2.x
> 
> > I think BB_NUMBER_THREADS is the key here. And whether you're running
(Continue reading)

Scott Garman | 18 Nov 22:42
Picon
Favicon

Re: qemu needs > 2 GB of RAM to build?

On 11/18/2011 01:17 PM, Martin Jansa wrote:
> Why not enable more swap? It's slow but works for short peaks in mem
> usage. I have to extend our swap from 2G to 4G on VM with 2G RAM for
> some builds.. also needed during linking unstripped libs :/.

Thank you, Marin - this is an excellent idea. :)

Scott

--

-- 
Scott Garman
Embedded Linux Engineer - Yocto Project
Intel Open Source Technology Center
Ni Qingliang | 21 Nov 01:54
Picon

Re: qemu needs > 2 GB of RAM to build?

I have encountered the same problem on archlinux in VM.
after googled it, maybe it is GCC's defect

On Sat, 2011-11-19 at 03:39 +0800, Scott Garman wrote:
> Hi all,
> 
> I'm testing building core-image-minimal in a resource-constrained
> environment (a VirtualBox VM with 2300 MB of RAM allocated to it). With
> PARALLEL_MAKE set to -j4 (the VM does have two CPUs allocated), I'm
> finding that the build of qemu-native fails because the OOM killer steps
> in and kills gcc. This is happening during the linking phase of building
> qemu.
> 
> If this is true, I assume it would pretty much mean that no one can
> build our images without more than 2 GB of RAM. Is this true? Is this
> something for us to be concerned about?
> 
> Scott
> 
> --
> Scott Garman
> Embedded Linux Engineer - Yocto Project
> Intel Open Source Technology Center
> 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@...
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

--

-- 
(Continue reading)

Khem Raj | 3 Dec 21:03
Picon
Gravatar

Re: qemu needs > 2 GB of RAM to build?

On Fri, Nov 18, 2011 at 11:39 AM, Scott Garman
<scott.a.garman@...> wrote:
> Hi all,
>
> I'm testing building core-image-minimal in a resource-constrained
> environment (a VirtualBox VM with 2300 MB of RAM allocated to it). With
> PARALLEL_MAKE set to -j4 (the VM does have two CPUs allocated), I'm finding
> that the build of qemu-native fails because the OOM killer steps in and
> kills gcc. This is happening during the linking phase of building qemu.
>
> If this is true, I assume it would pretty much mean that no one can build
> our images without more than 2 GB of RAM. Is this true? Is this something
> for us to be concerned about?
>

I think this could be because of gcc bug
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48190
that bug has now been fixed and backported to gcc-4.5 and gcc 4.6
branches as well
however this fix has to go into the gcc in distro that you are running
on build host
we will get this fix into oe-core gcc as well but that may not help
with qemu-native

-Khem

Gmane