Bug 244243 - cannot open Packages index using db3 - Cannot allocate memory (12)
Summary: cannot open Packages index using db3 - Cannot allocate memory (12)
Status: CLOSED DUPLICATE of bug 245389
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
(Show other bugs)
Version: 7
Hardware: All Linux
low
low
Target Milestone: ---
Assignee: Paul Nasrat
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-06-14 17:43 UTC by Răzvan Sandu
Modified: 2007-11-30 22:12 UTC (History)
0 users

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


Attachments (Terms of Use)

Description Răzvan Sandu 2007-06-14 17:43:36 UTC
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-16 02:52:10 UTC
The first thing to try is
   rm -f /var/lib/rpm/__db*

Does that "fix"?

NEEDINFO

Comment 2 Răzvan Sandu 2007-06-16 07:24:16 UTC
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 07:28:48 UTC
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 15:49:04 UTC
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 06:56:46 UTC

*** 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.