[Openmcl-devel] Bug in handling of I/O timeouts in TCP streams?

R. Matthew Emerson rme at clozure.com
Thu Oct 15 13:10:08 PDT 2015


> On Oct 4, 2015, at 5:22 PM, Max Rottenkolber <max at mr.gy> wrote:
> 
> Hi folks,
> 
> (in Clozure CL 1.10)
> 
> could there be a bug in `l1-sockets.lisp:859-860', where timeout values
> (supposedly in seconds) are not converted to the proper millisecond
> values used by PROCESS-INPUT-WAIT (`l1-streams.lisp:5449')? The
> documentation says (emphasis added):
> 
>  input-timeout---The number of **seconds** before an input operation
>  times out. Must be a real number between zero and one million. If an
>  input operation takes longer than the specified number of seconds, an
>  input-timeout error is signalled. (see Section 10.1.4, “Stream Timeouts
>  and Deadlines”)
> 
>  output-timeout---The number of **seconds** before an output operation
>  times out. Must be a real number between zero and one million. If an
>  output operation takes longer than the specified number of seconds, an
>  output-timeout error is signalled. (see Section 10.1.4, “Stream
>  Timeouts and Deadlines”)
> 
> I have not followed the rabbit hole to full length, but I am getting I/O
> timeout conditions on streams with i/o-timeout == 10 way before 10
> seconds. It being actually interpreted as 10 milliseconds would make
> sense.
> 
> Try this to verify (this blocks for 10 seconds when I run it):
> 
>  (with-open-socket (s :remote-host "mr.gy"
>                       :remote-port 80
>                       :input-timeout (* 10 1000))
>    (read-line s))

That's certainly a bug.

It works as documented in the 1.11 branch and in the trunk.





More information about the Openmcl-devel mailing list