[rucksack-devel] Unexpected results from Rucksack (timing dependence?)

Arthur Lemmens alemmens at xs4all.nl
Sat Apr 25 09:25:59 UTC 2009


Hi Klaus,

Thanks very much for your report.

> Due to the apparent variation in the number of insertions and - as far
> as I can see - the lack of variation in the input, I thought that
> perhaps there's some kind of timing issue, so I added calls to SLEEP
> which does indeed seem to impact the results.  Interestingly, if the
> sleep becomes very long
>
>   RUCKSACK 55 > (try-it 5 '(1))
>
>   (:SLEEP 1 :RET NIL)
>   NIL
>
>   RUCKSACK 56 >
>
> I get the expected result.

Very strange.  But I can confirm that this happens to me too.


> I do not understand these results.  Offhand, I can think of 4 possible
> explanations
>
> 1. The results are correct

No, I don't think this should happen.


> 2. I'm not using Rucksack as intended, leading to undefined results.

Hmm...  The code looked a bit unusual to me, but I don't see anything
wrong with it.


> 3. There's something wrong with my setup - I'm using Rucksack
> downloaded as a tarball from common-lisp.net yesterday and Lispworks
> for Macintosh v5.1 Pro on Mac OSX Leopard.  Can anyone reproduce this
> variation?

Yes, I can reproduce this on Lispworks for Windows 5.1.1 Pro.  So I guess
it's not an operating system issue.


> 4. There's an error in Rucksack.

That sounds like the most likely explanation to me.  I've spent an hour
or two trying to chase this down, but I haven't found the cause of the
problem yet.  Initially I suspected that this might be fixed by adding
a few calls to FINISH-OUTPUT at the end of a transaction commit, but that
didn't seem to help at all.


> I do not understand the code very well, but the variation in terms of
> how many insertions are needed and the apparent timing dependency
> surprises me.

I agree.  I'm very surprised too.


> Suggestions / insights?

Unfortunately, in the next two weeks I won't have any time to investigate
this problem more closely.  If you want to take a closer look yourself, I
would start by digging into TRANSACTION-COMMIT.

Best regards,

Arthur Lemmens






More information about the rucksack-devel mailing list