From owner-freebsd-questions@FreeBSD.ORG Thu Aug 12 09:35:10 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 7E36716A4CE for ; Thu, 12 Aug 2004 09:35:10 +0000 (GMT) Received: from kayjay.xs4all.nl (kayjay.xs4all.nl [80.126.33.60]) by mx1.FreeBSD.org (Postfix) with ESMTP id DE1A643D2D for ; Thu, 12 Aug 2004 09:35:09 +0000 (GMT) (envelope-from karelj@kayjay.xs4all.nl) Received: from kayjay.xs4all.nl (localhost.kayjay.xs4all.nl [127.0.0.1]) by kayjay.xs4all.nl (8.12.11/8.12.11) with ESMTP id i7C9Z8uT043854 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES256-SHA bits=256 verify=NO); Thu, 12 Aug 2004 11:35:08 +0200 (CEST) (envelope-from karelj@kayjay.xs4all.nl) Received: (from karelj@localhost) by kayjay.xs4all.nl (8.12.11/8.12.11/Submit) id i7C9Z7ZY043853; Thu, 12 Aug 2004 11:35:07 +0200 (CEST) (envelope-from karelj) Date: Thu, 12 Aug 2004 11:35:07 +0200 From: "Karel J. Bosschaart" To: ogautherot@freesurf.fr Message-ID: <20040812093507.GA43817@kayjay.xs4all.nl> References: <50257.212.157.144.34.1092302020.squirrel@jose.freesurf.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <50257.212.157.144.34.1092302020.squirrel@jose.freesurf.fr> User-Agent: Mutt/1.4.2.1i cc: freebsd-questions@freebsd.org 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:35:10 -0000 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.