Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 110982 - Upgrade from redhat9 trashes rpm database
Upgrade from redhat9 trashes rpm database
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
i686 Linux
medium Severity high
: ---
: ---
Assigned To: Jeff Johnson
Mike McLean
Depends On:
  Show dependency treegraph
Reported: 2003-11-26 04:56 EST by Andrew Savva
Modified: 2007-11-30 17:10 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-12-11 08:30:55 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Andrew Savva 2003-11-26 04:56:40 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6a)
Gecko/20031001 Firebird/0.7+

Description of problem:
After upgrading a Sony Vaio laptop from redhat 9 to fedora core the
rpm database has been trashed.

Issuing "rpm --rebuilddb" has no effect whatsoever and the command
returns immediately as opposed to the expected output and long delay
as the database is being rebuilt.

Issuing rpm -q rpm (or any other package) comes back (obviously) with
a message stating that the package is not installed.

How do I get my rpm database resurrected? I am probably going to have
to install from scratch but I thought I'd post this to warn the fedora
developers that there is an issue as other users might be less

Version-Release number of selected component (if applicable):

How reproducible:
Didn't try

Steps to Reproduce:
1.Install redhat 9
2.Upgrade to fedora core from redhat 9 base install


Actual Results:  Rpm database gets wiped clean

Expected Results:  Rpm database should still exist

Additional info:
Comment 1 Jeff Johnson 2003-11-30 10:00:16 EST
What does "ls -al /var/lib/rpm" say?
Comment 2 Andrew Savva 2003-12-01 03:53:29 EST
[root@alanis root]# ls -al /var/lib/rpm
total 50960
drwxr-xr-x    2 rpm      rpm          4096 Nov 15 22:23 ./
drwxr-xr-x   21 root     root         4096 Nov 15 21:38 ../
-rw-r--r--    1 rpm      rpm       9834496 Nov 15 22:22 Basenames
-rw-r--r--    1 rpm      rpm         12288 Nov 15 22:21 Conflictname
-rw-r--r--    1 rpm      rpm       1421312 Nov 15 22:22 Dirnames
-rw-r--r--    1 rpm      rpm      10489856 Nov 15 22:22 Filemd5s
-rw-r--r--    1 rpm      rpm         12288 Nov 15 22:22 Group
-rw-r--r--    1 rpm      rpm         20480 Nov 15 22:22 Installtid
-rw-r--r--    1 rpm      rpm         45056 Nov 15 22:22 Name
-rw-r--r--    1 rpm      rpm      35909632 Nov 15 22:22 Packages
-rw-r--r--    1 rpm      rpm        339968 Nov 15 22:22 Providename
-rw-r--r--    1 rpm      rpm         94208 Nov 15 22:22 Provideversion
-rw-r--r--    1 rpm      rpm         12288 Nov 15 22:22 Pubkeys
-rw-r--r--    1 rpm      rpm        233472 Nov 15 22:22 Requirename
-rw-r--r--    1 rpm      rpm        167936 Nov 15 22:22 Requireversion
-rw-r--r--    1 rpm      rpm         90112 Nov 15 22:22 Sha1header
-rw-r--r--    1 rpm      rpm         49152 Nov 15 22:22 Sigmd5
-rw-r--r--    1 rpm      rpm         12288 Nov 15 22:22 Triggername
Comment 3 Jeff Johnson 2003-12-05 11:06:53 EST
OK, Packages exists and appears to have valid (i.e. non-empty) data.

What does "rpm --rebuilddb -vv" say?
Comment 4 Andrew Savva 2003-12-06 05:09:48 EST
[root@alanis root]# rpm --rebuilddb -vv
D: rebuilding database /var/local/lib/rpm into
D: creating directory /var/local/lib/rpmrebuilddb.2557
D: opening old database with dbapi 3
D: unshared posix mutexes found(38), adding DB_PRIVATE, using fcntl lock
D: opening  db environment /var/local/lib/rpm/Packages
D: opening  db index       /var/local/lib/rpm/Packages rdonly mode=0x0
D: locked   db index       /var/local/lib/rpm/Packages
D: opening new database with dbapi 3
D: unshared posix mutexes found(38), adding DB_PRIVATE, using fcntl lock
D: opening  db environment /var/local/lib/rpmrebuilddb.2557/Packages
D: opening  db index       /var/local/lib/rpmrebuilddb.2557/Packages
create mode=0x42
D: closed   db index       /var/local/lib/rpm/Packages
D: closed   db environment /var/local/lib/rpm/Packages
D: removed  db environment /var/local/lib/rpm/Packages
D: closed   db index       /var/local/lib/rpmrebuilddb.2557/Packages
D: closed   db environment /var/local/lib/rpmrebuilddb.2557/Packages
D: removed  db environment /var/local/lib/rpmrebuilddb.2557/Packages
D: removing directory /var/local/lib/rpmrebuilddb.2557
Comment 5 Jeff Johnson 2003-12-06 14:36:15 EST
Hmmm, what kernel and glibc are you using? rpm-4.2
needs nptl supprort, and you appear (the DB_PRIVATE messages)
to not have functional nptl (threading).

Did you perhaps install the i386 version of glibc? That does
not have nptl compiled in.
Comment 6 Andrew Savva 2003-12-08 10:55:05 EST
I am using a custom kernel 2.4.23.

I've never known the kernel to clash with the rpm package manager.
This is a new one for me!

What is the nptl patch you are referring to? I noticed that the Fedora
shipper kernel is 2.4.22-1.2115.nptl but did not take much notice of
the spurious nptl extension. I presume this means it is a 2.4.22
kernel with the nptl patch?

Please can you advise on how to proceed. I don't want to rely on a now
obsolete kernel (2.4.22) and so would appreciate any advise on how to
patch to support nptl.

The glibc version I am using is the standard Fedora shipped packages.
I have definitly not changed this from the standard version but can't
tell you what I have because of my "rpm" issue. 
Comment 7 Jeff Johnson 2003-12-11 08:30:55 EST
Do you have Red Hat changes in your "custom" 2.4.23 kernel?
If no, you should be building and using rpm-4.1.1. The issue
is NPTL used for pthread-mutexes on rpmdb, rpm-4.1.1 is the
same code base as rpm-4.2, but is built without --enable-posixmutexexs.

Alternatively, build rpm-4.2 without --enable-posixmutexes.
Comment 8 Andrew Savva 2003-12-13 13:56:20 EST
I will rebuild rpm as per suggestion.


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