<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>6817</bug_id>
          
          <creation_ts>2014-10-07 17:24:22 +0000</creation_ts>
          <short_desc>bitbake build of core-image-minimal appears to leak memory</short_desc>
          <delta_ts>2014-10-09 15:17:33 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>BitBake</product>
          <component>bitbake</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>NOTABUG</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Undecided</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Steve Maynard">steve</reporter>
          <assigned_to name="Richard Purdie">richard.purdie</assigned_to>
          <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>ross.burton</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>46178</commentid>
    <comment_count>0</comment_count>
    <who name="Steve Maynard">steve</who>
    <bug_when>2014-10-07 17:24:22 +0000</bug_when>
    <thetext>Bitbake appears to leak memory.

bitbake --version
BitBake Build Tool Core version 1.22.0, bitbake version 1.22.0

uname -a
Linux jupiter 3.8.0-44-generic #66~precise1-Ubuntu SMP Tue Jul 15 04:01:04 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 12.04.5 LTS
Release:	12.04
Codename:	precise

top
top - 10:32:22 up 30 min,  2 users,  load average: 0.08, 0.08, 0.14
Tasks: 243 total,   1 running, 242 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.2%us,  0.1%sy,  0.0%ni, 99.7%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:  32904260k total,  1367656k used, 31536604k free,    72956k buffers
Swap: 33510396k total,        0k used, 33510396k free,   537656k cached
====== snip ======

cd ~/poky

MACHINE=qemuarm source oe-init-build-env

MACHINE=qemuarm bitbake core-image-minimal

top
top - 11:11:00 up  1:09,  2 users,  load average: 0.24, 4.53, 6.98
Tasks: 241 total,   1 running, 240 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.2%us,  0.1%sy,  0.0%ni, 99.5%id,  0.1%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:  32904260k total, 16689968k used, 16214292k free,   728104k buffers
Swap: 33510396k total,        0k used, 33510396k free, 14000708k cached
====== snip ======</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>46179</commentid>
    <comment_count>1</comment_count>
    <who name="Steve Maynard">steve</who>
    <bug_when>2014-10-07 19:07:35 +0000</bug_when>
    <thetext>Verified on second machine for default machine qemux86:

bitbake --version
BitBake Build Tool Core version 1.23.1, bitbake version 1.23.1

uname -a
Linux ganymede 3.11.0-26-generic #45~precise1-Ubuntu SMP Tue Jul 15 04:02:35 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 12.04.5 LTS
Release:	12.04
Codename:	precise

top
top - 11:50:20 up 10:14,  3 users,  load average: 1.07, 0.71, 0.32
Tasks: 244 total,   1 running, 243 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.3%us,  0.1%sy,  0.0%ni, 99.6%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:  12287936k total,  3490292k used,  8797644k free,  1163580k buffers
Swap:  8386556k total,        0k used,  8386556k free,   845224k cached

source oe-init-build-env
bitbake core-image-minimal

top
top - 13:02:10 up 11:26,  3 users,  load average: 0.94, 2.38, 5.51
Tasks: 245 total,   1 running, 244 sleeping,   0 stopped,   0 zombie
Cpu(s):  1.0%us,  0.2%sy,  0.0%ni, 98.7%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:  12287936k total, 11665488k used,   622448k free,   426320k buffers
Swap:  8386556k total,    37116k used,  8349440k free,  9030708k cached</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>46243</commentid>
    <comment_count>2</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2014-10-09 15:17:33 +0000</bug_when>
    <thetext>I&apos;m assuming that you&apos;re running top before and after a bitbake run, in which case the relevant lines are:

Before bitbake:
Mem:  32904260k total,  1367656k used, 31536604k free,    72956k buffers

After bitbake:
Mem:  32904260k total, 16689968k used, 16214292k free,   728104k buffers

The increase in &quot;used&quot; is caused by the disk cache (&quot;buffers&quot;) being 730M instead of 73M, as you&apos;ve just done a bitbake build which causes large amounts of disk I/O.  If the system needs more memory then the caches will be dropped to free up memory.  This is expected and desired behaviour from the kernel.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>