Bug 110982 - Upgrade from redhat9 trashes rpm database
Summary: Upgrade from redhat9 trashes rpm database
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
(Show other bugs)
Version: 1
Hardware: i686 Linux
medium
high
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact: Mike McLean
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-11-26 09:56 UTC by Andrew Savva
Modified: 2007-11-30 22:10 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-12-11 13:30:55 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 Andrew Savva 2003-11-26 09:56:40 UTC
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
experienced.

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 15:00:16 UTC
What does "ls -al /var/lib/rpm" say?

Comment 2 Andrew Savva 2003-12-01 08:53:29 UTC
[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 16:06:53 UTC
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 10:09:48 UTC
[root@alanis root]# rpm --rebuilddb -vv
D: rebuilding database /var/local/lib/rpm into
/var/local/lib/rpmrebuilddb.2557
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
create:cdb:mpool:private
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
create:mpool:private
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 19:36:15 UTC
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 15:55:05 UTC
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 13:30:55 UTC
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 18:56:20 UTC
I will rebuild rpm as per suggestion.

Thanks.


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