Re: pkg_delete core dump
it works!! thanks Mel. TFC On Tue, Nov 18, 2008 at 8:16 AM, Mel <[EMAIL PROTECTED]> wrote: > On Tuesday 18 November 2008 13:37:11 Tsu-Fan Cheng wrote: >> Hi Mel, >>the link to download the +CONTENTS file is here >> http://www.megaupload.com/?d=YDKFRCZG, and you know what? I don't have >> +REQUIRED_BY file. thanks!! >> >> there is a empty entry in the +CONTENTS file: >> >> [snip] >> @pkgdep linux-scim-libs-1.4.4 >> @comment DEPORIGIN:textproc/linux-scim-libs >> @pkgdep >> @comment $FreeBSD: ports/print/acroread8/pkg-plist,v 1.2 2008/04/13 >> 18:36:28 hrs Exp $ > > That's definetely the cause of the crash. The patch below should guard against > pkg_delete crashing. > How this line got created in the first place, is very weird. > > I would run: > grep -E '^@(pkgdep|name)[[:space:]]*$' /var/db/pkg/*/+CONTENTS > > Which would show all dependency lines and name directives that are empty. > Maybe there's a common factor. For the moment my money is on linux-nvu as > that would be the dependency that belongs at the empty spot: > # make -C /usr/ports/print/acroread8 actual-package-depends | sort -u -t : -k > 2 > linux-atk-1.9.1:accessibility/linux-atk > linux-glib2-2.6.6_1:devel/linux-glib2 > linux_base-fc-4_13:emulators/linux_base-fc4 > linux-cairo-1.0.2:graphics/linux-cairo > linux-jpeg-6b.34:graphics/linux-jpeg > linux-png-1.2.8_2:graphics/linux-png > linux-tiff-3.7.1:graphics/linux-tiff > hicolor-icon-theme-0.10_2:misc/hicolor-icon-theme > acroreadwrapper-0.0.20080906:print/acroreadwrapper > linux-expat-1.95.8:textproc/linux-expat > linux-scim-libs-1.4.4:textproc/linux-scim-libs > linux-nvu-1.0:www/linux-nvu > linux-fontconfig-2.2.3_7:x11-fonts/linux-fontconfig > linux-hicolor-icon-theme-0.5_1:x11-themes/linux-hicolor-icon-theme > linux-gtk2-2.6.10:x11-toolkits/linux-gtk2 > linux-pango-1.10.2:x11-toolkits/linux-pango > linux-xorg-libs-6.8.2_5:x11/linux-xorg-libs > > > -- > Mel > > > Index: plist.c > === > RCS file: /home/ncvs/src/usr.sbin/pkg_install/lib/plist.c,v > retrieving revision 1.52 > diff -u -r1.52 plist.c > --- plist.c 28 Mar 2007 05:33:52 - 1.52 > +++ plist.c 18 Nov 2008 12:51:02 - > @@ -31,6 +31,11 @@ > { > PackingList tmp; > > +if( arg == NULL || arg[0] == '\0' ) > +{ > + warnx("Invalid packing list line ignored"); > + return; > +} > tmp = new_plist_entry(); > tmp->name = copy_string(arg); > tmp->type = type; > @@ -61,6 +66,11 @@ > { > PackingList tmp; > > +if( arg == NULL || arg[0] == '\0' ) > +{ > + warnx("Invalid packing list line ignored"); > + return; > +} > tmp = new_plist_entry(); > tmp->name = copy_string(arg); > tmp->type = type; > ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: pkg_delete core dump
On Tuesday 18 November 2008 13:37:11 Tsu-Fan Cheng wrote: > Hi Mel, >the link to download the +CONTENTS file is here > http://www.megaupload.com/?d=YDKFRCZG, and you know what? I don't have > +REQUIRED_BY file. thanks!! > > there is a empty entry in the +CONTENTS file: > > [snip] > @pkgdep linux-scim-libs-1.4.4 > @comment DEPORIGIN:textproc/linux-scim-libs > @pkgdep > @comment $FreeBSD: ports/print/acroread8/pkg-plist,v 1.2 2008/04/13 > 18:36:28 hrs Exp $ That's definetely the cause of the crash. The patch below should guard against pkg_delete crashing. How this line got created in the first place, is very weird. I would run: grep -E '^@(pkgdep|name)[[:space:]]*$' /var/db/pkg/*/+CONTENTS Which would show all dependency lines and name directives that are empty. Maybe there's a common factor. For the moment my money is on linux-nvu as that would be the dependency that belongs at the empty spot: # make -C /usr/ports/print/acroread8 actual-package-depends | sort -u -t : -k 2 linux-atk-1.9.1:accessibility/linux-atk linux-glib2-2.6.6_1:devel/linux-glib2 linux_base-fc-4_13:emulators/linux_base-fc4 linux-cairo-1.0.2:graphics/linux-cairo linux-jpeg-6b.34:graphics/linux-jpeg linux-png-1.2.8_2:graphics/linux-png linux-tiff-3.7.1:graphics/linux-tiff hicolor-icon-theme-0.10_2:misc/hicolor-icon-theme acroreadwrapper-0.0.20080906:print/acroreadwrapper linux-expat-1.95.8:textproc/linux-expat linux-scim-libs-1.4.4:textproc/linux-scim-libs linux-nvu-1.0:www/linux-nvu linux-fontconfig-2.2.3_7:x11-fonts/linux-fontconfig linux-hicolor-icon-theme-0.5_1:x11-themes/linux-hicolor-icon-theme linux-gtk2-2.6.10:x11-toolkits/linux-gtk2 linux-pango-1.10.2:x11-toolkits/linux-pango linux-xorg-libs-6.8.2_5:x11/linux-xorg-libs -- Mel Index: plist.c === RCS file: /home/ncvs/src/usr.sbin/pkg_install/lib/plist.c,v retrieving revision 1.52 diff -u -r1.52 plist.c --- plist.c 28 Mar 2007 05:33:52 - 1.52 +++ plist.c 18 Nov 2008 12:51:02 - @@ -31,6 +31,11 @@ { PackingList tmp; +if( arg == NULL || arg[0] == '\0' ) +{ + warnx("Invalid packing list line ignored"); + return; +} tmp = new_plist_entry(); tmp->name = copy_string(arg); tmp->type = type; @@ -61,6 +66,11 @@ { PackingList tmp; +if( arg == NULL || arg[0] == '\0' ) +{ + warnx("Invalid packing list line ignored"); + return; +} tmp = new_plist_entry(); tmp->name = copy_string(arg); tmp->type = type; ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: pkg_delete core dump
Hi Mel, the link to download the +CONTENTS file is here http://www.megaupload.com/?d=YDKFRCZG, and you know what? I don't have +REQUIRED_BY file. thanks!! there is a empty entry in the +CONTENTS file: [snip] @pkgdep linux-scim-libs-1.4.4 @comment DEPORIGIN:textproc/linux-scim-libs @pkgdep @comment $FreeBSD: ports/print/acroread8/pkg-plist,v 1.2 2008/04/13 18:36:28 hrs Exp $ [snip] TFC On Tue, Nov 18, 2008 at 12:51 AM, Mel <[EMAIL PROTECTED]> wrote: > On Tuesday 18 November 2008 05:18:37 Mel wrote: >> On Monday 17 November 2008 22:15:32 Tsu-Fan Cheng wrote: >> > Hi Mel, >> >thank you for your help, now I recompile pkg_install and run >> > pkg_delete again, under print/acroread8 it still coredump. here is the >> > result: >> > >> > # gdb pkg_delete pkg_delete.core >> > GNU gdb 6.1.1 [FreeBSD] >> > Copyright 2004 Free Software Foundation, Inc. >> > GDB is free software, covered by the GNU General Public License, and you >> > are welcome to change it and/or distribute copies of it under certain >> > conditions. Type "show copying" to see the conditions. >> > There is absolutely no warranty for GDB. Type "show warranty" for >> > details. This GDB was configured as "i386-marcel-freebsd"... >> > Core was generated by `pkg_delete'. >> > Program terminated with signal 11, Segmentation fault. >> > Reading symbols from /lib/libmd.so.4...done. >> > Loaded symbols for /lib/libmd.so.4 >> > Reading symbols from /lib/libc.so.7...done. >> > Loaded symbols for /lib/libc.so.7 >> > Reading symbols from /libexec/ld-elf.so.1...done. >> > Loaded symbols for /libexec/ld-elf.so.1 >> > #0 0x2815dae6 in strcmp () from /lib/libc.so.7 >> > (gdb) bt >> > #0 0x2815dae6 in strcmp () from /lib/libc.so.7 >> > #1 0x0804b50c in isinstalledpkg (name=0x0) >> > at /usr/src/usr.sbin/pkg_install/lib/match.c:374 >> >> There's the culprit. strcmp called on a null pointer. The reason is that >> the +CONTENTS file contains corrupted data. Most likely a @pkgdep line >> without a package name. Could you show the output of: >> grep @pkgdep /var/db/pkg/acroread8-8.1.2_2/+CONTENTS > > Actually, considering it comes from undepend, could you also include: > cat /var/db/pkg/acroread8-8.1.2_2/+REQUIRED_BY > > -- > Mel > > Problem with today's modular software: they start with the modules >and never get to the software part. > ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: pkg_delete core dump
On Tuesday 18 November 2008 05:18:37 Mel wrote: > On Monday 17 November 2008 22:15:32 Tsu-Fan Cheng wrote: > > Hi Mel, > >thank you for your help, now I recompile pkg_install and run > > pkg_delete again, under print/acroread8 it still coredump. here is the > > result: > > > > # gdb pkg_delete pkg_delete.core > > GNU gdb 6.1.1 [FreeBSD] > > Copyright 2004 Free Software Foundation, Inc. > > GDB is free software, covered by the GNU General Public License, and you > > are welcome to change it and/or distribute copies of it under certain > > conditions. Type "show copying" to see the conditions. > > There is absolutely no warranty for GDB. Type "show warranty" for > > details. This GDB was configured as "i386-marcel-freebsd"... > > Core was generated by `pkg_delete'. > > Program terminated with signal 11, Segmentation fault. > > Reading symbols from /lib/libmd.so.4...done. > > Loaded symbols for /lib/libmd.so.4 > > Reading symbols from /lib/libc.so.7...done. > > Loaded symbols for /lib/libc.so.7 > > Reading symbols from /libexec/ld-elf.so.1...done. > > Loaded symbols for /libexec/ld-elf.so.1 > > #0 0x2815dae6 in strcmp () from /lib/libc.so.7 > > (gdb) bt > > #0 0x2815dae6 in strcmp () from /lib/libc.so.7 > > #1 0x0804b50c in isinstalledpkg (name=0x0) > > at /usr/src/usr.sbin/pkg_install/lib/match.c:374 > > There's the culprit. strcmp called on a null pointer. The reason is that > the +CONTENTS file contains corrupted data. Most likely a @pkgdep line > without a package name. Could you show the output of: > grep @pkgdep /var/db/pkg/acroread8-8.1.2_2/+CONTENTS Actually, considering it comes from undepend, could you also include: cat /var/db/pkg/acroread8-8.1.2_2/+REQUIRED_BY -- Mel Problem with today's modular software: they start with the modules and never get to the software part. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: pkg_delete core dump
On Monday 17 November 2008 22:15:32 Tsu-Fan Cheng wrote: > Hi Mel, >thank you for your help, now I recompile pkg_install and run > pkg_delete again, under print/acroread8 it still coredump. here is the > result: > > # gdb pkg_delete pkg_delete.core > GNU gdb 6.1.1 [FreeBSD] > Copyright 2004 Free Software Foundation, Inc. > GDB is free software, covered by the GNU General Public License, and you > are welcome to change it and/or distribute copies of it under certain > conditions. Type "show copying" to see the conditions. > There is absolutely no warranty for GDB. Type "show warranty" for details. > This GDB was configured as "i386-marcel-freebsd"... > Core was generated by `pkg_delete'. > Program terminated with signal 11, Segmentation fault. > Reading symbols from /lib/libmd.so.4...done. > Loaded symbols for /lib/libmd.so.4 > Reading symbols from /lib/libc.so.7...done. > Loaded symbols for /lib/libc.so.7 > Reading symbols from /libexec/ld-elf.so.1...done. > Loaded symbols for /libexec/ld-elf.so.1 > #0 0x2815dae6 in strcmp () from /lib/libc.so.7 > (gdb) bt > #0 0x2815dae6 in strcmp () from /lib/libc.so.7 > #1 0x0804b50c in isinstalledpkg (name=0x0) > at /usr/src/usr.sbin/pkg_install/lib/match.c:374 There's the culprit. strcmp called on a null pointer. The reason is that the +CONTENTS file contains corrupted data. Most likely a @pkgdep line without a package name. Could you show the output of: grep @pkgdep /var/db/pkg/acroread8-8.1.2_2/+CONTENTS -- Mel Problem with today's modular software: they start with the modules and never get to the software part. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: pkg_delete core dump
Hi Mel, thank you for your help, now I recompile pkg_install and run pkg_delete again, under print/acroread8 it still coredump. here is the result: # gdb pkg_delete pkg_delete.core GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-marcel-freebsd"... Core was generated by `pkg_delete'. Program terminated with signal 11, Segmentation fault. Reading symbols from /lib/libmd.so.4...done. Loaded symbols for /lib/libmd.so.4 Reading symbols from /lib/libc.so.7...done. Loaded symbols for /lib/libc.so.7 Reading symbols from /libexec/ld-elf.so.1...done. Loaded symbols for /libexec/ld-elf.so.1 #0 0x2815dae6 in strcmp () from /lib/libc.so.7 (gdb) bt #0 0x2815dae6 in strcmp () from /lib/libc.so.7 #1 0x0804b50c in isinstalledpkg (name=0x0) at /usr/src/usr.sbin/pkg_install/lib/match.c:374 #2 0x0804adc5 in requiredby (pkgname=0x0, list=0xbfbfe1a8, strict=0, filter=0) at /usr/src/usr.sbin/pkg_install/lib/deps.c:202 #3 0x08049c14 in undepend (p=0x0, pkgname=0x810b180 "acroread8-8.1.2_2") at /usr/src/usr.sbin/pkg_install/delete/perform.c:385 #4 0x0804a769 in pkg_do (pkg=0x810b180 "acroread8-8.1.2_2") at /usr/src/usr.sbin/pkg_install/delete/perform.c:286 #5 0x0804a981 in pkg_perform (pkgs=0x810c060) at /usr/src/usr.sbin/pkg_install/delete/perform.c:112 #6 0x08049b2a in real_main (argc=3, argv=0xbfbfeb60) at /usr/src/usr.sbin/pkg_install/delete/main.c:163 #7 0x0804ab58 in main (argc=3, argv=0xbfbfeb60) at /usr/src/usr.sbin/pkg_install/lib/pkgwrap.c:88 (gdb) bt full #0 0x2815dae6 in strcmp () from /lib/libc.so.7 No symbol table info available. #1 0x0804b50c in isinstalledpkg (name=0x0) at /usr/src/usr.sbin/pkg_install/lib/match.c:374 result = Variable "result" is not available. (gdb) up #1 0x0804b50c in isinstalledpkg (name=0x0) at /usr/src/usr.sbin/pkg_install/lib/match.c:374 374 if (strcmp(memo->iip_name, name) == 0) (gdb) should I do a full buildworld/installworld? TFC On Mon, Nov 17, 2008 at 2:36 PM, Mel <[EMAIL PROTECTED]> wrote: > On Monday 17 November 2008 20:15:46 Tsu-Fan Cheng wrote: >> hi, >> during recompiling some ports, I found my pkg_delete core dump on >> some ports (not all of them), when it dumped, it has something like >> this (print/acroread8): >> >> # gdb pkg_delete pkg_delete.core >> GNU gdb 6.1.1 [FreeBSD] >> Copyright 2004 Free Software Foundation, Inc. >> GDB is free software, covered by the GNU General Public License, and you >> are welcome to change it and/or distribute copies of it under certain >> conditions. Type "show copying" to see the conditions. >> There is absolutely no warranty for GDB. Type "show warranty" for details. >> This GDB was configured as "i386-marcel-freebsd"...(no debugging >> symbols found)... >> Core was generated by `pkg_delete'. >> Program terminated with signal 11, Segmentation fault. >> Reading symbols from /lib/libmd.so.4...(no debugging symbols found)...done. >> Loaded symbols for /lib/libmd.so.4 >> Reading symbols from /lib/libc.so.7...(no debugging symbols found)...done. >> Loaded symbols for /lib/libc.so.7 >> Reading symbols from /libexec/ld-elf.so.1...(no debugging symbols >> found)...done. Loaded symbols for /libexec/ld-elf.so.1 >> #0 0x2815dae6 in strcmp () from /lib/libc.so.7 >> (gdb) bt full >> #0 0x2815dae6 in strcmp () from /lib/libc.so.7 >> No symbol table info available. >> #1 0x0804b50c in ?? () >> No symbol table info available. > > > > You will have to recompile pkg_delete with debug symbols to get any idea. To > do so, do the following (providing you have sources in /usr/src): > cd /usr/src/usr.sbin/pkg_install > make clean > make obj > make DEBUG_FLAGS='-ggdb' depend > make DEBUG_FLAGS='-ggdb' all install > > If this gives errors, it's best to do a full buildworld/installworld. > -- > Mel > > Problem with today's modular software: they start with the modules >and never get to the software part. > ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: pkg_delete core dump
On Monday 17 November 2008 20:15:46 Tsu-Fan Cheng wrote: > hi, > during recompiling some ports, I found my pkg_delete core dump on > some ports (not all of them), when it dumped, it has something like > this (print/acroread8): > > # gdb pkg_delete pkg_delete.core > GNU gdb 6.1.1 [FreeBSD] > Copyright 2004 Free Software Foundation, Inc. > GDB is free software, covered by the GNU General Public License, and you > are welcome to change it and/or distribute copies of it under certain > conditions. Type "show copying" to see the conditions. > There is absolutely no warranty for GDB. Type "show warranty" for details. > This GDB was configured as "i386-marcel-freebsd"...(no debugging > symbols found)... > Core was generated by `pkg_delete'. > Program terminated with signal 11, Segmentation fault. > Reading symbols from /lib/libmd.so.4...(no debugging symbols found)...done. > Loaded symbols for /lib/libmd.so.4 > Reading symbols from /lib/libc.so.7...(no debugging symbols found)...done. > Loaded symbols for /lib/libc.so.7 > Reading symbols from /libexec/ld-elf.so.1...(no debugging symbols > found)...done. Loaded symbols for /libexec/ld-elf.so.1 > #0 0x2815dae6 in strcmp () from /lib/libc.so.7 > (gdb) bt full > #0 0x2815dae6 in strcmp () from /lib/libc.so.7 > No symbol table info available. > #1 0x0804b50c in ?? () > No symbol table info available. You will have to recompile pkg_delete with debug symbols to get any idea. To do so, do the following (providing you have sources in /usr/src): cd /usr/src/usr.sbin/pkg_install make clean make obj make DEBUG_FLAGS='-ggdb' depend make DEBUG_FLAGS='-ggdb' all install If this gives errors, it's best to do a full buildworld/installworld. -- Mel Problem with today's modular software: they start with the modules and never get to the software part. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
pkg_delete core dump
hi, during recompiling some ports, I found my pkg_delete core dump on some ports (not all of them), when it dumped, it has something like this (print/acroread8): # gdb pkg_delete pkg_delete.core GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-marcel-freebsd"...(no debugging symbols found)... Core was generated by `pkg_delete'. Program terminated with signal 11, Segmentation fault. Reading symbols from /lib/libmd.so.4...(no debugging symbols found)...done. Loaded symbols for /lib/libmd.so.4 Reading symbols from /lib/libc.so.7...(no debugging symbols found)...done. Loaded symbols for /lib/libc.so.7 Reading symbols from /libexec/ld-elf.so.1...(no debugging symbols found)...done. Loaded symbols for /libexec/ld-elf.so.1 #0 0x2815dae6 in strcmp () from /lib/libc.so.7 (gdb) bt full #0 0x2815dae6 in strcmp () from /lib/libc.so.7 No symbol table info available. #1 0x0804b50c in ?? () No symbol table info available. #2 0x0810b1a0 in ?? () No symbol table info available. #3 0x in ?? () No symbol table info available. #4 0x in ?? () No symbol table info available. #5 0x in ?? () No symbol table info available. #6 0x in ?? () No symbol table info available. #7 0x in ?? () No symbol table info available. #8 0x in ?? () No symbol table info available. #9 0x in ?? () No symbol table info available. #10 0x in ?? () No symbol table info available. #11 0x0810b180 in ?? () ---Type to continue, or q to quit--- No symbol table info available. #12 0xbfbfd968 in ?? () No symbol table info available. #13 0x0804adc5 in ?? () No symbol table info available. #14 0x in ?? () No symbol table info available. #15 0x000c in ?? () No symbol table info available. #16 0x03e1 in ?? () No symbol table info available. #17 0x28174af5 in fwrite () from /lib/libc.so.7 No symbol table info available. Previous frame inner to this frame (corrupt stack?) (gdb) any idea?? thanks!! TFC ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"