[elephant-devel] Strange behavior with indexed-btree
Ian Eslick
eslick at media.mit.edu
Thu Jan 8 13:04:03 UTC 2009
Sorry, this indicate a fresh DB. Which version of 1.0 are you using -
the alpha tag or the latest head?
Sent from my iPhone
On Jan 7, 2009, at 9:35 PM, Kevin Raison <raison at chatsubo.net> wrote:
> I apologize for replying to my own reply, but in the process of
> recreating this from a fresh bdb, i noticed another artifact of the
> error condition. Before the unbound slot errors begin to appear, I
> get
> an ELEPHANT:ELEPHANT-TYPE-DESERIALIZATION-ERROR; just once, and then
> the unbound slot errors start happening. A trace of the
> deserialization
> error follows:
>
> Condition ELEPHANT:ELEPHANT-TYPE-DESERIALIZATION-ERROR was signalled.
> [Condition of type ELEPHANT:ELEPHANT-TYPE-DESERIALIZATION-ERROR]
>
> Restarts:
> 0: [TERMINATE-THREAD] Terminate this thread (#<THREAD
> "pcall-worker-50" RUNNING {1003C18CE1}>)
>
> Backtrace:
> 0: ((LABELS ELEPHANT-SERIALIZER2::%DESERIALIZE) #<unavailable lambda
> list>)
> 1: ((LABELS ELEPHANT-SERIALIZER2::%DESERIALIZE) #<unavailable lambda
> list>)
> 2: (ELEPHANT-SERIALIZER2::DESERIALIZE #<unavailable lambda list>)
> 3: (ELEPHANT::DESERIALIZE ..)
> 4: ((SB-PCL::FAST-METHOD ELEPHANT::PERSISTENT-SLOT-READER
> (DB-BDB::BDB-STORE-CONTROLLER T T)) #<unavailable lambda list>)
> 5: (SLOT-VALUE #<BDB-INDEXED-BTREE oid:7565> DB-BDB::INDICES)
> 6: ((SB-PCL::FAST-METHOD SHARED-INITIALIZE :AFTER
> (DB-BDB::BDB-INDEXED-BTREE T)) #<unavailable lambda list>)[:EXTERNAL]
> 7: ((LAMBDA (SB-PCL::.PV. SB-PCL::.NEXT-METHOD-CALL. SB-PCL::.ARG0.
> SB-PCL::.ARG1. SB-INT:&MORE SB-PCL::.DFUN-MORE-CONTEXT.
> SB-PCL::.DFUN-MORE-COUNT.)) ..)
> 8: ((SB-PCL::FAST-METHOD SHARED-INITIALIZE :AROUND
> (ELEPHANT:PERSISTENT-OBJECT T)) #<unavailable argument> #<unavailable
> argument> #<unavailable argument> #<unavailable argument>)[:EXTERNAL]
> 9: ((SB-PCL::FAST-METHOD ELEPHANT::RECREATE-INSTANCE
> (ELEPHANT:PERSISTENT-COLLECTION)) #<unavailable argument>
> #<unavailable
> argument> #<unavailable argument>)[:EXTERNAL]
> 10: ((SB-PCL::FAST-METHOD ELEPHANT::CONTROLLER-RECREATE-INSTANCE
> (ELEPHANT:STORE-CONTROLLER T)) #<unused argument> #<unused argument>
> #<BDB-STORE-CONTROLLER /srv/console/syslog/> 7565 NIL)
> 11: ((LABELS ELEPHANT-SERIALIZER2::%DESERIALIZE) #<unavailable lambda
> list>)
> 12: (ELEPHANT-SERIALIZER2::DESERIALIZE #<unavailable lambda list>)
> 13: (ELEPHANT::DESERIALIZE ..)
> 14: ((SB-PCL::FAST-METHOD ELEPHANT:GET-VALUE (T DB-BDB::BDB-BTREE))
> #<unavailable lambda list>)
> 15: ((SB-PCL::FAST-METHOD CONSOLE::INDEX-LOG-ENTRY
> (CONSOLE::LOG-ENTRY)) #<unavailable argument> #<unavailable argument>
> #<LOG-ENTRY oid:10076>)
> 16: ((LAMBDA ()))
> 17: ((SB-PCL::FAST-METHOD ELEPHANT::EXECUTE-TRANSACTION
> (DB-BDB::BDB-STORE-CONTROLLER T)) #<unavailable argument>
> #<unavailable
> argument> #<unavailable argument> #<unavailable argument>)[:EXTERNAL]
> 18: (CONSOLE::ADD-LOG-ENTRY ..)
>
>
> Kevin Raison wrote:
>> I was finally able to recreate this in the repl (as opposed to
>> seeing it
>> in my error logs), so here is a trace:
>>
>> The slot DB-BDB::INDICES-CACHE is unbound in the object
>> #<BDB-INDEXED-BTREE oid:2>.
>> [Condition of type UNBOUND-SLOT]
>>
>> Backtrace:
>> 0: ((SB-PCL::FAST-METHOD SLOT-UNBOUND (T T T)) #<unavailable
>> argument> #<unavailable argument> #<unavailable argument>
>> #<BDB-INDEXED-BTREE oid:2> DB-BDB::INDICES-CACHE)
>> 1: (SB-PCL::SLOT-UNBOUND-INTERNAL #<BDB-INDEXED-BTREE oid:2> 2)
>> 2: ((SB-PCL::FAST-METHOD (SETF GET-VALUE) (T T
>> DB-BDB::BDB-INDEXED-BTREE)) #<unavailable lambda list>)
>> 3: ((LAMBDA (WORD)) "34766")
>> 4: (SB-IMPL::MAP1 #<CLOSURE (LAMBDA #) {1003CA4ED9}> (("" "asa"
>> "106007" "deny" "inbound" "udp" ...)) :LIST T)
>> 5: (MAPCAR #<CLOSURE (LAMBDA #) {1003CA4ED9}> ("" "asa" "106007"
>> "deny" "inbound" "udp" ...))[:EXTERNAL]
>> 6: ((SB-PCL::FAST-METHOD INDEX-LOG-ENTRY (LOG-ENTRY)) #<unavailable
>> argument> #<unavailable argument> #<LOG-ENTRY oid:6373>)
>> 7: ((LAMBDA ()))
>> 8: ((SB-PCL::FAST-METHOD ELEPHANT::EXECUTE-TRANSACTION
>> (DB-BDB::BDB-STORE-CONTROLLER T)) #<unavailable argument>
>> #<unavailable
>> argument> #<unavailable argument> #<unavailable argument>)[:EXTERNAL]
>> 9: (ADD-LOG-ENTRY ..)
>> 10: (SB-INT:SIMPLE-EVAL-IN-LEXENV ..)
>>
>> And here is the code that sometimes causes the issue:
>> (defmethod index-log-entry ((log-entry log-entry))
>> (let ((*store-controller* *syslog-controller*))
>> (let ((btree (get-from-root "log-entry-index" :sc
>> *syslog-controller*)))
>> (map-words #'(lambda (word)
>> (unless (or (member word *superfluous-
>> words* :test
>> #'string-equal)
>> (< (length word) 2))
>> (unless (existsp word btree)
>> (setf (get-value word btree) (make-pset :sc
>> *syslog-controller*)))
>> (insert-item log-entry
>> (get-value word btree))))
>> (text log-entry)))))
>>
>>
>> If I drop and recreate the btree, everything runs smoothly (no
>> errors)
>> for a few hours and then the above error message starts showing up
>> about
>> half to three quarters of the time.
>>
>> Thanks again,
>> Kevin
>>
>>
>> Kevin Raison wrote:
>>> I am seeing an intermittent error with 1.0 alpha when trying to
>>> write to
>>> an indexed btree (using BerkeleyDB 4.7 as provided by Ubuntu's
>>> package
>>> repositories):
>>>
>>> The slot DB-BDB::INDICES-CACHE is unbound in the object
>>> #<BDB-INDEXED-BTREE oid:2>
>>>
>>> Within the same thread, sometimes this happens and sometimes I am
>>> able
>>> to read and write to the btree. I am using sbcl 1.0.24 on 32 bit
>>> intel
>>> linux. Is there something obvious that might help alleviate this or
>>> should I provide more context?
>>>
>>> Thanks!
>>> Kevin
>>>
>>> _______________________________________________
>>> elephant-devel site list
>>> elephant-devel at common-lisp.net
>>> http://common-lisp.net/mailman/listinfo/elephant-devel
>>
>> _______________________________________________
>> elephant-devel site list
>> elephant-devel at common-lisp.net
>> http://common-lisp.net/mailman/listinfo/elephant-devel
>
> _______________________________________________
> elephant-devel site list
> elephant-devel at common-lisp.net
> http://common-lisp.net/mailman/listinfo/elephant-devel
More information about the elephant-devel
mailing list