[Dovecot] OpenBSD and too many open files

Quentin Garnier cube at cubidou.net
Wed Aug 1 21:09:32 EEST 2007


On Wed, Aug 01, 2007 at 10:56:26AM -0700, Bryan Vyhmeister wrote:
> On Aug 1, 2007, at 10:37 AM, Quentin Garnier wrote:
> 
> >On Wed, Aug 01, 2007 at 07:01:35PM +0200, Quentin Garnier wrote:
> >[...]
> >>Which does look like what is experienced here.  Now, I don't know  
> >>if we
> >>can locate easily what fix needs to be applied to OpenBSD.
> >
> >Check if this applies to OpenBSD:
> >
> >http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/kern/sys_pipe.c.diff? 
> >r1=1.65&r2=1.66&f=h
> 
> From looking at:
> 
> http://www.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/ 
> sys_pipe.c?rev=1.51&content-type=text/plain
> 
> I can't quite tell. There are significant differences. I'll have to  
> take a closer look after a work engagement.

Well, the problem is Christos did some other stuff in that commit than
just fixing the bug.  Try the attached patch.

-- 
Quentin Garnier - cube at cubidou.net - cube at NetBSD.org
"You could have made it, spitting out benchmarks
Owe it to yourself not to fail"
Amplifico, Spitting Out Benchmarks, Hometakes Vol. 2, 2005.
-------------- next part --------------
--- sys_pipe.c.orig	2006-11-17 10:21:52.000000000 +0100
+++ sys_pipe.c	2007-08-01 20:08:09.000000000 +0200
@@ -735,9 +735,10 @@
 		 * If the other side is blocked, wake it up saying that
 		 * we want to close it down.
 		 */
+		cpipe->pipe_state |= PIPE_EOF;
 		while (cpipe->pipe_busy) {
 			wakeup(cpipe);
-			cpipe->pipe_state |= PIPE_WANT | PIPE_EOF;
+			cpipe->pipe_state |= PIPE_WANT;
 			tsleep(cpipe, PRIBIO, "pipecl", 0);
 		}
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 478 bytes
Desc: not available
Url : http://dovecot.org/pipermail/dovecot/attachments/20070801/d08c1c16/attachment.bin 


More information about the dovecot mailing list