Subject: re: pkg/19436: interrupting pkg_add may corrupt filesystem
To: Manuel Bouyer <bouyer@antioche.eu.org>
From: matthew green <mrg@eterna.com.au>
List: netbsd-bugs
Date: 12/19/2002 11:18:13
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.