Bug 244243 - cannot open Packages index using db3 - Cannot allocate memory (12)
cannot open Packages index using db3 - Cannot allocate memory (12)
Status: CLOSED DUPLICATE of bug 245389
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
7
All Linux
low Severity low
: ---
: ---
Assigned To: Paul Nasrat
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-06-14 13:43 EDT by Răzvan Sandu
Modified: 2007-11-30 17:12 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-07-13 02:56:46 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Răzvan Sandu 2007-06-14 13:43:36 EDT
Description of problem:

Hello,

On some of my machines, when I try to manually do an "yum -y --obsoletes
upgrade", I get this:

[root@newton ~]# yum -y --obsoletes upgrade
Loading "allowdowngrade" plugin
Loading "fastestmirror" plugin
Loading "installonlyn" plugin
rpmdb: Lock table is out of available locker entries
rpmdb: Unknown locker ID: 847
error: db4 error(22) from db->close: Invalid argument
error: cannot open Packages index using db3 - Cannot allocate memory (12)
error: cannot open Packages database in /var/lib/rpm
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.main(sys.argv[1:])
  File "/usr/share/yum-cli/yummain.py", line 82, in main
    base.getOptionsConfig(args)
  File "/usr/share/yum-cli/cli.py", line 146, in getOptionsConfig
    errorlevel=opts.errorlevel)
  File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 153, in _getConfig
    self._conf = config.readMainConfig(startupconf)
  File "/usr/lib/python2.5/site-packages/yum/config.py", line 601, in readMainConfig
    yumvars['releasever'] = _getsysver(startupconf.installroot,
startupconf.distroverpkg)
  File "/usr/lib/python2.5/site-packages/yum/config.py", line 664, in _getsysver
    idx = ts.dbMatch('provides', distroverpkg)
TypeError: rpmdb open failed



and also:


rpm -qa
rpmdb: Lock table is out of available locker entries
rpmdb: Unknown locker ID: 849
error: db4 error(22) from db->close: Invalid argument
error: cannot open Packages index using db3 - Cannot allocate memory (12)
error: cannot open Packages database in /var/lib/rpm


Seems to be database-related - could you please check?


Regards,
Răzvan


Version-Release number of selected component (if applicable):
Can't verify, since the database is inaccesible.  ;-)
However, there are no custom packages - from official Fedora 7 only.


How reproducible:
On some F7 boxes.

Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 1 Jeff Johnson 2007-06-15 22:52:10 EDT
The first thing to try is
   rm -f /var/lib/rpm/__db*

Does that "fix"?

NEEDINFO
Comment 2 Răzvan Sandu 2007-06-16 03:24:16 EDT
Hello,

Yes, it does, at least for the moment.

I also noticed that completely rebooting the box also "fixes" the issue, but
only for some time - the phenomenon occurs again after a while.

Regards,
Răzvan
Comment 3 Răzvan Sandu 2007-06-16 03:28:48 EDT
The only particular thing about these machines is that they were upgraded from
FC6 +updates to F7 via yum and not via regular install.

However, from around 20 machines on which I've did that, only on two this issue
is present.

Regards,
Răzvan
Comment 4 Jeff Johnson 2007-06-17 11:49:04 EDT
During reboot, there is a
    rm -f /var/lib/rpm/__db*
so reboot is just a complicated way to do what can easily be done manually.

Yes, one should not have to remove the stale locks at all.

FYI: rpm-4.4.8 and later has automated stale lock removal for you. See http://rpm5.org if you are
interested in the fix.

UPSTREAM
Comment 5 Răzvan Sandu 2007-07-13 02:56:46 EDT

*** This bug has been marked as a duplicate of 245389 ***

Note You need to log in before you can comment on or make changes to this bug.