<?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>1174</bug_id>
          
          <creation_ts>2011-06-16 19:34:17 +0000</creation_ts>
          <short_desc>[zypper/rpm] package install/removal costs lots of disk space</short_desc>
          <delta_ts>2011-11-21 21:55:14 +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>OE-Core</product>
          <component>core</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>Fix rpm log infinite increase issue, posted for review (17 Nov)</status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jiajun Xu">jiajun.xu</reporter>
          <assigned_to name="Mei Lei">lei.mei</assigned_to>
          <cc>ke.yu</cc>
    
    <cc>lei.mei</cc>
    
    <cc>lianhao.lu</cc>
    
    <cc>mark.hatle</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>sgw</cc>
    
    <cc>shane.wang</cc>
    
    <cc>wenhuax.fan</cc>
    
    <cc>yi.zhao</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>---</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>14323</commentid>
    <comment_count>0</comment_count>
    <who name="Jiajun Xu">jiajun.xu</who>
    <bug_when>2011-06-16 19:34:17 +0000</bug_when>
    <thetext>Tree/Branch: Poky/master
Commit: e5f3cc34df74c08c8cab3e1cf9207fafaec6cb9a

When using zypper/rpm install/removal package, database files and log files cost a lot of disk space and may cause target image out of space.

The first time when we use RPM, a lot of database files will be created, larger than 10MB.
###
root@qemux86:~# ls -l /var/lib/rpm/
-rw-r--r--    1 root     root         12288 Jun 13 18:51 Arch
-rw-r--r--    1 root     root        237568 Jun 13 18:51 Basenames
-rw-r--r--    1 root     root          8192 Jun 13 18:51 Conflictname
-rw-rw-rw-    1 root     root           477 Jun 13 18:51 DB_CONFIG
-rw-r--r--    1 root     root         57344 Jun 13 18:51 Dirnames
-rw-r--r--    1 root     root        172032 Jun 13 18:51 Filedigests
-rw-r--r--    1 root     root        618496 Jun 13 18:51 Filepaths
-rw-r--r--    1 root     root         16384 Jun 13 18:51 Group
-rw-r--r--    1 root     root         12288 Jun 13 18:51 Installtid
-rw-r--r--    1 root     root         24576 Jun 13 18:51 Name
-rw-r--r--    1 root     root         32768 Jun 13 18:51 Nvra
-rw-r--r--    1 root     root          8192 Jun 13 18:51 Obsoletename
-rw-r--r--    1 root     root         12288 Jun 13 18:51 Os
-rw-r--r--    1 root     root         16384 Jun 13 18:51 Packagecolor
-rw-r--r--    1 root     root       2265088 Jun 13 18:51 Packages
-rw-r--r--    1 root     root         61440 Jun 13 18:51 Providename
-rw-r--r--    1 root     root         12288 Jun 13 18:51 Pubkeys
-rw-r--r--    1 root     root         12288 Jun 13 18:51 Release
-rw-r--r--    1 root     root         94208 Jun 13 18:51 Requirename
-rw-r--r--    1 root     root          8192 Jun 13 18:51 Seqno
-rw-r--r--    1 root     root         45056 Jun 13 18:51 Sha1header
-rw-r--r--    1 root     root         24576 Jun 13 18:51 Sigmd5
-rw-r--r--    1 root     root          8192 Jun 13 18:51 Sourcepkgid
-rw-r--r--    1 root     root          8192 Jun 13 18:51 Triggername
-rw-r--r--    1 root     root         16384 Jun 13 18:51 Version
-rw-r--r--    1 root     root         32768 Jun 13 18:54 __db.001
-rw-r--r--    1 root     root      16392192 Jun 13 18:54 __db.002
-rw-r--r--    1 root     root       9740288 Jun 13 18:54 __db.003
-rw-r--r--    1 root     root       9740288 Jun 13 18:54 __db.004
-rw-r--r--    1 root     root       9740288 Jun 13 18:54 __db.005
-rw-r--r--    1 root     root       9740288 Jun 13 18:54 __db.006
-rw-r--r--    1 root     root        163840 Jun 13 18:54 __db.007
-rw-r--r--    1 root     root       9101312 Jun 13 18:54 __db.008
-rw-r--r--    1 root     root         40960 Jun 13 18:54 __db.009
drwxrwxrwx    2 root     root          1024 Jun 13 18:51 log
###

