vi core dumping on Sun 2 (fixed, but would like explanations)

Spencer W. Thomas thomas at utah-gr.UUCP
Fri Jun 28 03:06:44 AEST 1985


I would bet on a bad spot in the swap area (or memory).  As Chris points
out, the sticky bit means "keep a copy of this program in swap space,
even if nobody is running it".  If the "running" copy of the program got
corrupted, and then swapped out, you would keep on using the corrupted
copy.  A process is loaded into the swap area by first reading it into
memory, then writing it out to swap, so if you had a bad memory
location, it would be possible to corrupt the swap copy.

Things you could try if it happens again:
1. Turn off the sticky bit and run vi a couple of times.  I think the
system will throw away the copy in the swap area, so you should be
getting a clean copy.

2. Write a program that uses ptrace() to compare a "running" copy of vi
to the binary (the running copy should get the bad swap version).

-- 
=Spencer   ({ihnp4,decvax}!utah-cs!thomas, thomas at utah-cs.ARPA)



More information about the Comp.unix.wizards mailing list