[elephant-devel] strange bug related to psets

Ryszard Szopa ryszard.szopa at gmail.com
Sat May 10 13:35:59 UTC 2008


Hello,

I have run into a very strange bug related to psets. I create some
persistent objects with psets as slot-values, and at some point one of
those psets that should be empty contains 5 integers, usually in
descending order with a step equal 5. For example

(values pset (pset-list pset)) => #<DEFAULT-PSET oid:17> (20 15 10 5 0)

(the exact numbers may vary: most often it starts from 20).

The bug appeared for the first time in a unit test. Before running
that test, I open a new BDB store in an empty directory, so it is
rather unlikely that my code at some point before puts the extra
values into the pset. What is more, the bug does not appear the first
time I run the test: only in the second and subsequent runs. In order
to get rid (at lest temporarily) of this bug, it is enough to run
(make-pset) somewhere in the code before creating my objects.

It looks as if there was some pset floating in memory, which
accidentally gets reused while making my new pset. Does anybody have
any idea how to hunt this bug down?

I am using elephant as in the darcs repository and the BerkeleyDB
(4.6) backend, on SBCL 1.0.15, x86 Linux version.

Oh, and I can actually reproduce this bug, but I wasn't able to factor
it down not to contain major parts of the application I am writing.

Thanks in advance,

    -- Richard

PS. I'd like to apologize: I have asked a question ("question about
persistent classes") on this group before, and got some interesting
answers, but then failed to thank for them. I was planning to write an
elaborate answer etc., but then there was ECLM, I had a lot of work to
do... You probably know how it goes. So, let me fix my mistake now:
thank you, Robert, Ian and Alex.

-- 
http://szopa.tasak.gda.pl/



More information about the elephant-devel mailing list