[bknr-devel] Fwd: searching intervals, sorting and invalid-store-random-state signaled when opening a store
Hans Hübner
hans.huebner at gmail.com
Mon Apr 26 11:02:37 UTC 2010
On Mon, Apr 26, 2010 at 11:13, Hans Hübner <hans.huebner at gmail.com> wrote:
> On Mon, Apr 26, 2010 at 08:07, <madnificent at gmail.com> wrote:
>> Condition Signaled:
>> Whenever I restart my lisp image in slime and open a previously used store,
>> I receive an invalid-store-random-state in SBCL 1.0.37. Two meaningful
>> restarts are given, being initialize-store-random-state and
>> ignore-store-random-state. Is there something obvious I'm doing wrong or is
>> this a bug of some sort?
>
> This is a bug, and I think I briefly saw it a few months ago but did
> not have the time to fix it. As far as I remember, SBCL's random
> state can no longer be serialized/deserialized with read/write (see
> data/txn.lisp). I'd welcome a patch.
I think this is an SBCL bug:
CL-USER> (with-standard-io-syntax (write-to-string *random-state*))
"#S(RANDOM-STATE :STATE #.(MAKE-ARRAY (627) :ELEMENT-TYPE (QUOTE
(UNSIGNED-BYTE 32)) :INITIAL-CONTENTS (QUOTE (0 2567483615 624 5489
1301868182 2938499221 ...
As you can see, the array dimensions are written without a quote, so
they can't be read (and they can't be read with *READ-EVAL* set to NIL
in any case, but I'd rather not get into discussing whether this is
allowed as per the spec). Can you please file a bug with SBCL and get
them to fix it our help you to find a workaround?
The BKNR datastore supplies transaction code with a random state that
is identical during initial execution and rollback so that transaction
code yields the same result in both cases even if it makes use of the
CL:RANDOM function. This is why the random state is serialized.
Thanks,
HAns
More information about the Bknr-devel
mailing list