home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!dtix!darwin.sura.net!jvnc.net!rutgers!micro-heart-of-gold.mit.edu!uw-beaver!cornell!batcomputer!munnari.oz.au!cs.mu.OZ.AU!danielce
- From: danielce@mullian.ee.mu.OZ.AU (Daniel AMP Carosone)
- Newsgroups: comp.os.linux
- Subject: install/strip corrupts filesystem ?
- Message-ID: <danielce.715575697@munagin>
- Date: 4 Sep 92 03:01:37 GMT
- Sender: news@cs.mu.OZ.AU
- Organization: Computer Science, University of Melbourne, Australia
- Lines: 61
-
- I would have put this down to random wierdness, but after discussions
- on #linux (IRC) it seems I'm not the only one experiencing this.
-
-
- A couple of days ago, I recompiled gdb 4.6 from scratch. When it was
- done, make install used /usr/bin/install (which I assume came from the
- binutils package from gcc 2.2.2d) to copy the executable to
- /usr/local/bin/gdb. I mv'ed it to /usr/bin, and stripped it.
-
- Gdb seemed to work fine, at least for the minimal use I gave it over
- the last day or so.
-
- The filesystem saw some more use, a few more files written, deleted, etc.
-
- Next reboot, fsck -a /dev/hda2 (the /usr partition) spewed out
- hundreds of lines like:
-
- Block has been used before. Now in file `/bin/gdb'
-
- followed by a largish number of similar lines for other files in the
- filesystem.
-
- Repeated applications of `fsck -a /dev/hda2' reported `File system has
- been changed' but didn't seem to clear up the problem.
-
- It looked to me like two files seemed to be claiming to own the same
- block. A very quick check showed that gdb still loaded and read the
- symbols from a file (ie, wasn't obviously corrupted, but with a 770k
- static demand-paged executable, you might not see corruption for a
- while) Picking some of the other files in the list at random, they
- seemed okay also.
-
- This is a fairly new minix filesystem, made only a couple of weeks ago
- when I reinstalled on a new machine.
-
-
- Anyway, I flicked over to #linux and asked if anyone else had seen
- this sort of behaviour from the filesystem/fsck before. Sure enough,
- someone had (Thanks, Matt) and usually after having run `install'
- (possibly with the -s flag to invoke strip). After some discussion, I
- deleted /usr/bin/gdb, and was greeted with a bunch of kernel messages:
-
- free block (0302:nnnnn): bit already cleared
-
- Another fsck -a complained about blocks owned by all the other files
- in the list being marked free, fixed that, and now the filesystem
- *seems* to be sane and consistent, again with fairly cursory checks.
-
-
- So: how does `strip' do it's stuff? I assume it's not directly
- manipulating the filesystem (ugh, only DOS would do that) but could
- something in the way it removes symbol information from a file
- exercise a bug in the filesystem code? Perhaps leaving the `holes'
- marked free (to be claimed by other files), yet owned by gdb? Some of
- the files in the list were *older* than the gdb binary, so this isn't
- a particularly satisfactory hypothesis. Any better ideas?
-
- _______________________________________________________________________________
- Daniel AMP Carosone. email: danielce@ee.mu.oz.au snail: 37 Wandin Road
- Computer/Software Eng, IRC: Waftam Camberwell 3124
- University of Melbourne. Vox: +61 3 882 8910 Australia
-