And under /var/lib/rpm/log, log file for rpm will be saved and continuously increase. Each log file is 10MB and a new log will be generated when old files are fullfilled.
####
root@qemux86:/var/lib/rpm/log# ls -l
total 41837
-rw-r--r-- 1 root root 10485760 Jun 17 16:24 log.0000000001
-rw-r--r-- 1 root root 10485760 Jun 17 16:30 log.0000000002
-rw-r--r-- 1 root root 10485760 Jun 17 16:43 log.0000000003
-rw-r--r-- 1 root root 10485760 Jun 17 17:13 log.0000000004
-rw-r--r-- 1 root root 10485760 Jun 17 17:13 log.0000000005
####</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>14367</commentid>
    <comment_count>1</comment_count>
    <who name="Mark Hatle">mark.hatle</who>
    <bug_when>2011-06-21 08:44:58 +0000</bug_when>
    <thetext>This is an artifact of using BerkleyDB.  I will investigate and attempt to find the settings to flush the journals.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>14431</commentid>
    <comment_count>2</comment_count>
    <who name="wenhua.fan">wenhuax.fan</who>
    <bug_when>2011-06-27 20:00:37 +0000</bug_when>
    <thetext>Tree/Branch: Poky/master
Commit: a1f79a7896b6411669b3ccada6204d2695e80fc5

Qemux86-sato and Qemux86-64-sato-sdk have the same issue in Yocto 1.1 20110624 build.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>14663</commentid>
    <comment_count>3</comment_count>
    <who name="wenhua.fan">wenhuax.fan</who>
    <bug_when>2011-07-11 01:46:02 +0000</bug_when>
    <thetext>Do&apos;t reappear in Yocto 1.1_M2_RC2 testing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>14664</commentid>
    <comment_count>4</comment_count>
    <who name="wenhua.fan">wenhuax.fan</who>
    <bug_when>2011-07-11 01:47:55 +0000</bug_when>
    <thetext>Verify this bug.

Tree/Brahch : Poky/1.1_M2
Poky Commit id: 8df2a558b4d61778a669705b867969abe3514846
Meta Branch 1.1_M2
Meta Commit id : 92fc07a5f1b98779806cdcc2341487ff5ea5a238</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>14666</commentid>
    <comment_count>5</comment_count>
    <who name="wenhua.fan">wenhuax.fan</who>
    <bug_when>2011-07-11 02:22:28 +0000</bug_when>
    <thetext>Sorry for this verification, because of the log and large database files still created, this bug still exist in Yocto1.1_M2_RC2 testing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>15713</commentid>
    <comment_count>6</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2011-08-24 14:02:42 +0000</bug_when>
    <thetext>Can you provide additional infomration on how to tune BerkeleyDB, we might find someone to take a closer look at this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16007</commentid>
    <comment_count>7</comment_count>
    <who name="Mei Lei">lei.mei</who>
    <bug_when>2011-09-04 20:26:17 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; This is an artifact of using BerkleyDB.  I will investigate and attempt to find
&gt; the settings to flush the journals.
Hi Mark, do you have any clue about this bug? I find the Mandriva distribution also report this bug, and they fixed it by enable perl-URPM 4.12:https://qa.mandriva.com/show_bug.cgi?id=62271
But yocto didn&apos;t include this package, do you think we need to enable perl-URPM for this bug?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>17235</commentid>
    <comment_count>8</comment_count>
    <who name="Mei Lei">lei.mei</who>
    <bug_when>2011-11-16 23:53:37 +0000</bug_when>
    <thetext>I have fixed the rpm log grows indefinitly bug:
http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=lmei3/bug1174&amp;id=ea4995cfbec9d75978131ba7566e30d3a20f99fa

