From owner-freebsd-questions@FreeBSD.ORG Thu Aug 12 09:56:49 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E863016A4CE for ; Thu, 12 Aug 2004 09:56:48 +0000 (GMT) Received: from fidel.freesurf.fr (fidel.freesurf.fr [212.43.206.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 842EA43D2F for ; Thu, 12 Aug 2004 09:56:48 +0000 (GMT) (envelope-from ogautherot@freesurf.fr) Received: from freesurf.fr (arlette.freesurf.fr [212.43.206.12]) by fidel.freesurf.fr (Postfix) with SMTP id C45202A5452; Thu, 12 Aug 2004 11:56:47 +0200 (CEST) Received: from 212.157.144.34 (SquirrelMail authenticated user ogautherot) by arlette.freesurf.fr with HTTP; Thu, 12 Aug 2004 11:56:47 +0200 (CEST) Message-ID: <53617.212.157.144.34.1092304607.squirrel@arlette.freesurf.fr> Date: Thu, 12 Aug 2004 11:56:47 +0200 (CEST) From: To: X-Priority: 3 In-Reply-To: <20040812093507.GA43817@kayjay.xs4all.nl> References: <20040812093507.GA43817@kayjay.xs4all.nl> Importance: Normal X-MSMail-Priority: Normal X-Mailer: SquirrelMail (version 1.2.5) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit cc: freebsd-questions@freebsd.org cc: ogautherot@freesurf.fr Subject: Re: Broken pkgdb and ruby core dump... X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Aug 2004 09:56:49 -0000 Thanks Karel! You saved my vacation! It did the job. For some reason, pkgdb hanged at some point while another install was going on. After that, pkgdb was broken. I don't know why it hanged in the first place. Olivier > On Thu, Aug 12, 2004 at 11:13:40AM +0200, ogautherot@freesurf.fr wrote: >> Hi! >> >> I'm running FreeBSD 5.2.1 with a number of updates (thanks in advance >> for copying me on answers as I had to unsusbscribe to this list due to >> high traffic). >> >> After installing a package (I'm updating KDE and GNOME), I suddenly >> got the error message: >> >> [Updating the pkgdb in /var/db/pkg ... - 614 >> packages found (-10 +77) (...)ruby18 in malloc(): error: allocation >> failed Abort (core dumped) >> # >> >> I can confirm that the core is really dumped :-) >> >> I get this message upon each (direct or indirect) invocation of pkgdb >> - the number of packages to update varies though... >> >> Is there a way to fix the database? I seem to have this problem on a >> regular basis and could fix it so far... only by reinstalling the >> system! I suspect there must be a "pkg fsck" somewhere... I can >> rebuild it by deleteing /var/db/pkg and rebuild all the packages >> manually but I have more fun plans than rerunning "make install clean" >> on 614 packages :-) > > I had this problem recently and worked around by moving > /var/db/pkg/pkgdb.db to some safe place and then rebuilding it (I think > using pkgdb -F). It's not as much work as the solutions you mention. > > Do you have any idea how your pkgdb ended up this way? In my case it > was almost certainly caused by two simultaneous portupgrade's trying to > access the database. (I don't think that's supported in any way.) > > Karel.