pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/45203: pkg_delete segfaults with (apparently) previously partially deleted package



>Number:         45203
>Category:       pkg
>Synopsis:       pkg_delete segfaults with (apparently) previously partially 
>deleted package
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Aug 02 00:25:01 +0000 2011
>Originator:     Moritz Wilhelmy
>Release:        NetBSD 5.99.54
>Organization:
>Environment:
System: NetBSD fenrir 5.99.54 NetBSD 5.99.54 (GENERIC) #2: Mon Jul 18 18:56:29 
CEST 2011 root@fenrir:/usr/obj/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386

$ /usr/pkg/sbin/pkg_delete -V
20110215
$ /usr/sbin/pkg_delete -V
20110215


/usr/sbin/pkg_delete:
     $NetBSD: crt0-common.c,v 1.7 2011/06/30 20:07:35 matt Exp $
     $NetBSD: crt0.S,v 1.3 2011/07/01 02:59:05 joerg Exp $
     $NetBSD: crti.S,v 1.1 2010/08/07 18:01:33 joerg Exp $
     $NetBSD: crtbegin.S,v 1.1 2010/08/07 18:01:33 joerg Exp $
     $NetBSD: pkg_delete.c,v 1.1.1.7 2010/02/03 14:23:46 joerg Exp $
     $NetBSD: version.c,v 1.1.1.3 2010/02/03 14:24:00 joerg Exp $
     $NetBSD: str.c,v 1.1.1.2 2009/02/02 20:44:08 joerg Exp $
     $NetBSD: remove.c,v 1.1.1.2 2009/08/06 16:55:29 joerg Exp $
     $NetBSD: parse-config.c,v 1.1.1.11 2010/06/26 00:14:31 joerg Exp $
     $NetBSD: global.c,v 1.1.1.2 2009/02/02 20:44:06 joerg Exp $
     $NetBSD: fexec.c,v 1.1.1.3 2009/08/06 16:55:26 joerg Exp $
     $NetBSD: automatic.c,v 1.1.1.2 2009/02/02 20:44:05 joerg Exp $
     $NetBSD: var.c,v 1.1.1.3 2009/08/06 16:55:29 joerg Exp $
     $NetBSD: plist.c,v 1.1.1.5 2009/08/06 16:55:28 joerg Exp $
     $NetBSD: file.c,v 1.1.1.6 2011/02/18 22:32:30 aymeric Exp $
     $NetBSD: pkgdb.c,v 1.1.1.8 2010/04/23 20:54:11 joerg Exp $
     $NetBSD: opattern.c,v 1.1.1.2 2009/02/02 20:44:06 joerg Exp $
     $NetBSD: xwrapper.c,v 1.1.1.1 2009/02/02 20:44:09 joerg Exp $
     $NetBSD: crtend.S,v 1.1 2010/08/07 18:01:33 joerg Exp $
     $NetBSD: crtn.S,v 1.1 2010/08/07 18:01:34 joerg Exp $

