Subject: Re: pkg_create dumps core
To: Sylvester F <sylvester_f@hotmail.com>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: tech-pkg
Date: 03/05/2003 21:51:58
On Wed, Mar 05, 2003 at 08:27:19PM +0200, Sylvester F wrote:
> > I have never seen this. Are you capable of compiling latest -current pkg_*
> > tools with debugging enabled (put CFLAGS+=-g and STRIPFLAG= into
> > pkg_install/Makefile.inc), check to reproduce the problem and use gdb to
> > get a stack traceback?
> 
> i modified /usr/pkgsrc/pkgtool/pkg_install/Makefile
> and added this to end of the file:
> CFLAGS+=-g
> STRIPFLAG=
> 
> Then I rebuilt the package with make clean & make update.
> then moved to /usr/pkgsrc/x11/gnome-libs and there
> make clean & make update
> it dumped core like it did before.
> gdb pkg_create pkg_create.core
> 
> it says:
> 
> This GDB was configured as "i386--netbsdelf"...Dwarf Error: Cannot handle
> DW_FORM_strp in DWARF reader.
> 
> Core was generated by `pkg_create'.
> Program terminated with signal 11, Segmentation fault.
> Reading symbols from /usr/libexec/ld.elf_so...(no debugging symbols
> found)...
> done.
> Loaded symbols for /usr/libexec/ld.elf_so
> Reading symbols from /usr/lib/libc.so.12...(no debugging symbols
> found)...done.
> Loaded symbols for /usr/lib/libc.so.12
> #0  0x480e9125 in memmove () from /usr/lib/libc.so.12
> 
> i type bt and it prints:
> 
> #0  0x480e9125 in memmove () from /usr/lib/libc.so.12
> #1  0x8073fc4 in ?? ()
> #2  0x480de1ac in __bt_split () from /usr/lib/libc.so.12
> #3  0x480dd963 in __bt_split () from /usr/lib/libc.so.12
> #4  0x480dc765 in __bt_put () from /usr/lib/libc.so.12
> #5  0x804d869 in ?? ()
> #6  0x804b39a in ?? ()
> #7  0x804af04 in ?? ()
> #8  0x8049f32 in ?? ()
> #9  0x8049ae0 in ?? ()
> 
> i hope this is what you wanted, i've never used gdb before :)

Looks like the db file is corrupted.
try to remove /var/db/pkg/pkgdb.byfile.db and rebuild it with
pkg_admin rebuild

-- 
Manuel Bouyer <bouyer@antioche.eu.org>
     NetBSD: 24 ans d'experience feront toujours la difference
--