Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Jun 1998 06:55:30 +0800
From:      Al Chen <hua@nease.net>
To:        freebsd-questions@FreeBSD.ORG
Subject:   Is there any "race condition" in FFS? 
Message-ID:  <3.0.32.19980616065526.00685908@nease.net>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3.0.32.19980616065526.00685908>