/usr/pkg/sbin/pkg_delete:
     $NetBSD: crt0-common.c,v 1.7 2011/06/30 20:07:35 matt Exp $
     $NetBSD: crt0.S,v 1.3 2011/07/01 02:59:05 joerg Exp $
     $NetBSD: crti.S,v 1.1 2010/08/07 18:01:33 joerg Exp $
     $NetBSD: crtbegin.S,v 1.1 2010/08/07 18:01:33 joerg Exp $
     $NetBSD: pkg_delete.c,v 1.11 2010/02/03 14:20:14 joerg Exp $
     $NetBSD: automatic.c,v 1.5 2009/02/02 12:35:01 joerg Exp $
     $NetBSD: fexec.c,v 1.12 2009/08/02 17:56:45 joerg Exp $
     $NetBSD: file.c,v 1.30 2010/09/15 13:18:02 joerg Exp $
     $NetBSD: global.c,v 1.5 2009/02/02 12:35:01 joerg Exp $
     $NetBSD: opattern.c,v 1.5 2009/02/02 12:35:01 joerg Exp $
     $NetBSD: parse-config.c,v 1.15 2010/06/16 23:02:49 joerg Exp $
     $NetBSD: pkgdb.c,v 1.39 2010/04/20 21:22:38 joerg Exp $
     $NetBSD: plist.c,v 1.29 2009/08/02 17:56:45 joerg Exp $
     $NetBSD: remove.c,v 1.3 2009/08/02 17:56:45 joerg Exp $
     $NetBSD: str.c,v 1.26 2009/02/02 12:35:01 joerg Exp $
     $NetBSD: var.c,v 1.8 2009/08/02 17:56:45 joerg Exp $
     $NetBSD: version.c,v 1.7 2010/02/03 14:20:14 joerg Exp $
     $NetBSD: xwrapper.c,v 1.2 2009/02/02 12:35:01 joerg Exp $
     $NetBSD: db.c,v 1.3 2010/01/24 12:29:48 obache Exp $
     $NetBSD: hash.c,v 1.3 2010/04/20 00:32:23 joerg Exp $
     $NetBSD: hash_bigkey.c,v 1.1 2008/10/10 00:21:43 joerg Exp $
     $NetBSD: hash_buf.c,v 1.1 2008/10/10 00:21:43 joerg Exp $
     $NetBSD: hash_func.c,v 1.1 2008/10/10 00:21:43 joerg Exp $
     $NetBSD: hash_log2.c,v 1.1 2008/10/10 00:21:43 joerg Exp $
     $NetBSD: hash_page.c,v 1.6 2010/04/20 00:32:23 joerg Exp $
     $NetBSD: rec_open.c,v 1.2 2009/07/16 18:23:32 abs Exp $
     $NetBSD: rec_put.c,v 1.1 2008/10/10 00:21:44 joerg Exp $
     $NetBSD: rec_search.c,v 1.1 2008/10/10 00:21:44 joerg Exp $
     $NetBSD: rec_seq.c,v 1.1 2008/10/10 00:21:44 joerg Exp $
     $NetBSD: rec_utils.c,v 1.1 2008/10/10 00:21:44 joerg Exp $
     $NetBSD: bt_close.c,v 1.1 2008/10/10 00:21:43 joerg Exp $
     $NetBSD: bt_open.c,v 1.5 2009/05/07 00:23:45 schmonz Exp $
     $NetBSD: bt_overflow.c,v 1.1 2008/10/10 00:21:43 joerg Exp $
     $NetBSD: bt_page.c,v 1.1 2008/10/10 00:21:43 joerg Exp $
     $NetBSD: bt_put.c,v 1.1 2008/10/10 00:21:43 joerg Exp $
     $NetBSD: bt_search.c,v 1.1 2008/10/10 00:21:43 joerg Exp $
     $NetBSD: bt_seq.c,v 1.1 2008/10/10 00:21:43 joerg Exp $
     $NetBSD: bt_split.c,v 1.1 2008/10/10 00:21:43 joerg Exp $
     $NetBSD: bt_utils.c,v 1.1 2008/10/10 00:21:43 joerg Exp $
     $NetBSD: mpool.c,v 1.5 2010/04/20 00:32:23 joerg Exp $
     $NetBSD: rec_close.c,v 1.1 2008/10/10 00:21:44 joerg Exp $
     $NetBSD: rec_delete.c,v 1.1 2008/10/10 00:21:44 joerg Exp $
     $NetBSD: rec_get.c,v 1.1 2008/10/10 00:21:44 joerg Exp $
     $NetBSD: bt_conv.c,v 1.1 2008/10/10 00:21:43 joerg Exp $
     $NetBSD: bt_delete.c,v 1.1 2008/10/10 00:21:43 joerg Exp $
     $NetBSD: bt_get.c,v 1.1 2008/10/10 00:21:43 joerg Exp $
     $NetBSD: crtend.S,v 1.1 2010/08/07 18:01:33 joerg Exp $
     $NetBSD: crtn.S,v 1.1 2010/08/07 18:01:34 joerg Exp $

Full backtrace of the pkg_delete from pkgtools/pkg_install, which was built
with debugging information in order to send-pr this:

(gdb) bt full
#0  0x08066cad in __bt_search (t=0xbb908800, key=0xbfbfe24c, exactp=0xbfbfe1d4)
    at 
