Opened 6 years ago

Closed 5 years ago

#1320 closed defect (fixed)

I/O timeout arguments for TCP sockets are interpreted as milliseconds

Reported by: max Owned by:
Priority: normal Milestone:
Component: Runtime (threads, GC) Version: 1.10
Keywords: stream input-timeout output-timeout tcp Cc:

Description

(copied from openmcl-devel, see also #1247 as it seems to be related)

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

Change History (1)

comment:1 Changed 5 years ago by max

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.