RPM Community Forums

Mailing List Message of <rpm-users>

Re: rpm errors upon running

From: Miller, Vincent (Rick) <vmiller@verisign.com>
Date: Mon 20 Jun 2011 - 16:57:52 CEST
Message-ID: <CA24D3E6.2C3C%vmiller@verisign.com>
Hi Jeff…thanks for the reply.  See my replies inline.  Also, I have an rpmbuild error at the tail of this message.

From: Jeff Johnson <n3npq@mac.com<mailto:n3npq@mac.com>>
Reply-To: <rpm-users@rpm5.org<mailto:rpm-users@rpm5.org>>
Date: Fri, 17 Jun 2011 19:10:33 -0400
To: <rpm-users@rpm5.org<mailto:rpm-users@rpm5.org>>
Subject: Re: rpm errors upon running

On Jun 17, 2011, at 1:43 PM, Miller, Vincent (Rick) wrote:


I have installed RPM5 on FreeBSD 8.2-RELEASE and am now unable to do anything useful with it due to errors.  I tried searching the mail archives for similar issues, but only found a reference to DB_CONFIG in reference to initializing a the rpm db.  Since this is a brand new install and there were no db files on the host, I figured it might apply.  It mentions mmapsize, which is definitely set, but offered no recommendations into calculating what to set it to.

I don't know how you installed, but
make install
from a build SHOULD copy a /var/lib/rpm/DB_CONFIG into place.

The DB_CONFIG file is MANDATORY with @rpm5.org.

The DB_CONFIG file was put into place and the truss output shows DB_CONFIG being read.

The contents (from the rpm-5_3 "production" branch) that pertain to locking tunables are

# ================ Locking
set_lk_max_locks        16384
set_lk_max_lockers      16384
set_lk_max_objects      16384
mutex_set_max           163840

The heuristic (that I use) is that the mutex_set_max should be ~10x larger
than the other values, which is about the right scaling.

The size of the others depends on how many packages are managed,
which is an extrinsic quantity that isn't guessable a priori. 16K -> 64K are
about the right range, and conservative. There's likely something else
wrong if you appear to need >64K.

How did you build rpm? From CVS? rpm-5.4.1 or rpm-5.3.11?

I downloaded a source tarball for 5.3.4 and installed with the commands below after installing various ports  that appeared to be required.  The ports I installed were popt, beecrypt, pcre, gss, and expat.  Some of these ports had their own dependencies they installed.

./configure —with-expat CPPFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib" LIBS="-lgss"
gmake install

How many packages do you have?

I currently do not have any RPM packages.  There are a couple hundred ports installed, but this should have no bearing on RPM.

I'll include as much info as I can here, but it'll mean the length of this mail may be substantial.

The error I receive when I attempt to rpm –qa is:

<snipped but not ignored>

# ================ Locking
set_lk_max_locks 8000
set_lk_max_lockers 8000
set_lk_max_objects 8000
mutex_set_max 8000

Try setting "mutex_set_max" to 80000 not 8000.

I changed mutex_set_max to 80000 and ran rpm –qa and it did not produce the original error.  Additionally, it appears to have created the __db files in /var/local/lib/rpm/.  This is a good start.

My next test is to attempt to build an RPM.  I am going with a very simple test, initially, which is to create a new /etc/motd.  When I run rpmbuild on the spec file, I get the following error.  Do you have any thoughts on this?

[root@freebsd /usr/local/src/rpm/SPECS]# rpmbuild -bb vrsnconfig-FreeBSD-amd64-1.0.spec
Executing(%prep): /bin/sh -e /var/local/tmp/rpm-tmp.447
+ umask 022
+ cd /usr/local/src/rpm/BUILD
+ rm -rf /var/local/tmp/vrsnconfig-FreeBSD-amd64-root
+ cd /usr/local/src/rpm/BUILD
+ rm -rf vrsnconfig-FreeBSD-amd64-1.0
+ /bin/mkdir -p vrsnconfig-FreeBSD-amd64-1.0
+ cd vrsnconfig-FreeBSD-amd64-1.0
+ + /usr/bin/gzip/usr/bin/tar -dc -xvvf /usr/local/src/rpm/SOURCES/vrsnconfig-FreeBSD-amd64-1.0.tar.gz -

x etc/motd
+ [ 0 -ne 0 ]
+ exit 0
Executing(%build): /bin/sh -e /var/local/tmp/rpm-tmp.447
+ umask 022
+ cd /usr/local/src/rpm/BUILD
+ cd vrsnconfig-FreeBSD-amd64-1.0
+ exit 0
Executing(%install): /bin/sh -e /var/local/tmp/rpm-tmp.447
+ umask 022
+ cd /usr/local/src/rpm/BUILD
+ /bin/rm -rf /var/local/tmp/vrsnconfig-FreeBSD-amd64-root
+ /bin/mkdir -p /var/local/tmp/vrsnconfig-FreeBSD-amd64-root
+ cd vrsnconfig-FreeBSD-amd64-1.0
+ mkdir /var/local/tmp/vrsnconfig-FreeBSD-amd64-root/etc
+ /usr/bin/install -m644 etc/motd /var/local/tmp/vrsnconfig-FreeBSD-amd64-root/etc
+ exit 0
Processing files: vrsnconfig-FreeBSD-amd64-1.0-1.amd64
error: magic_load(ms, NONE/share/file/magic) failed: could not find any magic files!
Assertion failed: (mg != NULL), function rpmfcClassify, file rpmfc.c, line 1154.
Abort trap: 6 (core dumped)
Received on Mon Jun 20 16:57:58 2011
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.