NetBSD Problem Report #42132

From www@NetBSD.org  Sun Sep 27 14:20:35 2009
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id 65FD363BBD8
	for <gnats-bugs@gnats.netbsd.org>; Sun, 27 Sep 2009 14:20:35 +0000 (UTC)
Message-Id: <20090927142035.34D2A63B850@www.NetBSD.org>
Date: Sun, 27 Sep 2009 14:20:35 +0000 (UTC)
From: ekamperi@gmail.com
Reply-To: ekamperi@gmail.com
To: gnats-bugs@NetBSD.org
Subject: pkg_add can't install packages in 5.0
X-Send-Pr-Version: www-1.0

>Number:         42132
>Category:       pkg
>Synopsis:       pkg_add can't install packages in 5.0
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          doc-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Sep 27 14:25:00 +0000 2009
>Closed-Date:    
>Last-Modified:  Sat Jul 10 23:35:00 +0000 2021
>Originator:     Stathis Kamperis
>Release:        5.0.1
>Organization:
>Environment:
NetBSD 5.0.1 NetBSD 5.0.1 (GENERIC) #0: Thu Jul 30 01:039:11 UTC 2009 builds@b8lds/ab/netbsd-5-0-1-RELEASE/src/sys/arch/i386/compile/GENERIC i386
>Description:
After a clean install, I set the PKG_PATH (by uncommenting the respective
line in root's .profile) and try to pkg_add some package, e.g., emacs-
nox11.

Then, pkg_add fails with tons of error of the form:
pkg_add: Couldn't remove /usr/pkg/foo/bar/XXX file

The thing is that these files don't even exist!

It's not specific to emacs package. Other packages fail as well, e.g., scmgit-base.


I'm running 5.0.1/i386 and using this as PKG_PATH:
ftp://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/i386/5.0/All


See also this thread:

http://mail-index.netbsd.org/pkgsrc-users/2009/09/23/msg010788.html

>How-To-Repeat:

>Fix:
Pass -f to pkg_add installs many of the failed packages.

>Release-Note:

>Audit-Trail:
From: Joerg Sonnenberger <joerg@britannica.bec.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/42132: pkg_add can't install packages in 5.0
Date: Wed, 30 Sep 2009 22:01:15 +0200

 On Sun, Sep 27, 2009 at 02:25:00PM +0000, ekamperi@gmail.com wrote:
 > Then, pkg_add fails with tons of error of the form:
 > pkg_add: Couldn't remove /usr/pkg/foo/bar/XXX file

 Are you sure that is the first error message from pkg_add?

 Joerg

Responsible-Changed-From-To: pkg-manager->joerg
Responsible-Changed-By: obache@NetBSD.org
Responsible-Changed-When: Fri, 16 Oct 2009 03:06:52 +0000
Responsible-Changed-Why:
Over to maintainer.


State-Changed-From-To: open->feedback
State-Changed-By: joerg@NetBSD.org
State-Changed-When: Thu, 05 Nov 2009 16:50:25 +0000
State-Changed-Why:
A question was asked. Some changes for the network setup also apply for this.


From: Stathis Kamperis <ekamperi@gmail.com>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/42132
Date: Fri, 6 Nov 2009 22:20:35 +0200

 Salute!
 Sorry for taking so long. To be honest, I don't remember. I gave up,
 checked out a copy pkgsrc and built the packages on my own.

 FWIW, I have heard at least 2 people in #netbsd @ freenode
 encountering the same exact problem (with different packages though).


 Best regards,
 Stathis

State-Changed-From-To: feedback->open
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sun, 07 Mar 2010 06:50:24 +0000
State-Changed-Why:
Someone's going to have to try to reproduce this by doing a clean install in
a VM.


State-Changed-From-To: open->feedback
State-Changed-By: joerg@NetBSD.org
State-Changed-When: Tue, 20 Apr 2010 01:06:01 +0000
State-Changed-Why:
Please try with pkg_install-20100420 (from pkgsrc current).


From: Stathis Kamperis <ekamperi@gmail.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/42132
Date: Sun, 25 Jul 2010 00:05:00 +0300

 I still suffer from this bug. I did a fresh install of 5.1RC3,
 uncommented PKG_PATH in /root/.profile, did a pkg_add -v openbox.
 pkg_add terminated with "couldn't remove /usr/pkg/foo/bar file".

 Does anyone care to reproduce it ? I'm kinda irritated by this.

 Thanks,
 Stathis

From: Joerg Sonnenberger <joerg@britannica.bec.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/42132
Date: Sun, 25 Jul 2010 17:10:20 +0200

 On Sat, Jul 24, 2010 at 09:10:06PM +0000, Stathis Kamperis wrote:
 >  I still suffer from this bug. I did a fresh install of 5.1RC3,
 >  uncommented PKG_PATH in /root/.profile, did a pkg_add -v openbox.
 >  pkg_add terminated with "couldn't remove /usr/pkg/foo/bar file".
 >  
 >  Does anyone care to reproduce it ? I'm kinda irritated by this.

 The same question as last time remains.

 "Does it work with the pkg_install version from pkgsrc?"

 Joerg

From: Stathis Kamperis <ekamperi@gmail.com>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/42132
Date: Sun, 25 Jul 2010 18:33:30 +0300

 2010/7/25 Joerg Sonnenberger <joerg@britannica.bec.de>:

 > =A0The same question as last time remains.
 >
 > =A0"Does it work with the pkg_install version from pkgsrc?"

 I haven't tried, which is why I didn't mention it.
 I will try it, when I find time, but no sooner than 20 August.


 Stathis

State-Changed-From-To: feedback->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Wed, 10 Aug 2011 18:44:54 +0000
State-Changed-Why:
1-year feedback timeout. If this problem still occurs, please write back
when/if you see it again.


State-Changed-From-To: closed->open
State-Changed-By: hauke@NetBSD.org
State-Changed-When: Wed, 15 Jan 2020 18:44:38 +0000
State-Changed-Why:
The bug is well and alive.

I see it on two Mac OS X 10.4 powerpc pkgsrc installations:
On a powerbook G4 I bootstrapped from scratch (xcode 2.5), on a 
mac mini G4 I updated an installation I had set up 1.5 a ago.

Both times I can install smaller packages, but behemoths like 
perl5 or ncurses will fail.


Responsible-Changed-From-To: joerg->pkg-manager
Responsible-Changed-By: joerg@NetBSD.org
Responsible-Changed-When: Wed, 15 Jan 2020 20:45:09 +0000
Responsible-Changed-Why:
No longer maintainer, not interested in necrobugs with little information and
on completely different ancient platforms. Haven't seen anything like this in
a long time and most inclined to just assume compiler bugs.


From: Hauke Fath <hf@spg.tu-darmstadt.de>
To: gnats-bugs@NetBSD.org, pkg-manager@NetBSD.org,
        Hauke Fath <hf@spg.tu-darmstadt.de>, gnats-admin@NetBSD.org
Cc: 
Subject: Re: pkg/42132 (pkg_add can't install packages in 5.0)
Date: Thu, 16 Jan 2020 14:56:40 +0100

 On 2020-01-15 21:45, joerg@NetBSD.org wrote:
 > Haven't seen anything like this in
 > a long time and most inclined to just assume compiler bugs.

 gcc versions are 4.0.1 (darwin 8.11.0) vs. 4.1.3 (submitter's netbsd-5).

 As a first data point, downgrading pkgtools/pkg_install from 20191008 to 
 20180425 lets me install both lang/perl5 and devel/ncurses without any 
 issues.

 Cheerio,
 hauke

 -- 
       The ASCII Ribbon Campaign                    Hauke Fath
 ()     No HTML/RTF in email	        Institut für Nachrichtentechnik
 /\     No Word docs in email                     TU Darmstadt
       Respect for open standards              Ruf +49-6151-16-21344

From: Hauke Fath <hf@spg.tu-darmstadt.de>
To: gnats-bugs@NetBSD.org, pkg-manager@NetBSD.org, gnats-admin@NetBSD.org
Cc: 
Subject: Re: pkg/42132 (pkg_add can't install packages in 5.0)
Date: Thu, 16 Jan 2020 17:04:11 +0100

 On 2020-01-16 14:56, Hauke Fath wrote:
 > As a first data point, downgrading pkgtools/pkg_install from 20191008 to 
 > 20180425 lets me install both lang/perl5 and devel/ncurses without any 
 > issues.

 ... this is with 20180425 as built 20 months ago.

 OTOH, 20180425 built on the current system exhibits the exact same 
 problem as 20191008, which would indicate it is not the pkg_install 
 sources but the build environment.

From: Hauke Fath <hf@spg.tu-darmstadt.de>
To: gnats-bugs@NetBSD.org
Cc: pkg-manager@NetBSD.org, gnats-admin@NetBSD.org,
        Hauke Fath <hf@spg.tu-darmstadt.de>
Subject: Re: pkg/42132 (pkg_add can't install packages in 5.0)
Date: Fri, 17 Jan 2020 11:07:29 +0100

 Installing perl fails with

 pkg_add: Failed to write bin/perl5.30.0 for perl-5.30.0nb1: Could not 
 open bin/perl
 pkg_add: Couldn't remove /opt/local/bin/perl5.30.0
 pkg_add: Couldn't remove /opt/local/lib/perl5/5.30.0/AnyDBM_File.pm
 pkg_add: Couldn't remove /opt/local/lib/perl5/5.30.0/App/Cpan.pm
 [...]
 pkg_add: Couldn't remove /opt/local/lib/perl5/man/man3/warnings::register.3
 pkg_add: 1 package addition failed

 i.e. unpacking the archive fails to hard-link perl5.30.0 tp perl, and 
 pkg_add proceeds to roll back the installation.

 A "ktrace -di pkg_add /var/obj/pkgsrc/packages/All/perl-5.30.0nb1.tgz" gives

 [...]
   16590 pkg_add  CALL  umask(0)
   16590 pkg_add  RET   umask 18/0x12
   16590 pkg_add  CALL  umask(0x12)
   16590 pkg_add  RET   umask 0
   16590 pkg_add  CALL  unlink(0x37ec40)
   16590 pkg_add  NAMI  "bin/perl5.30.0"
   16590 pkg_add  RET   unlink -1 errno 2 No such file or directory
   16590 pkg_add  CALL  open(0xffffff9c,0x7b8d0,0x100000)
   16590 pkg_add  RET   open -1 errno 14 Bad address
   16590 pkg_add  CALL  write(0x2,0xbfffe950,0x9)
   16590 pkg_add  GIO   fd 2 wrote 9 bytes
         "pkg_add: "
   16590 pkg_add  RET   write 9
   16590 pkg_add  CALL  write(0x2,0xbfffe9b0,0x4a)
   16590 pkg_add  GIO   fd 2 wrote 74 bytes
         "Failed to write bin/perl5.30.0 for perl-5.30.0nb1: Could not 
 open bin/perl"
   16590 pkg_add  RET   write 74/0x4a
 [...]

 where EFAULT (14) seems to be one of the more obscure unix error codes...

From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/42132 (pkg_add can't install packages in 5.0)
Date: Sat, 10 Jul 2021 23:32:43 +0000

 On Fri, Jan 17, 2020 at 10:10:01AM +0000, Hauke Fath wrote:
  >    16590 pkg_add  CALL  open(0xffffff9c,0x7b8d0,0x100000)
  >    16590 pkg_add  RET   open -1 errno 14 Bad address

 EFAULT is what you get instead of SIGSEGV if you pass a bad pointer to
 a system call.

 It is unlikely that 0xffffff9c is a valid pointer, no matter what
 platform you're on, so if you can figure out where that came from
 we'll be a lot further ahead.

 -- 
 David A. Holland
 dholland@netbsd.org

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.