[Openmcl-devel] GC and TCP streams, connection errors during writing pending output while GC-finalizing a TCP stream

Rainer Joswig joswig at lisp.de
Mon Jul 8 01:35:51 PDT 2013


Hi,

I observed the following:

I sometimes see an error during finalizing a TCP stream (built-in) object. Using the latest CCL on Linux ARM.

* the stream is still open

* the stream is garbage

* CCL's clean-up process wants to close the stream

* because of closing the stream it sees that there is still buffered output which hasn't been written

* it tries to write the remaining output

* during writing the output, the connection gets lost and an error occurs

(I can post a backtrace if I see that again).

I guess it would be useful to make sure that streams which are garbage are already closed by the application code. That could be difficult, if a thread/Lisp-process which created and uses the stream just gets killed.

But I have no feeling whether the GC should try to write pending stream contents during finalization, while closing the stream. Is that useful or even expected? As a Lisp developer how would I be able to deal with such an error (handle it somehow?). 

Best regards,

Rainer Joswig




More information about the Openmcl-devel mailing list