title: Rpmdb corrupted
body: <p>I have gotten an error when trying to deploy a package with yum:</p>
  
  <pre><code>2016-07-07 14:14:31,296 - ERROR - error: rpmdb: BDB0113 Thread/process     6723/140691298633536 failed: BDB1507 Thread died in Berkeley DB library
  error: db5 error(-30973) from dbenv-&gt;failchk: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery
  error: cannot open Packages index using db5 -  (-30973)
  error: cannot open Packages database in /var/lib/rpm
  CRITICAL:yum.main:
  
  Error: rpmdb open failed
  </code></pre>
  
  <p>I can fix the problem by running:</p>
  
  <pre><code>rm -f /var/lib/rpm/__* &amp;&amp; rpm --rebuilddb 
  sudo yum-complete-transaction --cleanup-only
  </code></pre>
  
  <p>but the error is coming up again, seemingly intermittently. The os is <code>CentOS Linux release 7.2.1511 (Core)</code> and it is running in an Openstack kilo environment. <code>/var/log/yum.log</code> has no reference to the error. What could be the cause of this?</p>