(In reply to comment #0)
&gt; Tree/Branch: Poky/master
&gt; Commit: e5f3cc34df74c08c8cab3e1cf9207fafaec6cb9a
&gt; When using zypper/rpm install/removal package, database files and log files
&gt; cost a lot of disk space and may cause target image out of space.
&gt; The first time when we use RPM, a lot of database files will be created, larger
&gt; than 10MB.
&gt; ###
&gt; root@qemux86:~# ls -l /var/lib/rpm/
&gt; -rw-r--r--    1 root     root         12288 Jun 13 18:51 Arch
&gt; -rw-r--r--    1 root     root        237568 Jun 13 18:51 Basenames
&gt; -rw-r--r--    1 root     root          8192 Jun 13 18:51 Conflictname
&gt; -rw-rw-rw-    1 root     root           477 Jun 13 18:51 DB_CONFIG
&gt; -rw-r--r--    1 root     root         57344 Jun 13 18:51 Dirnames
&gt; -rw-r--r--    1 root     root        172032 Jun 13 18:51 Filedigests
&gt; -rw-r--r--    1 root     root        618496 Jun 13 18:51 Filepaths
&gt; -rw-r--r--    1 root     root         16384 Jun 13 18:51 Group
&gt; -rw-r--r--    1 root     root         12288 Jun 13 18:51 Installtid
&gt; -rw-r--r--    1 root     root         24576 Jun 13 18:51 Name
&gt; -rw-r--r--    1 root     root         32768 Jun 13 18:51 Nvra
&gt; -rw-r--r--    1 root     root          8192 Jun 13 18:51 Obsoletename
&gt; -rw-r--r--    1 root     root         12288 Jun 13 18:51 Os
&gt; -rw-r--r--    1 root     root         16384 Jun 13 18:51 Packagecolor
&gt; -rw-r--r--    1 root     root       2265088 Jun 13 18:51 Packages
&gt; -rw-r--r--    1 root     root         61440 Jun 13 18:51 Providename
&gt; -rw-r--r--    1 root     root         12288 Jun 13 18:51 Pubkeys
&gt; -rw-r--r--    1 root     root         12288 Jun 13 18:51 Release
&gt; -rw-r--r--    1 root     root         94208 Jun 13 18:51 Requirename
&gt; -rw-r--r--    1 root     root          8192 Jun 13 18:51 Seqno
&gt; -rw-r--r--    1 root     root         45056 Jun 13 18:51 Sha1header
&gt; -rw-r--r--    1 root     root         24576 Jun 13 18:51 Sigmd5
&gt; -rw-r--r--    1 root     root          8192 Jun 13 18:51 Sourcepkgid
&gt; -rw-r--r--    1 root     root          8192 Jun 13 18:51 Triggername
&gt; -rw-r--r--    1 root     root         16384 Jun 13 18:51 Version
&gt; -rw-r--r--    1 root     root         32768 Jun 13 18:54 __db.001
&gt; -rw-r--r--    1 root     root      16392192 Jun 13 18:54 __db.002
&gt; -rw-r--r--    1 root     root       9740288 Jun 13 18:54 __db.003
&gt; -rw-r--r--    1 root     root       9740288 Jun 13 18:54 __db.004
&gt; -rw-r--r--    1 root     root       9740288 Jun 13 18:54 __db.005
&gt; -rw-r--r--    1 root     root       9740288 Jun 13 18:54 __db.006
&gt; -rw-r--r--    1 root     root        163840 Jun 13 18:54 __db.007
&gt; -rw-r--r--    1 root     root       9101312 Jun 13 18:54 __db.008
&gt; -rw-r--r--    1 root     root         40960 Jun 13 18:54 __db.009
&gt; drwxrwxrwx    2 root     root          1024 Jun 13 18:51 log
&gt; ###
&gt; And under /var/lib/rpm/log, log file for rpm will be saved and continuously
&gt; increase. Each log file is 10MB and a new log will be generated when old files
&gt; are fullfilled.
&gt; ####
&gt; root@qemux86:/var/lib/rpm/log# ls -l
&gt; total 41837
&gt; -rw-r--r-- 1 root root 10485760 Jun 17 16:24 log.0000000001
&gt; -rw-r--r-- 1 root root 10485760 Jun 17 16:30 log.0000000002
&gt; -rw-r--r-- 1 root root 10485760 Jun 17 16:43 log.0000000003
&gt; -rw-r--r-- 1 root root 10485760 Jun 17 17:13 log.0000000004
&gt; -rw-r--r-- 1 root root 10485760 Jun 17 17:13 log.0000000005
&gt; ####</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>17238</commentid>
    <comment_count>9</comment_count>
    <who name="Mei Lei">lei.mei</who>
    <bug_when>2011-11-17 00:42:52 +0000</bug_when>
    <thetext>I filed a new bug 1769 for database capacity issue.
http://bugzilla.pokylinux.org/show_bug.cgi?id=1769</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>17311</commentid>
    <comment_count>10</comment_count>
    <who name="Jiajun Xu">jiajun.xu</who>
    <bug_when>2011-11-21 21:55:14 +0000</bug_when>
    <thetext>verify the bug as fixed with commit f2d077255d9ddf9b87e9a781b989bcce69047cf5</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>