From owner-freebsd-hackers Mon May 31 10:25:13 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [209.157.86.2]) by hub.freebsd.org (Postfix) with ESMTP id B39791527F for ; Mon, 31 May 1999 10:25:07 -0700 (PDT) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.3/8.9.1) id KAA76020; Mon, 31 May 1999 10:24:55 -0700 (PDT) (envelope-from dillon) Date: Mon, 31 May 1999 10:24:55 -0700 (PDT) From: Matthew Dillon Message-Id: <199905311724.KAA76020@apollo.backplane.com> To: Kevin Day Cc: hackers@FreeBSD.ORG Subject: Re: Possible race in pipe device driver, esp on multi-cpu machines. References: <199905310829.DAA10969@home.dragondata.com> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG :While I really doubt that this is related, I discovered today that I'm able :to repeatably lock up my -current machine with: : :find /home -print | afio -T 3k -G 6 -Z -z -v -o - | tee /scratch/backup.afio >/dev/rsa0 : :It runs for about 5 minutes, then hangs completely. Removing the tee and :writing to either of them doesn't cause a hang. Running two afio's with run :going to the file and one going to tape doesn't cause a hang. : :When it locks up, it's doing it pretty solidly. (no ddb, no keyboard echo, :etc). : :I haven't ruled out hardware issues yet though, but it looks slightly pipe :related. : :Kevin Alan and I are working on it. We are testing a fix for pipe_read() now and I'm working on one for pipe_write(). The fixes basically involve holding the pipe's lock throughout all calculations and I/O ops except when the code needs to explicitly tsleep() on a pipe-empty or pipe-full condition. The race conditions in the pipe code can lead to a crash in the case where you have multiple writers or multiple readers accessing the same pipe, but should only lead to corruption in certain cases where one reader and one writer exist. It may or may not be related to your problem. -Matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message