Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!udel!haven!adm!news From: dave@tis.com (David I. Dalva) Newsgroups: comp.unix.wizards Subject: panic() design question Message-ID: <24280@adm.BRL.MIL> Date: 23 Aug 90 21:25:56 GMT Sender: news@adm.BRL.MIL Lines: 29 Hi Wizards, I have a question regarding the implementation of panic() in the UNIX kernel (both BSD and SYSV kernels are equivalent). The code goes something like this: panic(s) char *s; { printf("%s\n", s); if (firsttime) { firsttime = FALSE; sync(); } halt(); } Why is it that panic calls sync() (or update()) before the system is halted, when data structures may be messed up causing further damage to the filesystem? I believe fsck should be able to recover to the most recent sync(). 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. Dave Dalva Trusted Information Systems, Inc. Glenwood, MD 21738 (301) 854-6889