Is portsdb/portupgrade broken?

Matthew Seaman m.seaman at infracaninophile.co.uk
Sun Nov 7 18:10:25 GMT 2004


--opJtzjQTFsWo+cga
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sun, Nov 07, 2004 at 04:53:43PM +0000, Michael Abbott wrote:
> Recently I am unable to use portupgrade: there seems to be some problem=
=20
> with the ports index building step which regularly core dumps:
>=20
> $ sudo portsdb -fu
> [Updating the portsdb <format:bdb1_btree> in /usr/ports ... - 11910 port=
=20
> entries found=20
> .........1000.........2000.........3000.........4000.........5000........=
.6000.........7000.........8000....../usr/local/lib/ruby/site_ruby/1.8/port=
sdb.rb:587:=20
> [BUG] Segmentation fault
> ruby 1.8.2 (2004-07-29) [i386-freebsd4]
>=20
> Abort trap (core dumped)
> $
>=20
> I have tried manually deinstalling ruby and portupgrade and reinstalling=
=20
> directly for ports, but this doesn't seem to have made any difference.=20
> Here are the versions I have:
>=20
> $ pkg_info -I 'ruby*' 'port*'
> portaudit-0.5.9     Checks installed ports against a list of security=20
> vulnerabi
> portupgrade-20040701_3 FreeBSD ports/packages administration and manageme=
nt=20
> tool s
> ruby-1.8.2.p2_1     An object-oriented interpreted scripting language
> ruby18-bdb1-0.2.2   Ruby interface to Berkeley DB revision 1.8x with full=
=20
> featu
> $
>=20
> I'm pretty up to date with my ports tree, and I've tried several times=20
> this weekend, so if it is a problem with the ports tree it seems pretty=
=20
> persistent.  Running `portsdb -U` seems to be fine (though very slow).
>=20
> Any ideas for investigating any further?

It's a well known problem -- search the FreeBSD mailing lists for
large amounts of discussion of this very subject.

The bug is in the base system, not the ports.  It's a problem with the
BerkeleyDB 1.65 Btree format.  The fix is here:

    http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libc/db/btree/bt_split.c.=
diff?r1=3D1.6&r2=3D1.7

That has been applied to RELENG_4, RELENG_5 (before the creation of
the RELENG_5_3 branch) and HEAD.  So update to 4.10-STABLE,
5.3-STABLE, 5.3-RELEASE or 6-CURRENT and the problem will be fixed.

Alternately, set:

    % setenv PORTS_DBDRIVER bdb1_hash

or=20

    ENV['PORTS_DBDRIVER'] =3D 'bdb1_hash'

in /usr/local/etc/pkgtools.conf

There are a number of different choices instead of 'bdb1_hash', and
there's also the PKG_DBDRIVER variable you might want to set at the
same time.  Google if you want more detail.

	Cheers,

	Matthew

--=20
Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey         Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK

--opJtzjQTFsWo+cga
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (FreeBSD)

iD8DBQFBjmURiD657aJF7eIRAj9lAKCCdk5GsvKAHMV9gomSBK+IS+MQJQCfXtUF
KKqg9fP/jUlhf+hnL4JNgZc=
=6Krq
-----END PGP SIGNATURE-----

--opJtzjQTFsWo+cga--




More information about the Ukfreebsd mailing list