[elephant-devel] DB_NOTFOUND and Unknown error: -5

Robert L. Read read at robertlread.net
Mon Nov 7 19:29:07 UTC 2005


Dear Florian,

    I just tried this on:
1) SBCL 8.18
2) Fedora Core 3
3) libdb4.2
4) elephant0.2.1

I didn't have any problem, so I gained no information from that.

The backtrace information you provide does not give me any hints, but 
then, even though I am now the maintainer, I might not have enough
experience with it.

I'd like to be as helpful as possible.  Are you dedicated to your
particular version setup?
For example, would you be willing to try the cvs branch SQL-BACK-END on
SBCL 9.5? That
is what I have mostly been working on, and will become Elephant 0.3.0
unless someone
finds a problem with it by next week.   It would be MUCH easier for me
to debug this
problem if you were on that set-up.  However, I know in some way that is
a big change.

As an alternative, you could run the tests, and send me the output of
that; that might 
provide some help.  

The tests for version 0.2.1 can be run via:
(asdf:operate 'asdf:load-op :elephant-tests)
(in-package "ELEPHANT-TESTS")
(do-all-tests)

Perhaps this is obvious, but the 0.2.1 system does work, at least under
some 
configurations.

Also, when you untar it, in the "tests" directory there is aleady a
directory "testdb".
I wonder if you would have this problem if you used that directory?

As a further guess as to what might be wrong based on the backtraces,
the third
one is just because the "setq foo" failed due to the second failure.
The first and 
second failures look like they are indeed failures in the BerkeleyDB
system or 
right at the interface to it.  I don't mean by that that there is a bug
in BerkeleyDB, just
that this problem has something to do with the way BerkeleyDB is set up
compared
to your installation, rather than being a simple bug somewhere in
Elephant LISP code.

Hoping that somehow helps,



On Mon, 2005-11-07 at 17:40 +0100, Florian Obser wrote:

> hi,
> I tried the tutorial on
> http://common-lisp.net/project/elephant/doc/Tutorial.html with SBCL
> 0.8.16 and libdb4.2 from debian sarge and elephant 0.2.1.
> 
> Opening the store results in:
> 
> CL-USER> (open-store "/tmp/testdb1")
> -----------------------------------------
> Berkeley DB error: DB_NOTFOUND: No matching key/data pair found
>    [Condition of type SLEEPYCAT:DB-ERROR]
> 
> Restarts:
>   0: [ABORT] Abort handling SLIME request.
>   1: [ABORT] Reduce debugger level (leaving debugger, returning to
> toplevel).
>   2: [TOPLEVEL] Restart at toplevel READ/EVAL/PRINT loop.
> 
> Backtrace:
>   0: ((OPEN-CONTROLLER (STORE-CONTROLLER)) #<unavailable argument>
> #<unavailable argument> #<unavailable argument> #<unavailable argument>)
>   1: (SB-INT:EVAL-IN-LEXENV 2 (OPEN-STORE "/tmp/testdb1")
> #S(SB-KERNEL:LEXENV :FUNS NIL :VARS NIL :BLOCKS NIL :TAGS NIL
> :TYPE-RESTRICTIONS NIL :LAMBDA NIL :CLEANUP NIL :HANDLED-CONDITIONS NIL
> :DISABLED-PACKAGE-LOCKS NIL :POLICY ((SPEED . 1) (SPACE . 1) (SAFETY .
> 1) (INHIBIT-WARNINGS . 1) (DEBUG . 1) (COMPILATION-SPEED . 1))))[:EXTERNAL]
>   2: ("hairy arg processor for SWANK::EVAL-REGION" "(open-store
> \"/tmp/testdb1\")
> " T)
>   3: ("#'(LAMBDA NIL (MULTIPLE-VALUE-BIND # # ...))")
> [...]
> -----------------------------------------
> (The backtrace continues after this point but I assume it's only slime
> related)
> I tried different locations for the store directory (current working
> directory or /tmp/ in this case. I found the suggestion that this libdb
> error message might be related to permissions on the directory so I
> tried a chmod 777. In all cases after running the open-store using a
> fresh empty directory the following files are in the directory:
> __db.001
> __db.002
> __db.003
> __db.004
> __db.005
> %ELEPHANT
> log.0000000001
> 
> I aborted (using 0) the backtrace and tried to continue the tutorial.
> Inserting and retrieving of strings works fine, but when I tried to
> create a persistence-class instance I get a new error:
> CL-USER> (defclass my-persistent-class ()
>                 ((slot1 :accessor slot1)
> 	         (slot2 :accessor slot2))
> 		         (:metaclass persistent-metaclass))
> 
> CL-USER> (setq foo (make-instance 'my-persistent-class))
> -----------------------------------------------------------
> Berkeley DB error: Unknown error: -5
>    [Condition of type SLEEPYCAT:DB-ERROR]
> 
> Restarts:
>   0: [ABORT] Abort handling SLIME request.
>   1: [ABORT] Reduce debugger level (leaving debugger, returning to
> toplevel).
>   2: [TOPLEVEL] Restart at toplevel READ/EVAL/PRINT loop.
> 
> Backtrace:
>   0: (SLEEPYCAT::NEXT-COUNTER #<SB-ALIEN-INTERNALS:ALIEN-VALUE :SAP
> #X0827A1E8 :TYPE (* T)> #<SB-ALIEN-INTERNALS:ALIEN-VALUE :SAP #X0827AAB8
> :TYPE (* T)> #<SB-ALIEN-INTERNALS:ALIEN-VALUE :SAP #X00000000 :TYPE (*
> T)> #<SB-ALIEN-INTERNALS:ALIEN-VALUE :SAP #X08278FF0 :TYPE (* (SIGNED
> 8))> 12 #<SB-ALIEN-INTERNALS:ALIEN-VALUE :SAP #X0827A1D0 :TYPE (*
> (SIGNED 8))> 16)
>   1: ((INITIALIZE-INSTANCE :BEFORE (PERSISTENT)) #<unavailable argument>
> #<unavailable argument> #<MY-PERSISTENT-CLASS {939EA59}> NIL)
>   2: ("#'(LAMBDA (SB-PCL::.PV-CELL. SB-PCL::.NEXT-METHOD-CALL.
> SB-PCL::.ARG0. ...) (DECLARE #) ...)" #<unavailable argument>
> #<unavailable argument> #<MY-PERSISTENT-CLASS {939EA59}> NIL)
>   3: ((MAKE-INSTANCE (CLASS)) #<unavailable argument> #<unavailable
> argument> #<PERSISTENT-METACLASS MY-PERSISTENT-CLASS> NIL)
> -----------------------------------------------------------
> 
> and after this I can't continue working with the object:
> CL-USER> (add-to-root "foo" foo)
> ---------------------
> The variable FOO is unbound.
>    [Condition of type UNBOUND-VARIABLE]
> 
> Restarts:
>   0: [ABORT] Abort handling SLIME request.
>   1: [ABORT] Reduce debugger level (leaving debugger, returning to
> toplevel).
>   2: [TOPLEVEL] Restart at toplevel READ/EVAL/PRINT loop.
> 
> Backtrace:
>   0: (SB-INT:EVAL-IN-LEXENV 2 FOO #S(SB-KERNEL:LEXENV :FUNS NIL :VARS
> NIL :BLOCKS NIL :TAGS NIL :TYPE-RESTRICTIONS NIL :LAMBDA NIL :CLEANUP
> NIL :HANDLED-CONDITIONS NIL :DISABLED-PACKAGE-LOCKS NIL :POLICY ((SPEED
> . 1) (SPACE . 1) (SAFETY . 1) (INHIBIT-WARNINGS . 1) (DEBUG . 1)
> (COMPILATION-SPEED . 1))))[:EXTERNAL]
>   1: (SB-INT:EVAL-IN-LEXENV 2 (ADD-TO-ROOT "foo" FOO)
> ---------------------
> 
> Any suggestions what might be going wrong here? (I think I understand
> the third backtrace, but what about the first two?)
> - Florian

----
Robert L. Read, PhD                                     read &T
robertlread.net
Consider visiting Progressive Engineering:
http://robertlread.net/pe
In Austin: 912-8593                                        "Think
globally, Act locally." -- RBF


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/elephant-devel/attachments/20051107/7dd1f6fb/attachment.html>


More information about the elephant-devel mailing list