- I did a fresh pull from darcs:<br><br> darcs get <a href="http://www.common-lisp.net/project/elephant/darcs/elephant-1.0">http://www.common-lisp.net/project/elephant/darcs/elephant-1.0</a><br><br>- I rebuilt elephant, and weblocks/elephant<br>
<br>- I set up my weblocks store with recover and register flags both set to T:<br><br>(defstore *elephant-store* :elephant<br> :spec `(:BDB ,(namestring (merge-pathnames (make-pathname :directory '(:relative "data/store"))<br>
(asdf-system-directory :fashion-origami)))<br> :register t :recover t))<br><br>- Run db_recovery in the data store directory<br><br>- I started the two processes (one serving port 80 the other 443). <br>
<br>- Went to 443 first. All is well.<br><br>- Went to 80 next. Webapp application dies (trace below).<br><br><b>Note:</b> The trace does not look much different from before.<br><br><b>Note2:</b> SLIME died when compiling elephant - got stuck on <br>
<br>gcc -L/usr/local/BerkeleyDB.4.7/lib/ -I/usr/local/BerkeleyDB.4.7/include/ -shared -march=x86-64 -fPIC -Wall -g -O2 -g /home/yarek/.sbcl/site/elephant-1.0/src/db-bdb/libberkeley-db.c -o /home/yarek/.sbcl/site/elephant-1.0/src/db-bdb/libberkeley-db.so -lm<br>
<br>I recompiled from command line and got these warnings:<br><br>/home/yarek/.sbcl/site/elephant-1.0/src/db-bdb/libberkeley-db.c: In function ‘lisp_compare2’:<br>/home/yarek/.sbcl/site/elephant-1.0/src/db-bdb/libberkeley-db.c:1053: warning: unused variable ‘i’<br>
/home/yarek/.sbcl/site/elephant-1.0/src/db-bdb/libberkeley-db.c: In function ‘lisp_compare_key2’:<br>/home/yarek/.sbcl/site/elephant-1.0/src/db-bdb/libberkeley-db.c:1147: warning: unused variable ‘i’<br><br><br><br>Not sure how to proceed. In order to ensure that I'm doing the right steps, can you please confirm:<br>
<br>1. Are my weblocks store settings correct?<br>2. Did I get the right repository for darcs<br>3. is manual compilation OK for libberkeley-db.so?<br><br>Yarek<br><br>Here is what I get as debug trace:<br><br>Berkeley DB error #-30974: DB_RUNRECOVERY: Fatal error, run database recovery<br>
[Condition of type ELEPHANT:BDB-DB-ERROR]<br><br>Restarts:<br> 0: [TERMINATE-THREAD] Terminate this thread (#<THREAD "hunchentoot-worker-2" RUNNING {1003705211}>)<br><br>Backtrace:<br> 0: ((LAMBDA (SWANK-BACKEND::DEBUGGER-LOOP-FN)) #<FUNCTION (LAMBDA #) {100296C8F9}>)<br>
1: (SWANK::DEBUG-IN-EMACS #<ELEPHANT:BDB-DB-ERROR {1003081261}>)<br> 2: ((LAMBDA (SWANK-BACKEND::HOOK SWANK-BACKEND::FUN)) #<FUNCTION SWANK:SWANK-DEBUGGER-HOOK> #<CLOSURE (LAMBDA #) {1003089A39}>)<br>
3: (SWANK::CALL-WITH-REDIRECTED-IO #<SWANK::CONNECTION {10036CB5E1}> #<CLOSURE (LAMBDA #) {1003089A59}>)<br> 4: (SWANK::CALL-WITH-CONNECTION #<SWANK::CONNECTION {10036CB5E1}> #<CLOSURE (LAMBDA #) {1003089A39}>)<br>
5: (SWANK:INVOKE-SLIME-DEBUGGER #<ELEPHANT:BDB-DB-ERROR {1003081261}>)<br> 6: ((LAMBDA (SWANK-BACKEND::HOOK SWANK-BACKEND::FUN)) #<FUNCTION SWANK:SWANK-DEBUGGER-HOOK> #<CLOSURE (LAMBDA #) {10030899F9}>)<br>
7: (INVOKE-DEBUGGER #<ELEPHANT:BDB-DB-ERROR {1003081261}>)<br> 8: (INVOKE-DEBUGGER #<ELEPHANT:BDB-DB-ERROR {1003081261}>)[:EXTERNAL]<br> 9: ((SB-PCL::FAST-METHOD HUNCHENTOOT:MAYBE-INVOKE-DEBUGGER (T)) #<unavailable argument> #<unavailable argument> #<ELEPHANT:BDB-DB-ERROR {1003081261}>)<br>
10: (SIGNAL #<ELEPHANT:BDB-DB-ERROR {1003081261}>)[:EXTERNAL]<br> 11: (ERROR #<ELEPHANT:BDB-DB-ERROR {1003081261}>)[:EXTERNAL]<br> 12: ((FLET #:LAMBDA43) #<ELEPHANT:BDB-DB-ERROR {1003081261}>)<br> 13: ((FLET #:LAMBDA43) #<ELEPHANT:BDB-DB-ERROR {1003081261}>)[:EXTERNAL]<br>
14: (SIGNAL #<ELEPHANT:BDB-DB-ERROR {1003081261}>)[:EXTERNAL]<br> 15: (ERROR ELEPHANT:BDB-DB-ERROR)[:EXTERNAL]<br> Locals:<br> SB-DEBUG::ARG-0 = 3<br> SB-DEBUG::ARG-1 = ELEPHANT:BDB-DB-ERROR<br> 16: ((SB-PCL::FAST-METHOD ELEPHANT::EXECUTE-TRANSACTION (DB-BDB::BDB-STORE-CONTROLLER T)) #<unavailable argument> #<unavailable argument> #<unavailable argument> #<unavailable argument>)[:EXTERNAL]<br>
Locals:<br> SB-DEBUG::ARG-0 = :<NOT-AVAILABLE><br> SB-DEBUG::ARG-1 = :<NOT-AVAILABLE><br> SB-DEBUG::ARG-2 = :<NOT-AVAILABLE><br> SB-DEBUG::ARG-3 = :<NOT-AVAILABLE><br>
SB-DEBUG::ARG-4 = :<NOT-AVAILABLE><br> 17: (ELEPHANT::MAP-BTREE-VALUES #<unavailable lambda list>)<br> [No Locals]<br> 18: (ELEPHANT::GET-DB-SCHEMAS #<unavailable lambda list>)<br> [No Locals]<br>
19: (ELEPHANT:MAP-CLASS #<unavailable argument> #<unavailable argument>)[:EXTERNAL]<br> Locals:<br> SB-DEBUG::ARG-0 = :<NOT-AVAILABLE><br> SB-DEBUG::ARG-1 = :<NOT-AVAILABLE><br>
SB-DEBUG::ARG-2 = :<NOT-AVAILABLE><br> 20: ((SB-PCL::FAST-METHOD WEBLOCKS:COUNT-PERSISTENT-OBJECTS (WEBLOCKS-ELEPHANT:ELEPHANT-STORE T)) ..)[:EXTERNAL]<br> Locals:<br> SB-DEBUG::ARG-0 = 4<br> SB-DEBUG::ARG-1 = :<NOT-AVAILABLE><br>
SB-DEBUG::ARG-2 = :<NOT-AVAILABLE><br> SB-DEBUG::ARG-3 = #<WEBLOCKS-ELEPHANT:ELEPHANT-STORE {1002D92011}><br> SB-DEBUG::ARG-4 = FASHION-ORIGAMI::PRODUCT-SET<br><br><br><div class="gmail_quote">
On Wed, Mar 11, 2009 at 10:38 AM, Ian Eslick <span dir="ltr"><<a href="mailto:eslick@media.mit.edu">eslick@media.mit.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
BDB docs state that :register t :recover t solve the multi-process recover problem. If you have already registered a process, it will inhibit recovery when a second process connects.<br>
<br>
I have another user with a deserialization error problem. Try updating to the latest elephant-1.0 and you should see an updated deserialization-error report in the backtrace that tells you more about why there was an error.<br>
<font color="#888888">
<br>
Ian</font><div><div></div><div class="h5"><br>
<br>
On Mar 11, 2009, at 1:28 PM, Yarek Kowalik wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Ok so that did not work.<br>
<br>
I remember that last time I had to remove :recover t from OPEN-STORE method in weblocks/src/store/elephant/elephant.lisp since that was the source of problems with opening a store with two processes. I think it forces the recovery mode at connection startup.<br>
<br>
I wonder if I should try :recover nil :register t -- doing that now.<br>
<br>
Yarek<br>
<br>
On Wed, Mar 11, 2009 at 10:06 AM, Yarek Kowalik <<a href="mailto:yarek.kowalik@gmail.com" target="_blank">yarek.kowalik@gmail.com</a>> wrote:<br>
Info:<br>
<br>
- BDB 4.7.<br>
- Ubuntu 8.04 on both 32 bit (Intel and whatever Amazon EC2 is using) and 64 bit (AMD X2 64) versions.<br>
- got the ELEPHANT-1-0-A2 via darcs<br>
<br>
I'm trying out the :register t and :recover t options now.<br>
<br>
Yarek<br>
<br>
<br>
On Tue, Mar 10, 2009 at 4:20 PM, Ian Eslick <<a href="mailto:eslick@media.mit.edu" target="_blank">eslick@media.mit.edu</a>> wrote:<br>
You're using BDB 4.7, right? What machine, os, word-width, etc?<br>
<br>
Add :register t and :recover t to the open-store keyword list.<br>
<br>
You can also try downloading from the elephant-1.0 repo but using:<br>
<br>
darcs get --tag=ELEPHANT-1-0-A2 <a href="http://www.common-lisp.net/project/elephant/darcs/elephant-1.0" target="_blank">http://www.common-lisp.net/project/elephant/darcs/elephant-1.0</a><br>
<br>
Ian<br>
<br>
<br>
<br>
<br>
On Mar 10, 2009, at 6:57 PM, Yarek Kowalik wrote:<br>
<br>
> Hi Ian,<br>
><br>
> Thanks for replying.<br>
><br>
> The only difference on my end between Jan version and now is the<br>
> version of Elephant. I can switch back to the unstable version and<br>
> the current app works fine.<br>
><br>
> Re: slots on the controler: all are set to some value - none are<br>
> unbound, but some are (see below).<br>
><br>
> THe only reason I was upgrading was do to some other erros seen with<br>
> map-inverted-index that returned nils (though there is a way to do a<br>
> cleanup of those).<br>
><br>
> I hope that Leslie can shed more light. Is there a way to set the<br>
> 'regsiter' flag?<br>
><br>
> Yarek<br>
><br>
><br>
> #<DB-BDB::BDB-STORE-CONTROLLER {10024ADF61}><br>
> --------------------<br>
> Class: #<STANDARD-CLASS DB-BDB::BDB-STORE-CONTROLLER><br>
> --------------------<br>
> All Slots:<br>
> BTREES = #<SB-ALIEN-INTERNALS:ALIEN-VALUE :SAP<br>
> #X006417A0 :TYPE (* T)> [set value] [make unbound]<br>
> CID-SEQ = #<SB-ALIEN-INTERNALS:ALIEN-VALUE :SAP<br>
> #X006439A0 :TYPE (* T)> [set value] [make unbound]<br>
> DB = #<SB-ALIEN-INTERNALS:ALIEN-VALUE :SAP<br>
> #X00641060 :TYPE (* T)> [set value] [make unbound]<br>
> DB-VERSION = 100 [set value] [make unbound]<br>
> DEADLOCK-DETECT-THREAD = NIL [set value] [make unbound]<br>
> DEADLOCK-PID = NIL [set value] [make unbound]<br>
> DESERIALIZE = ELEPHANT-SERIALIZER2::DESERIALIZE [set<br>
> value] [make unbound]<br>
> DESERIALIZE-FN = #<FUNCTION (SB-C::&OPTIONAL-DISPATCH ..)><br>
> [set value] [make unbound]<br>
> DUP-BTREES = #<SB-ALIEN-INTERNALS:ALIEN-VALUE :SAP<br>
> #X00641EE0 :TYPE (* T)> [set value] [make unbound]<br>
> ENVIRONMENT = #<SB-ALIEN-INTERNALS:ALIEN-VALUE :SAP<br>
> #X0063F320 :TYPE (* T)> [set value] [make unbound]<br>
> GC-MARK-LIST = NIL [set value] [make unbound]<br>
> GC-MARK-TABLE = NIL [set value] [make unbound]<br>
> GC-MARKING-P = NIL [set value] [make unbound]<br>
> GC-MAX-OID = NIL [set value] [make unbound]<br>
> INDEX-TABLE = #<BDB-BTREE oid:-2> [set value] [make<br>
> unbound]<br>
> INDICES = #<SB-ALIEN-INTERNALS:ALIEN-VALUE :SAP<br>
> #X00642620 :TYPE (* T)> [set value] [make unbound]<br>
> INDICES-ASSOC = #<SB-ALIEN-INTERNALS:ALIEN-VALUE :SAP<br>
> #X00642D60 :TYPE (* T)> [set value] [make unbound]<br>
> INSTANCE-CACHE = #<HASH-TABLE :TEST EQL :COUNT 8<br>
> {100271C671}> [set value] [make unbound]<br>
> INSTANCE-CACHE-LOCK = #S(SB-THREAD:MUTEX :NAME NIL :%OWNER<br>
> NIL :STATE 0) [set value] [make unbound]<br>
> INSTANCE-CLASS-INDEX = #<BDB-BTREE-INDEX oid:1> [set value] [make<br>
> unbound]<br>
> INSTANCE-TABLE = #<BDB-INDEXED-BTREE oid:-3> [set value]<br>
> [make unbound]<br>
> METADATA = #<SB-ALIEN-INTERNALS:ALIEN-VALUE :SAP<br>
> #X006409B0 :TYPE (* T)> [set value] [make unbound]<br>
> OID-DB = #<SB-ALIEN-INTERNALS:ALIEN-VALUE :SAP<br>
> #X006434E0 :TYPE (* T)> [set value] [make unbound]<br>
> OID-SEQ = #<SB-ALIEN-INTERNALS:ALIEN-VALUE :SAP<br>
> #X00643B70 :TYPE (* T)> [set value] [make unbound]<br>
> ROOT = #<BDB-BTREE oid:-1> [set value] [make<br>
> unbound]<br>
> SCHEMA-CACHE = #<HASH-TABLE :TEST EQ :COUNT 0<br>
> {100271C561}> [set value] [make unbound]<br>
> SCHEMA-CACHE-LOCK = #S(SB-THREAD:MUTEX :NAME NIL :%OWNER<br>
> NIL :STATE 0) [set value] [make unbound]<br>
> SCHEMA-CLASSES = NIL [set value] [make unbound]<br>
> SCHEMA-NAME-INDEX = #<BDB-BTREE-INDEX oid:0> [set value] [make<br>
> unbound]<br>
> SCHEMA-TABLE = #<BDB-INDEXED-BTREE oid:-4> [set value]<br>
> [make unbound]<br>
> SERIALIZE = ELEPHANT-SERIALIZER2::SERIALIZE [set value]<br>
> [make unbound]<br>
> SERIALIZE-FN = #<FUNCTION ELEPHANT-SERIALIZER2::SERIALIZE><br>
> [set value] [make unbound]<br>
> SERIALIZER-VERSION = 2 [set value] [make unbound]<br>
> SPEC = (:BDB "/home/yarek/lisp/projects/zzz/data/<br>
> store/" :RECOVER NIL) [set value] [make unbound]<br>
><br>
><br>
><br>
><br>
> On Tue, Mar 10, 2009 at 2:50 PM, Ian Eslick <<a href="mailto:eslick@media.mit.edu" target="_blank">eslick@media.mit.edu</a>><br>
> wrote:<br>
> Unfortunately that's not a highly informative backtrace. Did you<br>
> upgrade to the latest, and this caused it, or did something suddenly<br>
> change that caused the January '09 version to work?<br>
><br>
> Some possible sources of these problems:<br>
><br>
> 1) Somehow the 'register' flag that helps support multiple processes<br>
> is causing problems; it is no longer set by default I believe.<br>
> (Leslie may know more)<br>
><br>
> 2) The store-controller is not being opened properly. Are all the<br>
> slots set in the controller after the second process is opened?<br>
><br>
> Can you be more specific about what changed between January and now?<br>
><br>
> Ian<br>
><br>
> On Mar 10, 2009, at 5:31 PM, Yarek Kowalik wrote:<br>
><br>
> > Hi folks,<br>
> ><br>
> > I have two processes accessing the same BDB. One process manages<br>
> > weblocks requests on port 80, the other on port 443. In the elephant<br>
> > from last January, I was able to start, connect and use BDB from<br>
> > both processes. Now, when I the user is redirected to port 443 and<br>
> > the process tries to retrieve data from the BDB, I get a<br>
> > DB_RUNRECOVERY error (see trace below). This happens when the port<br>
> > 443 porcess connects for the very first time to BDB.<br>
> ><br>
> > I think I have seen this before, and I think it had to do with some<br>
> > default configuration on the controler, some argument that forced<br>
> > the BDB into the recovery mode when process first starts up.<br>
> ><br>
> > Any idea how to resolve this? It's killing my secure connection on<br>
> > my web app - it's urgent.<br>
> ><br>
> > Thanks,<br>
> ><br>
> > Yarek<br>
> ><br>
> ><br>
> ><br>
> > Berkeley DB error #-30974: DB_RUNRECOVERY: Fatal error, run database<br>
> > recovery<br>
> > [Condition of type ELEPHANT:BDB-DB-ERROR]<br>
> ><br>
> > Restarts:<br>
> > 0: [TERMINATE-THREAD] Terminate this thread (#<THREAD "hunchentoot-<br>
> > worker-6" RUNNING {B6CD101}>)<br>
> ><br>
> > Backtrace:<br>
> > 0: ((LAMBDA (SWANK-BACKEND::DEBUGGER-LOOP-FN)) #<FUNCTION (LAMBDA<br>
> > #) {AD4FBA5}>)<br>
> > 1: (SWANK::DEBUG-IN-EMACS #<ELEPHANT:BDB-DB-ERROR {B729BF9}>)<br>
> > 2: ((LAMBDA (SWANK-BACKEND::HOOK SWANK-BACKEND::FUN)) #<FUNCTION<br>
> > SWANK:SWANK-DEBUGGER-HOOK> #<CLOSURE (LAMBDA #) {B729FED}>)<br>
> > 3: (SWANK::CALL-WITH-REDIRECTED-IO #<SWANK::CONNECTION {AF23819}><br>
> > #<CLOSURE (LAMBDA #) {B729FFD}>)<br>
> > 4: (SWANK::CALL-WITH-CONNECTION #<SWANK::CONNECTION {AF23819}><br>
> > #<CLOSURE (LAMBDA #) {B729FED}>)<br>
> > 5: (SWANK:INVOKE-SLIME-DEBUGGER #<ELEPHANT:BDB-DB-ERROR<br>
> {B729BF9}>)<br>
> > 6: ((LAMBDA (SWANK-BACKEND::HOOK SWANK-BACKEND::FUN)) #<FUNCTION<br>
> > SWANK:SWANK-DEBUGGER-HOOK> #<CLOSURE (LAMBDA #) {B729FCD}>)<br>
> > 7: (INVOKE-DEBUGGER #<ELEPHANT:BDB-DB-ERROR {B729BF9}>)<br>
> > 8: (INVOKE-DEBUGGER #<ELEPHANT:BDB-DB-ERROR {B729BF9}>)[:EXTERNAL]<br>
> > 9: ((SB-PCL::FAST-METHOD HUNCHENTOOT:MAYBE-INVOKE-DEBUGGER (T))<br>
> > #<unavailable argument> #<unavailable argument> #<ELEPHANT:BDB-DB-<br>
> > ERROR {B729BF9}>)<br>
> > 10: (SIGNAL #<ELEPHANT:BDB-DB-ERROR {B729BF9}>)[:EXTERNAL]<br>
> > 11: (ERROR #<ELEPHANT:BDB-DB-ERROR {B729BF9}>)[:EXTERNAL]<br>
> > 12: ((FLET #:LAMBDA43) #<ELEPHANT:BDB-DB-ERROR {B729BF9}>)<br>
> > 13: ((FLET #:LAMBDA43) #<ELEPHANT:BDB-DB-ERROR {B729BF9}>)<br>
> [:EXTERNAL]<br>
> > 14: (SIGNAL #<ELEPHANT:BDB-DB-ERROR {B729BF9}>)[:EXTERNAL]<br>
> > 15: (ERROR ELEPHANT:BDB-DB-ERROR)[:EXTERNAL]<br>
> > Locals:<br>
> > SB-DEBUG::ARG-0 = 3<br>
> > SB-DEBUG::ARG-1 = ELEPHANT:BDB-DB-ERROR<br>
> > 16: ((SB-PCL::FAST-METHOD ELEPHANT:GET-VALUE (T DB-BDB::BDB-BTREE))<br>
> > #<unavailable lambda list>)<br>
> > [No Locals]<br>
> > 17: (ELEPHANT::ENSURE-SLOT-DEF-INDEX #<unavailable argument><br>
> > #<unavailable argument>)<br>
> > Locals:<br>
> > SB-DEBUG::ARG-0 = :<NOT-AVAILABLE><br>
> > SB-DEBUG::ARG-1 = :<NOT-AVAILABLE><br>
> > 18: ((SB-PCL::FAST-METHOD ELEPHANT:FIND-INVERTED-INDEX<br>
> > (ELEPHANT:PERSISTENT-METACLASS T)) #<unavailable argument><br>
> > #<unavailable argument> #<unavailable argument> #<unavailable<br>
> > argument>)[:EXTERNAL]<br>
> > Locals:<br>
> > SB-DEBUG::ARG-0 = :<NOT-AVAILABLE><br>
> > SB-DEBUG::ARG-1 = :<NOT-AVAILABLE><br>
> > SB-DEBUG::ARG-2 = :<NOT-AVAILABLE><br>
> > SB-DEBUG::ARG-3 = :<NOT-AVAILABLE><br>
> > SB-DEBUG::ARG-4 = :<NOT-AVAILABLE><br>
> > 19: (ELEPHANT:MAP-INVERTED-INDEX #<unavailable argument><br>
> > #<unavailable argument> #<unavailable argument>)[:EXTERNAL]<br>
> > Locals:<br>
> > SB-DEBUG::ARG-0 = :<NOT-AVAILABLE><br>
> > SB-DEBUG::ARG-1 = :<NOT-AVAILABLE><br>
> > SB-DEBUG::ARG-2 = :<NOT-AVAILABLE><br>
> > SB-DEBUG::ARG-3 = :<NOT-AVAILABLE><br>
> ><br>
> ><br>
> ><br>
> > _______________________________________________<br>
> > elephant-devel site list<br>
> > <a href="mailto:elephant-devel@common-lisp.net" target="_blank">elephant-devel@common-lisp.net</a><br>
> > <a href="http://common-lisp.net/mailman/listinfo/elephant-devel" target="_blank">http://common-lisp.net/mailman/listinfo/elephant-devel</a><br>
><br>
><br>
> _______________________________________________<br>
> elephant-devel site list<br>
> <a href="mailto:elephant-devel@common-lisp.net" target="_blank">elephant-devel@common-lisp.net</a><br>
> <a href="http://common-lisp.net/mailman/listinfo/elephant-devel" target="_blank">http://common-lisp.net/mailman/listinfo/elephant-devel</a><br>
><br>
> _______________________________________________<br>
> elephant-devel site list<br>
> <a href="mailto:elephant-devel@common-lisp.net" target="_blank">elephant-devel@common-lisp.net</a><br>
> <a href="http://common-lisp.net/mailman/listinfo/elephant-devel" target="_blank">http://common-lisp.net/mailman/listinfo/elephant-devel</a><br>
<br>
<br>
_______________________________________________<br>
elephant-devel site list<br>
<a href="mailto:elephant-devel@common-lisp.net" target="_blank">elephant-devel@common-lisp.net</a><br>
<a href="http://common-lisp.net/mailman/listinfo/elephant-devel" target="_blank">http://common-lisp.net/mailman/listinfo/elephant-devel</a><br>
<br>
<br>
</blockquote>
<br>
</div></div></blockquote></div><br>