diff options
author | phk <phk@FreeBSD.org> | 2002-12-29 10:32:16 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2002-12-29 10:32:16 +0000 |
commit | 816919ad3911bdfe3e18835353fe58ce6ba5a436 (patch) | |
tree | b9084f68e842c108cc1415b47592c98d2b696f89 /sys | |
parent | 62270dd68932a971fd4b2a64a006c3b13705bbd2 (diff) | |
download | FreeBSD-src-816919ad3911bdfe3e18835353fe58ce6ba5a436.zip FreeBSD-src-816919ad3911bdfe3e18835353fe58ce6ba5a436.tar.gz |
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.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/fs/fifofs/fifo_vnops.c | 7 |
1 files changed, 6 insertions, 1 deletions
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; |