From: JMS (jmsimon@acsu.buffalo.edu)
Date: 08/20/92


From: jmsimon@acsu.buffalo.edu (JMS)
Subject: Re: BUG: crashing program kills file system
Date: 20 Aug 1992 12:33:03 GMT

mj@dfv.rwth-aachen.de (Martin Junius) writes:
=============================================
>The following bug I ran across while trying to uncompress/tar a
>.tar.Z file directly from floppy disk:
>
>uncompress died with a core dump, obviously it didn't like the
>garbage right after the last byte of the .tar.Z file (can be
>reproduced with 2.2.2dmisc.tar.Z from the GCC distribution and
>RAWRITE). This can be solved by dd'ing the files to floppy disk
>with `conv=sync', but that's not the problem.
>
>The problem is that uncompress while writing to disk and core
>dumping corrupts the file system!!! Looks like the kernel
>does some strange things to the buffers while dumping core, so
>that the currently written files are not written to disk, but
>blocks for them are marked used, or something like that. After
>some more disk activity your file system will be ready for a new
>install.
>
>Maybe someone should take a deep look in the core dump code ...
>
>One way to prevent the file system from getting corrupted is
>_immediately_ after the crash deleting this extracted files and
>then calling "fsck -r", which will be able to restore the file
>system.

I've dumped core many a time, and haven't had any filesystem trouble
yet (I think! Oh no, not a Maxtor-Meltdown!)

Seriously, no trouble here. I did have some difficulty with 0.96c if
my filesystem was mostly full and core dumped - nothing a fsck wouldn't
fix, tho. Could it have something to do with compress specifically? I
have noticed that compress can't handle a file with garbage at the end.

Recommendation: tar your files, compress the tar, then *re-tar* the .tar.Z
                file - this will solve core problems with compress! If it
                don't dump core, it probably won't corrupt you

>Martin
>--
> _____ _____
>| |___ | Martin Junius FIDO: 2:242/6.1
>| | | | | | Communication Networks Internet: mj@dfv.rwth-aachen.de
>|_|_|_|@work| Aachen U of Technology Phone: ++49-241-8790220 (voice)

JMS

-- 
*******************************************************************************
 Jeffrey M. Simon              .o   o.       Computer Science / Business Mgmt.
 jmsimon@acsu.buffalo.edu       ~~v~~        State University of NY at Buffalo
***** "Perspiration = ( Genius - 1% Inspiration ) / .99" -Ein*kinda*stein *****