From 816919ad3911bdfe3e18835353fe58ce6ba5a436 Mon Sep 17 00:00:00 2001 From: phk Date: Sun, 29 Dec 2002 10:32:16 +0000 Subject: There is some sort of race/deadlock which I have not identified here. It manifests itself by sendmail hanging in "fifoow" during boot on a diskless machine with sendmail disabled. Giving the sleep a 1sec timout breaks the deadlock, but does not solve the underlying problem. XXX comment applied. --- sys/fs/fifofs/fifo_vnops.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'sys/fs') diff --git a/sys/fs/fifofs/fifo_vnops.c b/sys/fs/fifofs/fifo_vnops.c index 53538ef..2b53806 100644 --- a/sys/fs/fifofs/fifo_vnops.c +++ b/sys/fs/fifofs/fifo_vnops.c @@ -244,8 +244,13 @@ fifo_open(ap) } else { while (fip->fi_readers == 0) { VOP_UNLOCK(vp, 0, td); + /* + * XXX: Some race I havn't located is solved + * by timing out after a sec. Race seen when + * sendmail hangs here during boot /phk + */ error = tsleep((caddr_t)&fip->fi_writers, - PCATCH | PSOCK, "fifoow", 0); + PCATCH | PSOCK, "fifoow", hz); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td); if (error) goto bad; -- cgit v1.1