/usr/pkgsrc/pkgtools/pkg_install/work/libnbcompat/db/btree/bt_search.c:129
        h = (PAGE *) 0xbb98901c
        base = 50
        idx = 49
        lim = 0
        pg = 438
        cmp = 6
#1  0x0806c482 in __bt_bdelete (t=0xbb908800, key=0xbfbfe24c)
    at 
/usr/pkgsrc/pkgtools/pkg_install/work/libnbcompat/db/btree/bt_delete.c:296
        e = (EPG *) 0xbfbfe1f8
        h = (PAGE *) 0xbbb5865b
        deleted = 0
        exact = 134670216
        redo = 134684368
#2  0x0806bd51 in __bt_delete (dbp=0xbb94dd00, key=0xbfbfe24c, flags=0)
    at /usr/pkgsrc/pkgtools/pkg_install/work/libnbcompat/db/btree/bt_delete.c:87
        t = (BTREE *) 0xbb908800
        c = (CURSOR *) 0x1df0
        h = (PAGE *) 0xbbbac4e0
        status = 1
#3  0x0804eea7 in pkgdb_remove (key=0xbfbfe6cc 
"/usr/pkg/share/gtk-doc/html/gtk/AbstractObjects.html")
    at pkgdb.c:238
        keyd = {data = 0xbfbfe6cc, size = 53}
#4  0x08050512 in delete_package (ign_err=0, pkg=0xbfbfeb24, NoDeleteFiles=0, 
destdir=0x0) at plist.c:675
        restored = 0
        p = (plist_t *) 0xbb9330e0
        last_file = 0xbb932910 "share/gtk-doc/html/gtk/AbstractObjects.html"
        fail = 0
        preserve = 0
        tmp = 
"/usr/pkg/share/gtk-doc/html/gtk/AbstractObjects.html\000\000teraction.html\000l\0002\000til.html",
 '\0' <repeats 131 times>, "tñ¿»�®ª»÷O¿»¾\204«»¾\204«»", '\0' 
<repeats 12 times>, 
"�k¬»T�¹»\030è¿¿\0044³»�6\a\b¿\204«»tñ¿»\000¡\221»ð\000\220»�6\a\b\0008\a\b¾\204«»�6\a\b ó\224»X7\a\b\000ð\224»tñ¿»T\000«»TO¿»\000\017«"...
        prefix = 0xbb901090 "/usr/pkg"
        name = 0xbb9010b0 "gtk2+-2.24.3"
#5  0x0804c1ca in remove_pkg (pkg=0xbb901080 "gtk2+-2.24.3") at pkg_delete.c:697
        fp = (FILE *) 0xbbba7fe0
        fname = 0xbb94f3a0 "/usr/pkg/lib/gtk-2.0/immodules"
        pkgdir = 0x14 <Address 0x14 out of bounds>
        plist = {head = 0xbb904080, tail = 0xbb94f380}
        p = (plist_t *) 0xbb904080
        is_depoted_pkg = 134682012
        rv = -1077936144
        late_error = 0
#6  0x0804c7e5 in main (argc=0, argv=0xbfbfec00) at pkg_delete.c:914
        lpp = (lpkg_t *) 0xbb901070
        pkgs = {tqh_first = 0x0, tqh_last = 0xbfbfeb84}
        sorted_pkgs = {tqh_first = 0x0, tqh_last = 0xbfbfeb7c}
        ch = -1
        r = 1
        has_error = 0
        bad_count = 0

        The file /usr/pkg/share/gtk-doc/html/gtk/AbstractObjects.html is
        not present on my system, it might have been removed earlier.

>Description:
        I'm no expert in debugging things, sorry..
        
        I don't know exactly what happened, but I think this happened after the
        package had been partially removed, which iirc had failed, although
        this is sheer speculation.
        Please let me know whether you need additional information/files and
        SSH access if you think it helps.
        The package I tried to delete was gtk+2 in an attempt to perform an
        update.
>How-To-Repeat:
        If I knew exactly how I did this...
>Fix:
        


Home | Main Index | Thread Index | Old Index