From owner-freebsd-ports@FreeBSD.ORG Mon Jan 10 17:00:10 2005 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7B5F916A4CE for ; Mon, 10 Jan 2005 17:00:10 +0000 (GMT) Received: from smtp.unsam.edu.ar (smtp.unsam.edu.ar [170.210.48.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id 48C4A43D4C for ; Mon, 10 Jan 2005 17:00:06 +0000 (GMT) (envelope-from fernan@iib.unsam.edu.ar) Received: from pi.iib.unsam.edu.ar (pi.iib.unsam.edu.ar [192.168.10.11]) by smtp.unsam.edu.ar (8.12.6/8.12.6) with ESMTP id j0AHBpnP004821 for ; Mon, 10 Jan 2005 14:11:51 -0300 (ART) (envelope-from fernan@iib.unsam.edu.ar) Received: from pi.iib.unsam.edu.ar (localhost.iib.unsam.edu.ar [127.0.0.1]) by pi.iib.unsam.edu.ar (8.12.11/8.12.9) with ESMTP id j0AGxjNo019391 for ; Mon, 10 Jan 2005 13:59:45 -0300 (ART) (envelope-from fernan@iib.unsam.edu.ar) Received: (from fernan@localhost) by pi.iib.unsam.edu.ar (8.12.11/8.12.11/Submit) id j0AGxj7I019390 for ports@FreeBSD.ORG; Mon, 10 Jan 2005 13:59:45 -0300 (ART) (envelope-from fernan@iib.unsam.edu.ar) X-Authentication-Warning: pi.iib.unsam.edu.ar: fernan set sender to fernan@iib.unsam.edu.ar using -f Date: Mon, 10 Jan 2005 13:59:45 -0300 From: Fernan Aguero To: FreeBSD Ports Message-ID: <20050110165945.GC75893@iib.unsam.edu.ar> Mail-Followup-To: FreeBSD Ports Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.6i Subject: broken INDEX? ruby segfaults when updating the pkgdb X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jan 2005 17:00:10 -0000 Hi! I'm experiencing these kind of errors since a few days ago: [Updating the pkgdb in /var/db/pkg ... - 671 packages found (-5 +3) (...)[Updating the pkgdb in /var/db/pkg ... - 671 packages found (-5 +3) (...)/usr/local/lib/ruby/site_ruby/1.8/pkgdb.rb:467: [BUG] Segmentation fault ruby 1.8.2 (2004-12-25) [i386-freebsd4] Abort (core dumped) I already read ports/UPDATING and tested a few things, but nothing seems to fix it. Please note also that I've been running RELENG_4_10 for some time and that I've never experienced this problem before (the entry in UPDATING is from November 2004). This is what I did to try to fix the problem: i) pkg_delete ruby, ruby-bdb1 and portupgrade; and then reinstall portupgrade manually (this installed fresh ruby and ruby-bdb1 as dependencies). The problem persists. ii) added ENV['PORTS_DBDRIVER'] = 'dbm_hash' to pkgtools.conf. The problem persists. iii) Tried to set PORTS_DBDRIVER in my shell to either dbm_hash or to bdb1_hash, as suggested in UPDATING. The problem persists. However, if I retrieve a new INDEX file, the error temporarily changes: 1) make fetchindex 2) portsdb -u 3) pkgdb -F ---> Checking the package registry database [Updating the pkgdb in /var/db/pkg ... - 671 packages found (-5 +3) (...)/usr/local/lib/ruby/site_ruby/1.8/pkgdb.rb:467:in `select': failed to allocate memory (NoMemoryError) from /usr/local/lib/ruby/site_ruby/1.8/pkgdb.rb:467:in `update_db' from /usr/local/lib/ruby/site_ruby/1.8/pkgdb.rb:592:in `open_db' from /usr/local/lib/ruby/site_ruby/1.8/pkgdb.rb:759:in `installed_pkgs' from /usr/local/sbin/pkgdb:292:in `fix_db_init' from /usr/local/sbin/pkgdb:284:in `fix_db' from /usr/local/sbin/pkgdb:231:in `main' from /usr/local/sbin/pkgdb:64:in `initialize' from /usr/local/sbin/pkgdb:64:in `new' from /usr/local/sbin/pkgdb:64:in `main' from /usr/local/sbin/pkgdb:1043 After this run, then all subsequent runs produce the segfault error reported first. I am running FreeBSD-4.10-p5 (RELENG_4_10) and I always do a 'cd /usr/ports && make fetchindex' after cvsuping my ports tree. Now my questions: is it possible, as suggested in the followups to PR ports/71558, that this could be caused by a malformed INDEX entry? http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/71558 I know that there are checks to detect INDEX breakage but correct me if I'm wrong, these only check for breaks at the 'make index' level. As suggested in the PR, perhaps the INDEX looks OK, but in some subtle way it is causing some problem(s) to portsdb.rb at parse time. I am now trying to generate INDEX instead of downloading one, but it is taking a while. Once I test with my self-generated INDEX, I will report back (according to the followup to ports/71558 posted by Nick Christenson, manually generating the index makes the problem go away.) The mentioned PR is still open ... are the portupgrade authors aware of this issues? Perhaps this is only evident for 4.x? Thanks in advance for any tip or suggestion, Fernan PS: is it safe to rm pkgdb.db in /var/db/pkg and run pkgdb afterwards?