[Openmcl-devel] GC and TCP streams, connection errors during writing pending output while GC-finalizing a TCP stream
joswig at lisp.de
Mon Jul 8 03:35:51 CDT 2013
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?).
More information about the Openmcl-devel