Closed K1D77A closed 2 years ago
The stream for "/dev/urandom" gets opened the first time some random data is requested, for example with random-data
, random-bits
or strong-random
. The error you get happens when using save-lisp-and-die
in a session where some random data has already been requested from Ironclad, because save-lisp-and-die
closes the stream, but in a strange way.
Trying to read data from this closed stream throws a SB-INT:CLOSED-SAVED-STREAM-ERROR
error, however calling open-stream-p
on it returns T
. Maybe that's a bug in SBCL, I'll ask the developers...
For the moment I can think of two workarounds:
save-lisp-and-die
in a session where no random data has been requested from Ironclad yet.(progn (close ironclad::*os-prng-stream*) (setf ironclad::*os-prng-stream* nil))
just before calling save-lisp-and-die
.Using Ironclad >= 0.56 and SBCL >= 2.1.8 should solve the issue without the need for a workaround.
Thanks :+1:
When (ironclad:random-bits ..) is evaluated within a lisp image that I have generated with save-lisp-and-die I get the following condition:
This is on an image that I have exported with save-lisp-and-die and is running on a remote vps. If I boot a fresh sbcl on that VPS, QL ironclad and run the same I have no issue.