X-MimeOLE: Produced By Microsoft Exchange V6.5
Received: by onstor-exch02.onstor.net 
	id <01C885A3.1153EA7A@onstor-exch02.onstor.net>; Fri, 14 Mar 2008 00:14:39 -0700
MIME-Version: 1.0
Content-Type: multipart/alternative;
	boundary="----_=_NextPart_001_01C885A3.1153EA7A"
Content-class: urn:content-classes:message
Subject: RE: select() may be breaking cougar
Date: Fri, 14 Mar 2008 00:12:58 -0700
Message-ID: <BB375AF679D4A34E9CA8DFA650E2B04E085F9E16@onstor-exch02.onstor.net>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: select() may be breaking cougar
Thread-Index: AciFjPYZotMH+GCDSvKtst2uLtqDzgAFd76s
References: <BB375AF679D4A34E9CA8DFA650E2B04E03E9A6BC@onstor-exch02.onstor.net>
From: "Mike Lee" <mike.lee@onstor.com>
To: "dl-Cougar" <dl-Cougar@onstor.com>
Cc: "Chris Vandever" <chris.vandever@onstor.com>

This is a multi-part message in MIME format.

------_=_NextPart_001_01C885A3.1153EA7A
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable


Gosh, it was more like Chris found the bug and explained it to me, while =
I observed in awe...
Hats off to Chris...

-----Original Message-----
From: Chris Vandever
Sent: Thu 3/13/2008 9:36 PM
To: dl-Cougar
Subject: select() may be breaking cougar
=20
It turns out that select() behaves differently between bsd and linux.  =
If a timeout value is specified, linux will update it with the time =
remaining, whereas bsd does not change it.

This evening Mike and I found a bug in clustering where the code was =
relying on the bsd behavior.

We will need to examine every select() call on the system to check which =
ones specify a timeout value, and of those, which ones rely on the bsd =
behavior.  (The clustering code has 2 select calls, but the other one =
was resilient to the linux behavior.)

Note that some of the code adjusts the timer on EINTR, so on linux we'll =
end up timing out twice as fast.  (It looks like rmc on the ssc is in =
this category.)

I'd appreciate it if someone would check my work, but it looks like the =
following need more investigation:

samba-3.21a/lib/select.c
sendmail/libmilter/comm.c
sm-sct/sct-cc-ssl.c
ssc-nfxnis/test/ldaptest.c
ssc-nfxnis/test/nistest.c
ssc-rmc/rmc.c
ssc-socat/sycls.c
ssc-sshd-kb5/openbsd-compat/bsd-misc.c

ChrisV




------_=_NextPart_001_01C885A3.1153EA7A
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
6.5.7653.38">
<TITLE>RE: select() may be breaking cougar</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<BR>

<P><FONT SIZE=3D2>Gosh, it was more like Chris found the bug and =
explained it to me, while I observed in awe...<BR>
Hats off to Chris...<BR>
<BR>
-----Original Message-----<BR>
From: Chris Vandever<BR>
Sent: Thu 3/13/2008 9:36 PM<BR>
To: dl-Cougar<BR>
Subject: select() may be breaking cougar<BR>
<BR>
It turns out that select() behaves differently between bsd and =
linux.&nbsp; If a timeout value is specified, linux will update it with =
the time remaining, whereas bsd does not change it.<BR>
<BR>
This evening Mike and I found a bug in clustering where the code was =
relying on the bsd behavior.<BR>
<BR>
We will need to examine every select() call on the system to check which =
ones specify a timeout value, and of those, which ones rely on the bsd =
behavior.&nbsp; (The clustering code has 2 select calls, but the other =
one was resilient to the linux behavior.)<BR>
<BR>
Note that some of the code adjusts the timer on EINTR, so on linux we'll =
end up timing out twice as fast.&nbsp; (It looks like rmc on the ssc is =
in this category.)<BR>
<BR>
I'd appreciate it if someone would check my work, but it looks like the =
following need more investigation:<BR>
<BR>
samba-3.21a/lib/select.c<BR>
sendmail/libmilter/comm.c<BR>
sm-sct/sct-cc-ssl.c<BR>
ssc-nfxnis/test/ldaptest.c<BR>
ssc-nfxnis/test/nistest.c<BR>
ssc-rmc/rmc.c<BR>
ssc-socat/sycls.c<BR>
ssc-sshd-kb5/openbsd-compat/bsd-misc.c<BR>
<BR>
ChrisV<BR>
<BR>
<BR>
<BR>
</FONT>
</P>

</BODY>
</HTML>
------_=_NextPart_001_01C885A3.1153EA7A--
