NetBSD Problem Report #54291
From gson@gson.org Tue Jun 11 14:59:29 2019
Return-Path: <gson@gson.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 13B267A14B
for <gnats-bugs@gnats.NetBSD.org>; Tue, 11 Jun 2019 14:59:29 +0000 (UTC)
Message-Id: <20190611145923.6BFEA989E0D@guava.gson.org>
Date: Tue, 11 Jun 2019 17:59:23 +0300 (EEST)
From: gson@gson.org (Andreas Gustafsson)
Reply-To: gson@gson.org (Andreas Gustafsson)
To: gnats-bugs@NetBSD.org
Subject: pkg_add segfault
X-Send-Pr-Version: 3.95
>Number: 54291
>Category: bin
>Synopsis: pkg_add segfault
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: bin-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Jun 11 15:00:01 +0000 2019
>Closed-Date: Tue Jan 02 16:05:18 +0000 2024
>Last-Modified: Tue Jan 02 16:05:18 +0000 2024
>Originator: Andreas Gustafsson
>Release: NetBSD-current, source date 2019.06.11.08.34.01
>Organization:
>Environment:
System: NetBSD
Architecture: x86_64
Machine: amd64
>Description:
On a freshly installed -current XEN3_DOM0, running "pkg_add git-base"
with a PKG_PATH of ftp://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/amd64/8.0/All
ended in pkg_add segfaulting:
[...]
git-base-2.21.0: copying /usr/pkg/share/examples/git/templates/hooks/update.sample to /usr/pkg/share/git-core/templates/hooks/update.sample
git-base-2.21.0: copying /usr/pkg/share/examples/git/templates/info/exclude to /usr/pkg/share/git-core/templates/info/exclude
===========================================================================
$NetBSD: MESSAGE,v 1.3 2016/05/26 15:41:06 khorben Exp $
NOTE: Pristine templates are located in:
/usr/pkg/share/examples/git/templates.
To use the git-cvsimport repository conversion from CVS, install git-cvs.
To use the git-svn interface to Subversion, install git-svn.
===========================================================================
[1] Segmentation fault (core dumped) pkg_add git-base
# gdb pkg_add /usr/pkg/pkg_add.core
GNU gdb (GDB) 8.3
[...]
(No debugging symbols found in pkg_add)
[New process 1]
Core was generated by `pkg_add'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007360c5209143 in fetch_cache_put () from /usr/lib/libfetch.so.3
(gdb) where
#0 0x00007360c5209143 in fetch_cache_put () from /usr/lib/libfetch.so.3
#1 0x00007360c52070ba in ?? () from /usr/lib/libfetch.so.3
#2 0x00007360c520a1f9 in fetchIO_close () from /usr/lib/libfetch.so.3
#3 0x0000000058e0d452 in ?? ()
#4 0x00007360c446e88f in ?? () from /usr/lib/libarchive.so.4
#5 0x00007360c446e8d7 in ?? () from /usr/lib/libarchive.so.4
#6 0x00007360c446e951 in ?? () from /usr/lib/libarchive.so.4
#7 0x00007360c446f5a5 in ?? () from /usr/lib/libarchive.so.4
#8 0x0000000058e05fa3 in pkg_do ()
#9 0x0000000058e07114 in pkg_perform ()
#10 0x0000000058e10b59 in main ()
(gdb) x/i $pc
=> 0x7360c5209143 <fetch_cache_put+132>: mov 0x60(%rbx),%rax
(gdb) print /x $rbx
$1 = 0x5a5a5a5a5a5a5a5a
(gdb)
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback
State-Changed-By: riastradh@NetBSD.org
State-Changed-When: Mon, 11 Dec 2023 01:36:39 +0000
State-Changed-Why:
Can you install debug.tgz and get line numbers for the stack trace, and
maybe also frame locals?
PR bin/57179 (https://gnats.netbsd.org/57179) might be a duplicate,
looks like a double-free, perhaps.
From: Andreas Gustafsson <gson@gson.org>
To: gnats-bugs@netbsd.org
Cc: riastradh@NetBSD.org
Subject: Re: bin/54291 (pkg_add segfault)
Date: Mon, 11 Dec 2023 15:40:44 +0200
riastradh@NetBSD.org wrote:
> Can you install debug.tgz and get line numbers for the stack trace, and
> maybe also frame locals?
I no longer have the Xen test setup where the problem originally occurred.
I tried to reproduce it on a freshly installed -current/amd64 system
without Xen, but was unsuccessful.
Specifically, running
export PKG_PATH=ftp://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/amd64/8.0/All
pkg_add git-base
completed successfully. I also ran "pkg_delete git-base; pkg_add
git-base" in a loop for more than 100 iterations, and there were no
crashes.
--
Andreas Gustafsson, gson@gson.org
State-Changed-From-To: feedback->closed
State-Changed-By: gson@NetBSD.org
State-Changed-When: Tue, 02 Jan 2024 16:05:18 +0000
State-Changed-Why:
Cannot reproduce, and possibly fixed by the patches in PR 57179.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2024
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.