[nycbug-talk] Portversion and poerupgrade error
Dru
dlavigne6
Fri Sep 17 09:00:34 EDT 2004
On Fri, 17 Sep 2004, Steve wrote:
> In fbsd 4.9 what I did was install ruby after running cvsup, therefore ruby
> was at v 1.8 and the portupgrade port that I had was (of course) prior to
> running cvsup, and was not commmunicating well with ruby 1.8. to fix this I
> deinstalled and reinstalled portupgrade..
I've included the response to the PR I submitted regarding a similar
error. Apparently the base BDB is the problem and it shows itself in
different behaviours on different systems. There is also apparently a
BDB patch in the works but I haven't seen it committed to src yet. Matthew's
#2 suggestion worked on my system.
Note, use pkg_info to see what ruby and db stuff you have installed now.
You'll have to "pkg_delete -f" your current ruby18-bdb port as portupgrade
will complain. Also, you may already have db4 installed, meaning you don't
have to install another Sleepcat DB.
Dru
>From m.seaman at infracaninophile.co.uk Fri Sep 10 11:38:36 2004
Date: Fri, 10 Sep 2004 16:29:53 +0100
From: Matthew Seaman <m.seaman at infracaninophile.co.uk>
To: Dru Lavigne <dlavigne6 at sympatico.ca>
Subject: Re: ports/71558: using portupgrade results in ruby dumping core with bus error
Hi Dru,
On Fri, Sep 10, 2004 at 02:27:34PM +0000, Dru Lavigne wrote:
>
> >Number: 71558
> >Category: ports
> >Synopsis: using portupgrade results in ruby dumping core with bus error
> >Confidential: no
> >Severity: serious
> >Priority: medium
> >Responsible: freebsd-ports-bugs
> >State: open
> >Quarter:
> >Keywords:
> >Date-Required:
> >Class: sw-bug
> >Submitter-Id: current-users
> >Arrival-Date: Fri Sep 10 14:30:21 GMT 2004
> >Closed-Date:
> >Last-Modified:
> >Originator: Dru Lavigne
> >Release: 5.2-RELEASE
> >Organization:
> >Environment:
> FreeBSD dru.domain.org 5.2-RELEASE FreeBSD 5.2-RELEASE #0: Sat Jun 5 09:54:55 EDT 2004 root at dru.domain.org:/usr/obj/usr/src/sys/NEW i386
>
> >Description:
> Problem started Sept. 5 when a scripted upgrade check hung at "portversion -l "<"". Top showed 3 ruby18 processes tying up about 99% CPU. All ruby and portupgrade were deinstalled from system and reinstalled several times over a few days with same results. Running portupgrade results in:
>
> /usr/local/lib/ruby/site_ruby/1.8/portsdb.rb:587: [BUG] Bus Error
> ruby 1.8.2 (2004-07-29) [i386-freebsd5]
> Abort (core dumped)
> (ruby18), uid0: exited on signal 6 (core dumped)
>
> >How-To-Repeat:
> Run portupgrade, portversion or portsdb on affected system. portsclean runs just fine.
> >Fix:
>
> >Release-Note:
> >Audit-Trail:
> >Unformatted:
This has been done to death on freebsd-ports at ...,
freebsd-questions at ..., freebsd-stable at ... and freebsd-hackers at ...
Seems quite a lot of people use that portupgrade software.
Problem is a bug in the BDB btree implementation as supplied with the
system. It affects all versions of FreeBSD and pretty much all
architectures, although the precise details of the crash may vary from
system to system. Current consensus is that there are a couple of
work-arounds:
i) Install sysutils/portindex and use the portindex and portindexdb
commands from that suite to build /usr/ports/INDEX and INDEX.db --
it's only building INDEX.db that causes ruby to core, so if you
can get past that step, you can use portupgrade as normal.
ii) Tell portupgrade et al to use a different hashing implementation.
The absolute simplest way of doing that is to set:
PORTS_DBDDRIVER=bdb1_hash
in your environment. (That will cause /usr/ports/INDEX.db and
/var/db/pkg/pkgdb.db to be rebuilt from scratch using a
different hashing method) Equivalently you can add that setting
to /usr/local/etc/pkgtools.conf -- however I prefer a slightly
modified variant. Add these lines to pkgtools.conf:
ENV['PORTS_DBDRIVER'] = 'bdb_btree'
ENV['PKG_DBDRIVER'] = 'bdb_btree'
and install databases/ruby-bdb together with which ever one of
the SleepyCat BDB versions takes your fancy from
databases/db{2,3,4,41,41-nocrypto,42,42-nocrypto}
References:
http://lists.freebsd.org/pipermail/freebsd-ports/2004-September/015853.html
(and subsequent thread)
http://lists.freebsd.org/pipermail/freebsd-ports/2004-September/015894.html
http://lists.freebsd.org/pipermail/freebsd-ports/2004-September/015902.html
http://lists.freebsd.org/pipermail/freebsd-ports/2004-September/015900.html
(and subsequent thread)
http://lists.freebsd.org/pipermail/freebsd-questions/2004-September/057192.html
(and subsequent thread)
Last but not least Jun Kuriyama has posted a patch for testing:
http://lists.freebsd.org/pipermail/freebsd-current/2004-September/037047.html
Cheers,
Matthew
More information about the talk
mailing list