pkgsrc-Bugs archive

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

Re: pkg/58433: pkg_add segmentation fault



The following reply was made to PR pkg/58433; it has been noted by GNATS.

From: Taylor R Campbell <riastradh%NetBSD.org@localhost>
To: Bruno Haible <bruno%haible.de@localhost>,
	=?UTF-8?Q?J=C3=B6rg_Sonnenberger?= <joerg%bec.de@localhost>,
	Thomas Klausner <wiz%NetBSD.org@localhost>
Cc: gnats-bugs%NetBSD.org@localhost, pkgsrc-bugs%NetBSD.org@localhost
Subject: Re: pkg/58433: pkg_add segmentation fault
Date: Mon, 2 Dec 2024 20:07:04 +0000

 There are actually two issues here:
 
 1. The failure mode for missing xbase was confusing.
 
    We have now addressed this by checking REQUIRES -- although the
    check is now tripping over other problems because, e.g., the gcc10
    package's REQUIRES entries are broken, PR pkg/58857: gcc10-libs
    REQUIRES libraries so it cannot be added wth new pkg_add.  So we
    might have to revert that, or weaken the check, if we can't fix
    gcc>=3D10 promptly.
 
 2. pkg_add(8) proceeded to crash with SIGSEGV for reasons unrelated to
    the missing shared library.
 
    This turns out to be another instance of PR pkg/57179: occasional
    pkg_add core dumps, which was a bug in libfetch that is now fixed
    and pulled up to netbsd-10 to be included in the imminent 10.1
    release.
 
 Here's the stack trace I got out of a core dump by following the steps
 to reproduce on 10.0 exactly, without `-vvv' which happens to suppress
 the symptoms of (2) but is more helpful for diagnosing (1), confirming
 that (2) matches PR 57179:
 
 $ gdb -batch -ex bt /usr/sbin/pkg_add /usr/pkg/pkg_add.core
 [New process 26694]
 Core was generated by `pkg_add'.
 Program terminated with signal SIGSEGV, Segmentation fault.
 #0  0x000076fbd35824ab in strcmp () from /usr/lib/libc.so.12
 #0  0x000076fbd35824ab in strcmp () from /usr/lib/libc.so.12
 #1  0x000076fbd5a097c0 in fetch_cache_put (conn=3D0x76fbd64bfc00, closecb=
 =3D0x76fbd5a09f97 <fetch_close>) at /usr/src/external/bsd/fetch/dist/libfet=
 ch/common.c:411
 #2  0x000076fbd5a046eb in http_closefn (v=3D0x76fbd5c70bb0) at /usr/src/ext=
 ernal/bsd/fetch/dist/libfetch/http.c:331
 #3  0x000076fbd5a0a99c in fetchIO_close (f=3D0x76fbd64647e0) at /usr/src/ex=
 ternal/bsd/fetch/dist/libfetch/common.c:1032
 #4  0x000000010b00e96b in fetch_archive_close (a=3D<optimized out>, client_=
 data=3D0x76fbd5cc0dc0) at /usr/src/external/bsd/pkg_install/dist/lib/pkg_io=
 .c:138
 #5  0x000076fbd4a7e16b in client_close_proxy (self=3D<optimized out>) at /u=
 sr/src/external/bsd/libarchive/dist/libarchive/archive_read.c:257
 #6  client_close_proxy (self=3D0x76fbd64a5fc0) at /usr/src/external/bsd/lib=
 archive/dist/libarchive/archive_read.c:248
 #7  0x000076fbd4a7e324 in close_filters (a=3D<optimized out>, a=3D<optimize=
 d out>) at /usr/src/external/bsd/libarchive/dist/libarchive/archive_read.c:=
 1009
 #8  0x000076fbd4a7e3af in _archive_read_close (_a=3D0x76fbd64e1a00) at /usr=
 /src/external/bsd/libarchive/dist/libarchive/archive_read.c:1069
 #9  0x000076fbd4a7eedb in _archive_read_free (_a=3D0x76fbd64e1a00) at /usr/=
 src/external/bsd/libarchive/dist/libarchive/archive_read.c:1094
 #10 _archive_read_free (_a=3D0x76fbd64e1a00) at /usr/src/external/bsd/libar=
 chive/dist/libarchive/archive_read.c:1080
 #11 0x000000010b006c7f in pkg_do (pkgpath=3D<optimized out>, mark_automatic=
 =3D0, top_level=3Dtop_level@entry=3D1) at /usr/src/external/bsd/pkg_install=
 /dist/add/perform.c:1602
 #12 0x000000010b008354 in pkg_perform (pkgs=3Dpkgs@entry=3D0x7f7fff570020) =
 at /usr/src/external/bsd/pkg_install/dist/add/perform.c:1617
 #13 0x000000010b0119fd in main (argc=3D<optimized out>, argv=3D<optimized o=
 ut>) at /usr/src/external/bsd/pkg_install/dist/add/main.c:201
 


Home | Main Index | Thread Index | Old Index