[rucksack-devel] Rucksack tests fail when trying to deserialize object

Arthur Lemmens alemmens at xs4all.nl
Fri Aug 11 20:02:15 UTC 2006


Tiarnán O'Corrain wrote:

> The rucksack test suite fails with:
>
> end of file on #<RUCKSACK::SERIALIZER {62A0F5A9}>
>    [Condition of type END-OF-FILE]
>
> Backtrace (from slime):
>   0: (RUCKSACK::DESERIALIZE #<RUCKSACK::SERIALIZER {62A0F5A9}> T NIL)
>   1: (RUCKSACK::DESERIALIZE-LIST #<RUCKSACK::SERIALIZER {62A0F5A9}>)
>   2: (RUCKSACK::LOAD-OBJECTS #P"/tmp/rucksack-test-suite/schemas")
>   3: (RUCKSACK::OPEN-SCHEMA-TABLE #P"/tmp/rucksack-test-suite/schemas"
> :IF-EXISTS :OVERWRITE :IF-DOES-NOT-EXIST :CREATE)
>   4: ((SB-PCL::FAST-METHOD INITIALIZE-INSTANCE :AFTER
> (RUCKSACK:STANDARD-CACHE)) #<error printing object>)
>   5: ((LAMBDA (SB-PCL::.PV-CELL. SB-PCL::.NEXT-METHOD-CALL.
> SB-PCL::.ARG0. SB-PCL::.DFUN-REST-ARG.)) #<error printing object>)
>   6: ((SB-PCL::FAST-METHOD MAKE-INSTANCE (CLASS)) #<unavailable
> argument> #<unavailable argument> #<STANDARD-CLASS
> RUCKSACK:STANDARD-CACHE> (:DIRECTORY #1=#P"/$
>   7: (RUCKSACK:OPEN-CACHE #P"/tmp/rucksack-test-suite/" :CLASS
> RUCKSACK:STANDARD-CACHE :RUCKSACK
> #<RUCKSACK::SERIAL-TRANSACTION-RUCKSACK in #P"/tmp/rucksack-te$
>   8: ((SB-PCL::FAST-METHOD INITIALIZE-INSTANCE :AFTER
> (RUCKSACK:STANDARD-RUCKSACK)) (#(NIL 0) . #()) #<unavailable argument>
> #<RUCKSACK::SERIAL-TRANSACTION-RUC$
>   9: ((LAMBDA (SB-PCL::.PV-CELL. SB-PCL::.NEXT-METHOD-CALL.
> SB-PCL::.ARG0. SB-PCL::.DFUN-REST-ARG.)) #<unavailable argument>
> #<unavailable argument> #<RUCKSACK$
>  10: ((SB-PCL::FAST-METHOD MAKE-INSTANCE (CLASS)) #<unavailable
> argument> #<unavailable argument> #<STANDARD-CLASS
> RUCKSACK::SERIAL-TRANSACTION-RUCKSACK> (:DIR$
>  11: (RUCKSACK:OPEN-RUCKSACK #<unavailable argument> :IF-EXISTS :SUPERSEDE)
>
> When I look at the temporary store, I see that the file is empty
>
> $ ls -l /tmp/rucksack-test-suite/
> total 12
> -rw-r--r--  1 ocorrait  wheel  259 Aug 11 16:41 heap
> -rw-r--r--  1 ocorrait  wheel   10 Aug 11 16:41 objects
> -rw-r--r--  1 ocorrait  wheel    0 Aug  4 16:25 schemas
> -rw-r--r--  1 ocorrait  wheel   73 Aug 11 16:41 store

Hmmm....

I'm just guessing here, but maybe the :IF-EXISTS :SUPERSEDE case
for OPEN-RUCKSACK doesn't delete the schema file correctly?  If
there's an empty schema table file left, OPEN-CACHE will try to load
the schemas from that file, even if it's empty.  And then it will
fail because the file is empty.

Does the test suite also fail when you first remove all files from
the test-suite directory by hand?

The code used to delete all files in the specified rucksack directory
is:
    (mapc #'delete-file
  			 (directory (make-pathname :name :wild
   						         :type :wild
  						         :version :wild
  						         :defaults directory))

I wouldn't be very surprised if SBCL doesn't interpret this code the
way I intended it.

Unfortunately, I don't have time this evening to test Rucksack on
SBCL.  And I'll be away for the next 10 days or so, so I won't be
able to help any further until I come back.

Arthur




More information about the rucksack-devel mailing list