From owner-cvs-all Thu Jan 2 12:49:14 2003 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 97DF837B401; Thu, 2 Jan 2003 12:49:13 -0800 (PST) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 540EE43EC5; Thu, 2 Jan 2003 12:49:13 -0800 (PST) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id 3104CAE272; Thu, 2 Jan 2003 12:49:13 -0800 (PST) Date: Thu, 2 Jan 2003 12:49:13 -0800 From: Alfred Perlstein To: Poul-Henning Kamp Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/fs/fifofs fifo_vnops.c Message-ID: <20030102204913.GM26140@elvis.mu.org> References: <200301021951.h02Jp8Ys002016@repoman.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200301021951.h02Jp8Ys002016@repoman.freebsd.org> User-Agent: Mutt/1.4i Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG * Poul-Henning Kamp [030102 11:51] wrote: > phk 2003/01/02 11:51:08 PST > > Modified files: (Branch: RELENG_5_0) > sys/fs/fifofs fifo_vnops.c > Log: > MFC: Put a one-second timeout (And a XXX: comment) on a tsleep which > under certain not understood circumstances hangs sendmail during > boot. 216 if (ap->a_mode & FWRITE) { 217 fip->fi_writers++; 218 if (fip->fi_writers == 1) { 219 fip->fi_readsock->so_state &= ~SS_CANTRCVMORE; 220 if (fip->fi_readers > 0) { 221 wakeup((caddr_t)&fip->fi_readers); 222 sorwakeup(fip->fi_writesock); 223 } 224 } 225 } This this code is confusing because we have a producer consumer relationship between readers and writers. I think that the problem is that in this section of code the wakeup should be on fi_writers. Please test that and let me know if it fixes the problem. -- -Alfred Perlstein [alfred@freebsd.org] 'Instead of asking why a piece of software is using "1970s technology," start asking why software is ignoring 30 years of accumulated wisdom.' To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message