Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 20 May 2007 21:43:28 +0200 (CEST)
From:      Gerald Pfeifer <gerald@pfeifer.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/112818: portupgrade -a fails with database error
Message-ID:  <200705201943.l4KJhSno060891@sputnik1.dbai.tuwien.ac.at>
Resent-Message-ID: <200705201950.l4KJo4uk020516@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         112818
>Category:       ports
>Synopsis:       portupgrade -a fails with database error
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun May 20 19:50:03 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator:     Gerald Pfeifer
>Release:        FreeBSD 6.2-RELEASE i386
>Organization:
>Environment:
System: FreeBSD sputnik1 6.2-RELEASE FreeBSD 6.2-RELEASE #0: Fri Jan 12 10:40:27 UTC 2007 root@dessler.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386
>Description:
	I have a hunc that 
	  [database version mismatch/bump detected] Permission denied
	might be the important hint here, but even removing the
	/var/db/pkg/pkgdb.db files does not make any difference.

	And removing /var/db/pkg/pkgdb.db and then directly invoking
	portupgrade -a runs into exactly the same issue.

sputnik1# cd /var/db/pkg/
sputnik1# rm pkgdb.db
sputnik1# pkgdb -F
--->  Checking the package registry database
[Rebuilding the pkgdb <format:bdb_btree> in /var/db/pkg ... - 57 packages found (-0 +57) ......................................................... done]
sputnik1# portupgrade -a
[database version mismatch/bump detected] Permission denied
/usr/local/lib/ruby/site_ruby/1.8/portsdb.rb:493:in `open_db': database file error (PortsDB::DBError)
        from /usr/local/lib/ruby/site_ruby/1.8/portsdb.rb:647:in `port'
        from /usr/local/lib/ruby/site_ruby/1.8/portsdb.rb:835:in `all_depends_list'
        from /usr/local/lib/ruby/site_ruby/1.8/pkgdb.rb:825:in `tsort_build'
        from /usr/local/lib/ruby/site_ruby/1.8/pkgdb.rb:817:in `each'
        from /usr/local/lib/ruby/site_ruby/1.8/pkgdb.rb:817:in `tsort_build'
        from /usr/local/lib/ruby/site_ruby/1.8/pkgdb.rb:839:in `sort_build'
        from /usr/local/lib/ruby/site_ruby/1.8/pkgdb.rb:843:in `sort_build!'
        from /usr/local/sbin/portupgrade:738:in `main'
        from /usr/local/lib/ruby/1.8/optparse.rb:755:in `initialize'
        from /usr/local/sbin/portupgrade:221:in `new'
        from /usr/local/sbin/portupgrade:221:in `main'
        from /usr/local/sbin/portupgrade:2172
/usr/local/lib/ruby/site_ruby/1.8/portsdb.rb:493: [BUG] Segmentation fault
ruby 1.8.5 (2006-08-25) [i386-freebsd6]

Abort (core dumped)

sputnik1# gdb /usr/local/bin/ruby18 ruby18.core

...bt...

#0  0x48243ecb in kill () from /lib/libc.so.6
[New LWP 100047]
(gdb) bt
#0  0x48243ecb in kill () from /lib/libc.so.6
#1  0x48169236 in raise () from /lib/libpthread.so.2
#2  0x48242b78 in abort () from /lib/libc.so.6
#3  0x4809638d in rb_bug () from /usr/local/lib/libruby18.so.18
#4  0x480f81df in sigsegv () from /usr/local/lib/libruby18.so.18
#5  0x4816ff5d in sigaction () from /lib/libpthread.so.2
#6  0xbfbfff94 in ?? ()
#7  0x0000000b in ?? ()
#8  0xbfbfe750 in ?? ()
#9  0xbfbfe490 in ?? ()
#10 0x00000000 in ?? ()
#11 0x4816fa24 in sigaction () from /lib/libpthread.so.2
#12 0x48287dd0 in i_close ()
   from /usr/local/lib/ruby/site_ruby/1.8/i386-freebsd6/bdb.so
#13 0x48098c09 in rb_protect () from /usr/local/lib/libruby18.so.18
#14 0x48287e90 in bdb_free ()
   from /usr/local/lib/ruby/site_ruby/1.8/i386-freebsd6/bdb.so
#15 0x480b55fe in rb_gc_call_finalizer_at_exit ()
   from /usr/local/lib/libruby18.so.18
#16 0x48098b19 in ruby_finalize_1 () from /usr/local/lib/libruby18.so.18
#17 0x480ab350 in ruby_cleanup () from /usr/local/lib/libruby18.so.18
#18 0x480ab417 in ruby_stop () from /usr/local/lib/libruby18.so.18
#19 0x480ab46e in ruby_run () from /usr/local/lib/libruby18.so.18
#20 0x08048607 in main ()
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200705201943.l4KJhSno060891>