[vox-tech] Segmentation Fault with RPM --rebuilddb

ME vox-tech@lists.lugod.org
Fri, 3 Jan 2003 16:31:34 -0800 (PST)


Richard Crawford said:
> rpm does indeed have a verbose option.   Here ya go:
>
> =======================================================================
>
> [root@mossroot rscrawford]# rpm --rebuilddb -vvvvvvvvvv
> D: rebuilding database /var/lib/rpm into /var/lib/rpmrebuilddb.1697
> D: creating directory /var/lib/rpmrebuilddb.1697
> D: opening old database with dbapi 3
> D: opening  db environment /var/lib/rpm/Packages create:mpool
> D: opening  db index       /var/lib/rpm/Packages rdonly mode=0x0
> D: locked   db index       /var/lib/rpm/Packages
> D: opening new database with dbapi 3
> D: opening  db environment /var/lib/rpmrebuilddb.1697/Packages
> create:mpool
> D: opening  db index       /var/lib/rpmrebuilddb.1697/Packages create
> mode=0x42
> D:   +++          1 libsigc++-devel-1.0.4-1.ximian.1
> D: opening  db environment /var/lib/rpmrebuilddb.1697/Name joinenv
> D: opening  db index       /var/lib/rpmrebuilddb.1697/Name create
> mode=0x42
> D: adding "libsigc++-devel" to Name index.
> D: opening  db environment /var/lib/rpmrebuilddb.1697/Basenames joinenv
> D: opening  db index       /var/lib/rpmrebuilddb.1697/Basenames create
> mode=0x42D: adding 40 entries to Basenames index.
> D: opening  db environment /var/lib/rpmrebuilddb.1697/Group joinenv
> D: opening  db index       /var/lib/rpmrebuilddb.1697/Group create
> mode=0x42
> D: adding "Development/Libraries" to Group index.
> D: opening  db environment /var/lib/rpmrebuilddb.1697/Requirename
> joinenv
> D: opening  db index       /var/lib/rpmrebuilddb.1697/Requirename create
> mode=0x42
> D: adding 4 entries to Requirename index.
> D: opening  db environment /var/lib/rpmrebuilddb.1697/Providename
> joinenv
> D: opening  db index       /var/lib/rpmrebuilddb.1697/Providename create
> mode=0x42
> D: adding 2 entries to Providename index.
> D: opening  db environment /var/lib/rpmrebuilddb.1697/Dirnames joinenv
> D: opening  db index       /var/lib/rpmrebuilddb.1697/Dirnames create
> mode=0x42
> D: adding 9 entries to Dirnames index.
> D: opening  db environment /var/lib/rpmrebuilddb.1697/Requireversion
> joinenv
> D: opening  db index       /var/lib/rpmrebuilddb.1697/Requireversion
> create mode=0x42
> D: adding 4 entries to Requireversion index.
> D: opening  db environment /var/lib/rpmrebuilddb.1697/Provideversion
> joinenv
> D: opening  db index       /var/lib/rpmrebuilddb.1697/Provideversion
> create mode=0x42
> D: adding 2 entries to Provideversion index.
> D: opening  db environment /var/lib/rpmrebuilddb.1697/Installtid joinenv
> D: opening  db index       /var/lib/rpmrebuilddb.1697/Installtid create
> mode=0x42
> D: adding 1 entries to Installtid index.
> D: opening  db environment /var/lib/rpmrebuilddb.1697/Sigmd5 joinenv
> D: opening  db index       /var/lib/rpmrebuilddb.1697/Sigmd5 create
> mode=0x42
> D: adding 16 entries to Sigmd5 index.
> Segmentation fault

Perhaps others can see where I am going here, as I am not a RedHat guy,
and help with methods to test it or "make it work."
It looks like it is trying to read what it can from your old rpm Packages
list as stored in /var/lib/rpm/ and put a new copy into
/var/lib/rpmrebuild.1697/ and then, if it comepletes, then replace the old
one with this new one with a simple move.

It appears to choke when it is building an MD5 Checksum (Sig) from the old
data. Doing this on a write seems odd. The file appears to be open, and
ready to accept data.

It is possible that there is a field in one of the old DB's that is used
for MD5 Checksum, and it has too many characters for a valid MD5.

Another variable used as a ref, or pointer (perhaps) is being overwritten
by the "extra" data and then a deref of the variable overwritten leads to
a deref of an address not available. (Tihs is just a guess.)

If we assume this is correct, then the next step would be to inspect the
data being read for the "Sigmd5" portion of this.

Is there any way to examine the Packages files that it is reading from, to
see if the rpm headers being read have an invalid MD5 field, or value?

Is "Sigmd5" actually a package, and not a section of the DB? If so, can it
be upgraded?

look to see if "/var/lib/rpmrebuilddb.1697/Sigmd5" s still there. Is it?
Is it zero length?

Do you have a "/var/lib/rpm/Sigmd5" file? what is its length?

Do you know of any rpm applications that will check md5sums of packages
and headers and verify the headers of the rpms are "good" ?

-ME



-- 
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCS/CM$/IT$/LS$/S/O$ !d--(  ) !s !a   (-----) C  $(    ) U    $( $) P $>
L   $(  ) E W   $( ) N  o K w $>  >    O-@ M $ V-$>- !PS !PE Y  PGP
t@-(  ) 5 @ X@ R- tv- b   DI    D  G--@ e >  >     h(  )>  r*>? z?
------END GEEK CODE BLOCK------
decode: http://www.ebb.org/ungeek/ about: http://www.geekcode.com/geek.html
  Campus IT(/OS Security): Operating Systems Support Specialist Assistant