From owner-freebsd-questions Mon Jun 15 15:55:50 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id PAA15566 for freebsd-questions-outgoing; Mon, 15 Jun 1998 15:55:50 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from smtp.163.net ([202.103.129.8]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id PAA15546 for ; Mon, 15 Jun 1998 15:55:09 -0700 (PDT) (envelope-from hua@nease.net) Received: (fmail 2796 invoked from network); 15 Jun 1998 22:54:26 -0000 Received: from unknown (HELO alchen) (202.103.139.121) by w8.163.guangzhou.gd.cn with SMTP; 15 Jun 1998 22:54:26 -0000 Message-Id: <3.0.32.19980616065526.00685908@nease.net> X-Sender: hua@nease.net (Unverified) X-Mailer: Windows Eudora Pro Version 3.0 (32) Date: Tue, 16 Jun 1998 06:55:30 +0800 To: freebsd-questions@FreeBSD.ORG From: Al Chen Subject: Is there any "race condition" in FFS? Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hello: Recently,some of our Server always down due to the FFS error. the situation can be describe below: The server is an incoming mail hub running with qmail, so messages only stay in queue dir of qmail for a very short period. program "qmail-smtpd" create a unique file in a temp directory ,and link it to another directory with its inode as the new file's name,and this file is a "message file",and unlink the temp file.then qmail will open another file in another queue directory for rcpt info with the name as the "message file" and as the message file's name is the same of its inode then the name is unique in the file system. and after the qmail-smtpd writes the whole messages into the queue and then do some link and unlink of the rcpt info file,and pull up a trigger to notice qmail-send to send the message with a named pipe then qmail-send will checked the message and rcpt info as soon as it get the trigger,and as our server is an incoming mail hub,then the message will be local deliveried and after the deliveried the all files in the queue directory will be unlinked,As the local delivery is very fast,the message will stay in the queue only for a very short time after the trigger is pulled Then the inode of the message file is released and used for another message file some times, and these files look just the same,with same names and same inodes (as inode is its name). And our server is very stable when the number of qmail-smtpd is no more then 50 or 60. but when the number of process qmail-smtpd become larger, for example 150 or 160, it will always crash after some time (may be several hours,maybe just one hour) ,and each time it crashed due to the panic of "freeing free block",and when it crashed actually the avg load wass not high,and there are still many memory to use. so we think may be it's a hardware error,then we changed the harddisk and reinstall BSD, and also we mount the file system which contain qmail queue directory with option "sync". but when the number of qmail-smtpd become larger,the problem still exist and as another servers of us running with the same hardware but not used as incoming mail hub run well,and we never saw any hardware error warning before or after the system crash and each time the crash is due to panic of "freeing free block" even we recreated the FS which contain the queue directory,we guess maybe there is something wrong with the FFS, so is there any "race condition" in FFS which will cause panic "freeing free block",as we know panic "freeing free block" is due to refreeing some of the blocks,so it's very hard to find out the error,because wrong block could be free in some time long before the crash,and only when the right file unlinked and the refreeing will cause the panic. Al Chen To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message