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

Max Rottenkolber max at mr.gy
Sun Oct 4 14:22:29 PDT 2015


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))

Regards,
max





More information about the Openmcl-devel mailing list