From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 30 03:20:51 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 20D1416A419 for ; Fri, 30 Nov 2007 03:20:51 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from mxout7.cac.washington.edu (mxout7.cac.washington.edu [140.142.32.178]) by mx1.freebsd.org (Postfix) with ESMTP id E5BE713C459 for ; Fri, 30 Nov 2007 03:20:50 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from smtp.washington.edu (smtp.washington.edu [140.142.32.139]) by mxout7.cac.washington.edu (8.13.7+UW06.06/8.13.7+UW07.09) with ESMTP id lAU3KoNS017951 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 29 Nov 2007 19:20:50 -0800 X-Auth-Received: from dzihan.cs.washington.edu (dzihan.cs.washington.edu [128.208.4.96]) (authenticated authid=youshi10) by smtp.washington.edu (8.13.7+UW06.06/8.13.7+UW07.09) with ESMTP id lAU3KnQ9001111 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 29 Nov 2007 19:20:50 -0800 Message-ID: <474F8191.5080807@u.washington.edu> Date: Thu, 29 Nov 2007 19:20:49 -0800 From: Garrett Cooper User-Agent: Thunderbird 2.0.0.6 (X11/20071003) MIME-Version: 1.0 To: Yuri References: <1196388002.474f6ea2bcf32@webmail.rawbw.com> <1196388666.474f713a7d756@webmail.rawbw.com> In-Reply-To: <1196388666.474f713a7d756@webmail.rawbw.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-PMX-Version: 5.3.3.310218, Antispam-Engine: 2.5.2.313940, Antispam-Data: 2007.11.29.190410 X-Uwash-Spam: Gauge=IIIIIII, Probability=7%, Report='LEO_OBFU_SUBJ_RE 0.1, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0, __USER_AGENT 0' Cc: freebsd-hackers@freebsd.org Subject: Re: pkgdb failures X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Nov 2007 03:20:51 -0000 Yuri wrote: > I deleted this file: /var/db/pkg/pkgdb.db and then pkgdb -fu succeeded. > But next time I ran I got the same error with /usr/ports/INDEX-7.db. > Then this error disappear. > > So it's most likely the bug with Berkeley DB. > Anybody else has these kind of problems? > > Yuri > > > Quoting Yuri : > > >> While doing portupgrade I am sporadically getting the error like below. >> After I ran 'pkgdb -fu' few times and this cured tye problem. But then >> after >> a while of portupgrade run I now get the error: >> >> >>> pkgdb -fu >>> ---> Updating the pkgdb >>> [Rebuilding the pkgdb in /var/db/pkg ... >>> >> /var/db/pkg/pkgdb.db: >unexpected file type or format -- Invalid argument: >> Cannot update the pkgdb!] >> >> man pkgdb says: >> BUGS >> Sometimes a database may get corrupt, and the pkgtools commands may >> abort >> with a segmentation fault. In such cases, run ``pkgdb -fu'' to >> rebuild >> the database, and the problems should go away. >> >> So what should I do now to upgrade ports? >> >> Yuri >> >> -- error log during portupgrade -- >> /var/db/pkg/pkgdb.db: unexpected file type or format -- Invalid argument >> ** Command failed [exit code 1]: /usr/local/sbin/pkgdb -aFOQ >> ---> Skipping 'net/openldap23-client' >> ---> Reinstalling 'tcl-8.4.16,1' (lang/tcl84) Yes, it's partly caused by pkgdb and/or how Ruby / pkgdb handles the DB I think... 1. What type of BDB structure do you use [most likely btree(1) -- says this during the pkgdb rebuild..]? 2. What version of BDB are you using (1.85, 2.x or 4.x) [(cd /usr/ports/ports-mgmt/portinstall && make config) will give you that info]? 3. uname -a says? -Garrett