Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!ucsd!ucbvax!agate!shelby!eos!jbm From: jbm@eos.UUCP (Jeffrey Mulligan) Newsgroups: comp.unix.wizards Subject: Re: panic() design question Message-ID: <7109@eos.UUCP> Date: 24 Aug 90 18:13:52 GMT References: <24280@adm.BRL.MIL> Organization: NASA Ames Research Center, California Lines: 37 dave@tis.com (David I. Dalva) writes: >The code goes something like this: > panic(s) > char *s; > { > printf("%s\n", s); > if (firsttime) { > firsttime = FALSE; > sync(); > } > halt(); > } >I am experiencing a problem where the sync() itself is panicking >(recursively) messing up the filesystem further. Taking the sync() >out greatly reduces filesystem damage. It would seem that the use of the flag "firsttime" is to prevent multiple or recursive calls to sunc(); if this is happening, then perhaps whatever is causing the panic is also scribbling over firsttime. Maybe you could try moving it to another part of the address space and see what happens. My naive guess about doing a sync()/update() at all, is that it's just a probabalistic tradeoff, there is a certain probability that there will be errors without a sync, there is another probability that the sync will make matters worse. It sounds like in your case the roulette wheel is coming up 00. -- Jeff Mulligan (jbm@eos.arc.nasa.gov) NASA/Ames Research Ctr., Mail Stop 262-2, Moffet Field CA, 94035 (415) 604-3745