NetBSD Problem Report #19436
Received: (qmail 11876 invoked by uid 605); 18 Dec 2002 09:18:41 -0000
Message-Id: <200212180917.gBI9Hjt12750@dhcppc2>
Date: Wed, 18 Dec 2002 04:17:45 -0500 (EST)
From: Matt Wong <mew20@columbia.edu>
Sender: gnats-bugs-owner@netbsd.org
Reply-To: mew20@columbia.edu
To: gnats-bugs@gnats.netbsd.org
Subject: interrupting pkg_add may corrupt filesystem
X-Send-Pr-Version: 3.95
>Number: 19436
>Category: pkg
>Synopsis: interrupting pkg_add may corrupt filesystem
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Dec 18 09:19:00 +0000 2002
>Closed-Date: Sat Mar 15 20:56:04 +0000 2003
>Last-Modified: Sun Mar 16 19:45:02 +0000 2003
>Originator: Matt Wong
>Release: NetBSD 1.6 (GENERIC_LAPTOP) Sep 8 19:55:58 UTC 2002
>Organization:
>Environment:
System: NetBSD dhcppc2 1.6 NetBSD 1.6 (GENERIC_LAPTOP) #0: Sun Sep 8 19:55:58 UTC 2002 autobuild@tgm.daemon.org:/autobuild/i386/OBJ/autobuild/src/sys/arch/i386/compile/GENERIC_LAPTOP i386
Architecture: i386
Machine: i386
>Description:
while in xterm, I executed pkg_add to install KDE, without bothering to check if dependencies had already been installed. After a few minutes, I interrupted pkg_add (control C) as it tried to install dependencies. I had to hit Ctrl-C several times to get out of pkg_add. When I did get out of it, pkg_add no longer worked; I got "exec format error" whenever I tried to run it (note that nothing other than a vanilla system was running in the background, and I did no actoins other than the three here (pkg_add, interrupt, try pkg_add again). when I rebooted, exec format error came up a number of times on the console as the machine tried to boot (I don't remember what commands were triggering them, but they were many and distinct), and the system would not reboot.
As there seemed to be many corrupt files, and I could only know if they were corrupt by running them, I just reinstalled. but it certainly took a toll on my confidence a bit in the stability of netBSD's filesystem.
>How-To-Repeat:
unfortunately I did not attempt to repeat because the consequences were so serious
>Fix:
>Release-Note:
>Audit-Trail:
From: Manuel Bouyer <bouyer@antioche.eu.org>
To: Charlie Root <root@dhcppc2.netbsd.org>
Cc: gnats-bugs@gnats.netbsd.org, netbsd-bugs@netbsd.org
Subject: Re: pkg/19436: interrupting pkg_add may corrupt filesystem
Date: Wed, 18 Dec 2002 21:55:08 +0100
On Wed, Dec 18, 2002 at 04:17:45AM -0500, Charlie Root wrote:
>
> >Number: 19436
> >Category: pkg
> >Synopsis: interrupting pkg_add may corrupt filesystem
> >Confidential: no
> >Severity: serious
> >Priority: medium
> >Responsible: pkg-manager
> >State: open
> >Class: sw-bug
> >Submitter-Id: net
> >Arrival-Date: Wed Dec 18 01:19:00 PST 2002
> >Closed-Date:
> >Last-Modified:
> >Originator: Charlie Root
> >Release: NetBSD 1.6 (GENERIC_LAPTOP) Sep 8 19:55:58 UTC 2002
> >Organization:
>
> >Environment:
>
>
> System: NetBSD dhcppc2 1.6 NetBSD 1.6 (GENERIC_LAPTOP) #0: Sun Sep 8 19:55:58 UTC 2002 autobuild@tgm.daemon.org:/autobuild/i386/OBJ/autobuild/src/sys/arch/i386/compile/GENERIC_LAPTOP i386
> Architecture: i386
> Machine: i386
> >Description:
> while in xterm, I executed pkg_add to install KDE, without bothering to check if dependencies had already been installed. After a few minutes, I interrupted pkg_add (control C) as it tried to install dependencies. I had to hit Ctrl-C several times to get out of pkg_add. When I did get out of it, pkg_add no longer worked; I got "exec format error" whenever I tried to run it (note that nothing other than a vanilla system was running in the background, and I did no actoins other than the three here (pkg_add , interrupt, try pkg_add again). when I rebooted, exec format error came up a number of times on the console as the machine tried to boot (I don't remember what commands were triggering them, but they were many and distinct), and the system would not reboot.
>
> As there seemed to be many corrupt files, and I could only know if they were corrupt by running them, I just reinstalled. but it certainly took a toll on my confidence a bit in the stability of netBSD's filesystem.
Well, this looks more like a hardware bug of some sort, triggered by the
high disk activity and memory usage that pkg_add can create in such situations.
I interrupted pkg_add dozen of times, without problems. And pkg_add is only
a wrapper around tar/pax, so any heavy tar usage would probably reproduce
this problem, and would have already been seen.
--
Manuel Bouyer <bouyer@antioche.eu.org>
NetBSD: 23 ans d'experience feront toujours la difference
--
From: matthew green <mrg@eterna.com.au>
To: Manuel Bouyer <bouyer@antioche.eu.org>
Cc: gnats-bugs@gnats.netbsd.org, netbsd-bugs@netbsd.org,
Charlie Root <root@dhcppc2.netbsd.org>
Subject: re: pkg/19436: interrupting pkg_add may corrupt filesystem
Date: Thu, 19 Dec 2002 11:18:13 +1100
On Wed, Dec 18, 2002 at 04:17:45AM -0500, Charlie Root wrote:
>
> >Number: 19436
> >Category: pkg
> >Synopsis: interrupting pkg_add may corrupt filesystem
> >Confidential: no
> >Severity: serious
> >Priority: medium
> >Responsible: pkg-manager
> >State: open
> >Class: sw-bug
> >Submitter-Id: net
> >Arrival-Date: Wed Dec 18 01:19:00 PST 2002
> >Closed-Date:
> >Last-Modified:
> >Originator: Charlie Root
> >Release: NetBSD 1.6 (GENERIC_LAPTOP) Sep 8 19:55:58 UTC 2002
> >Organization:
>
> >Environment:
>
>
> System: NetBSD dhcppc2 1.6 NetBSD 1.6 (GENERIC_LAPTOP) #0: Sun Sep 8 19:55:58 UTC 2002 autobuild@tgm.daemon.org:/autobuild/i386/OBJ/autobuild/src/sys/arch/i386/com
pile/GENERIC_LAPTOP i386
> Architecture: i386
> Machine: i386
> >Description:
> while in xterm, I executed pkg_add to install KDE, without bothering to check if dependencies had already been installed. After a few minutes, I interrupted pkg_ad
d (control C) as it tried to install dependencies. I had to hit Ctrl-C several times to get out of pkg_add. When I did get out of it, pkg_add no longer worked; I got "e
xec format error" whenever I tried to run it (note that nothing other than a vanilla system was running in the background, and I did no actoins other than the three her
e (pkg_add, interrupt, try pkg_add again). when I rebooted, exec format error came up a number of times on the console as the machine tried to boot (I don't remember wh
at commands were triggering them, but they were many and distinct), and the system would not reboot.
>
> As there seemed to be many corrupt files, and I could only know if they were corrupt by running them, I just reinstalled. but it certainly took a toll on my confid
ence a bit in the stability of netBSD's filesystem.
Well, this looks more like a hardware bug of some sort, triggered by the
high disk activity and memory usage that pkg_add can create in such situations.
I interrupted pkg_add dozen of times, without problems. And pkg_add is only
a wrapper around tar/pax, so any heavy tar usage would probably reproduce
this problem, and would have already been seen.
this sounds like the "pkg_add" breaks when it tries to clean up the
"pen" it creates and instead runs "rm -rf /". i suspect that the
exec format errors are caused by missing ld.elf_so.
.mrg.
From: Manuel Bouyer <bouyer@antioche.eu.org>
To: matthew green <mrg@eterna.com.au>
Cc: gnats-bugs@gnats.netbsd.org, netbsd-bugs@netbsd.org, mew20@columbia.edu
Subject: Re: pkg/19436: interrupting pkg_add may corrupt filesystem
Date: Thu, 19 Dec 2002 21:54:20 +0100
On Thu, Dec 19, 2002 at 11:18:13AM +1100, matthew green wrote:
> this sounds like the "pkg_add" breaks when it tries to clean up the
> "pen" it creates and instead runs "rm -rf /". i suspect that the
> exec format errors are caused by missing ld.elf_so.
Hum, I guess I've been luky :)
The error returned for missing ld.elf_so should probably be something
else than "exec format error". This would help diagnose cases like that.
--
Manuel Bouyer <bouyer@antioche.eu.org>
NetBSD: 23 ans d'experience feront toujours la difference
--
From: Hubert Feyrer <hubert.feyrer@informatik.fh-regensburg.de>
To: Manuel Bouyer <bouyer@antioche.eu.org>
Cc: matthew green <mrg@eterna.com.au>, "" <gnats-bugs@gnats.netbsd.org>,
"" <netbsd-bugs@netbsd.org>, "" <mew20@columbia.edu>
Subject: Re: pkg/19436: interrupting pkg_add may corrupt filesystem
Date: Thu, 26 Dec 2002 13:29:11 +0100 (MET)
On Thu, 19 Dec 2002, Manuel Bouyer wrote:
> > this sounds like the "pkg_add" breaks when it tries to clean up the
> > "pen" it creates and instead runs "rm -rf /". i suspect that the
> > exec format errors are caused by missing ld.elf_so.
>
> Hum, I guess I've been luky :)
Um, that was a problem long ago, and a lot of care has been taken to fix
that. I'll have a look at this early next year. (unless someone beats me
to it earlier ;)
- Hubert (packing for 19c3 now)
--
Want to get a clue on IPv6 but don't know where to start? Try this:
* Basics -> http://www.onlamp.com/pub/a/onlamp/2001/05/24/ipv6_tutorial.html
* Setup -> http://www.onlamp.com/pub/a/onlamp/2001/06/01/ipv6_tutorial.html
Of course with your #1 IPv6 ready operating system -> http://www.NetBSD.org/
State-Changed-From-To: open->closed
State-Changed-By: hubertf
State-Changed-When: Sat Mar 15 12:46:38 PST 2003
State-Changed-Why:
I have identified one more pkace in pkg_* that might
end up in the problem described, and I've fixed it.
Please make sure you have src/usr.sbin/pkg_install/lib/pen.c
rev. 1.24 or later to test.
I cannot really tell what happened on your system, but some
detailed analysis would definitely be useful.
- Hubert
From: Hubert Feyrer <hubertf@netbsd.org>
To: gnats-bugs@gnats.netbsd.org
Cc:
Subject: pr/19436 CVS commit: src/usr.sbin/pkg_install/lib
Date: Sat, 15 Mar 2003 22:54:27 +0200 (EET)
Module Name: src
Committed By: hubertf
Date: Sat Mar 15 20:54:26 UTC 2003
Modified Files:
src/usr.sbin/pkg_install/lib: pen.c
Log Message:
Catch one more place that could result in Current not being set properly
(and thus in the execution of "rm -fr /") if ^C is pressed at the wrong time.
See also PR 19436.
To generate a diff of this commit:
cvs rdiff -r1.23 -r1.24 src/usr.sbin/pkg_install/lib/pen.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: Jan Schaumann <jschauma@netbsd.org>
To: gnats-bugs@gnats.netbsd.org
Cc:
Subject: pr/19436 CVS commit: othersrc/bootstrap-pkgsrc/pkg_install
Date: Sun, 16 Mar 2003 21:39:56 +0200 (EET)
Module Name: othersrc
Committed By: jschauma
Date: Sun Mar 16 19:39:56 UTC 2003
Modified Files:
othersrc/bootstrap-pkgsrc/pkg_install/admin: main.c
othersrc/bootstrap-pkgsrc/pkg_install/info: perform.c
othersrc/bootstrap-pkgsrc/pkg_install/lib: lib.h.in pen.c pkgdb.c
version.h
Log Message:
Sync with main sources:
Date: Sat Mar 15 20:49:27 UTC 2003
Introduce a pkgdb_dump() function, which dumps the cache file of
(filename, package) pairs.
Modify calling functions to use pkgdb_dump() directly, rather than
sequences of
pkgdb_open
{ pkgdb_iter, pkgdb_retrieve }
pkgdb_close
calls.
Remove the now unnecessary pkgdb_iter function.
Date: Sat Mar 15 20:50:15 UTC 2003
Bump version string for pkgdb_dump changes.
Date: Sat Mar 15 20:54:26 UTC 2003
Catch one more place that could result in Current not being set properly
(and thus in the execution of "rm -fr /") if ^C is pressed at the wrong time.
See also PR 19436.
To generate a diff of this commit:
cvs rdiff -r1.7 -r1.8 othersrc/bootstrap-pkgsrc/pkg_install/admin/main.c
cvs rdiff -r1.6 -r1.7 othersrc/bootstrap-pkgsrc/pkg_install/info/perform.c
cvs rdiff -r1.10 -r1.11 othersrc/bootstrap-pkgsrc/pkg_install/lib/lib.h.in
cvs rdiff -r1.7 -r1.8 othersrc/bootstrap-pkgsrc/pkg_install/lib/pen.c
cvs rdiff -r1.8 -r1.9 othersrc/bootstrap-pkgsrc/pkg_install/lib/pkgdb.c
cvs rdiff -r1.6 -r1.7 othersrc/bootstrap-pkgsrc/pkg_install/lib/version.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: Jan Schaumann <jschauma@netbsd.org>
To: gnats-bugs@gnats.netbsd.org
Cc:
Subject: pr/19436 CVS commit: pkgsrc/pkgtools/pkg_install/files
Date: Sun, 16 Mar 2003 21:44:11 +0200 (EET)
Module Name: pkgsrc
Committed By: jschauma
Date: Sun Mar 16 19:44:10 UTC 2003
Modified Files:
pkgsrc/pkgtools/pkg_install/files/admin: main.c
pkgsrc/pkgtools/pkg_install/files/info: perform.c
pkgsrc/pkgtools/pkg_install/files/lib: lib.h.in pen.c pkgdb.c version.h
Log Message:
Sync with main sources:
Date: Sat Mar 15 20:49:27 UTC 2003
Introduce a pkgdb_dump() function, which dumps the cache file of
(filename, package) pairs.
Modify calling functions to use pkgdb_dump() directly, rather than
sequences of
pkgdb_open
{ pkgdb_iter, pkgdb_retrieve }
pkgdb_close
calls.
Remove the now unnecessary pkgdb_iter function.
Date: Sat Mar 15 20:50:15 UTC 2003
Bump version string for pkgdb_dump changes.
Date: Sat Mar 15 20:54:26 UTC 2003
Catch one more place that could result in Current not being set properly
(and thus in the execution of "rm -fr /") if ^C is pressed at the wrong time.
See also PR 19436.
To generate a diff of this commit:
cvs rdiff -r1.5 -r1.6 pkgsrc/pkgtools/pkg_install/files/admin/main.c
cvs rdiff -r1.5 -r1.6 pkgsrc/pkgtools/pkg_install/files/info/perform.c
cvs rdiff -r1.3 -r1.4 pkgsrc/pkgtools/pkg_install/files/lib/lib.h.in \
pkgsrc/pkgtools/pkg_install/files/lib/pen.c
cvs rdiff -r1.7 -r1.8 pkgsrc/pkgtools/pkg_install/files/lib/pkgdb.c
cvs rdiff -r1.4 -r1.5 pkgsrc/pkgtools/pkg_install/files/lib/version.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.