The key question is why save-snapshot-object doesn't catch the fact that your Hero objects have been 'touched'. What is happening in the touched vector in the snapshot set after each iteration? There isn't too much code; I'd recommend compiling with full debug, putting a break in save-proxy-object and save-snapshot-set and inspecting the values after each step to see what state isn't being recorded that would stop this recursion.
Ian On Mar 20, 2009, at 12:56 AM, Elliott Slaughter wrote: > On Wed, Mar 18, 2009 at 9:18 PM, Ian Eslick <esl...@media.mit.edu> > wrote: > You need to implement register-object for your metaclass, only > standard classes are 'registered' or kept in the ID table. > > Instances of my metaclass still inherit from standard-object, and > are thus registered by the existing register-object methods. I added > some print statements to register-object, and the IDs do seem to get > registered properly (i.e. it returns the same id for the same > instance over many calls). > > (And the stack overflow doesn't occur when I register my objects, > but afterwards when I call snapshot.) > > Here is a sample of the stack trace, in case it is helpful. Again, > any assistance would be appreciated. > > 3070: (ELEPHANT::REIFY-VALUE #<HERO {23EDF561}> #<SNAPSHOT-SET oid:2>) > 3071: (ELEPHANT::SAVE-PROXY-OBJECT > #<HERO-BODY {23EDF551}> > #<SNAPSHOT-SET oid:2>) > 3072: (ELEPHANT::SAVE-SNAPSHOT-OBJECT > 1534 > #<HERO-BODY {23EDF551}> > #<SNAPSHOT-SET oid:2>) > 3073: (ELEPHANT::REIFY-VALUE #<HERO-BODY {23EDF551}> #<SNAPSHOT-SET > oid:2>) > 3074: (ELEPHANT::SAVE-PROXY-OBJECT #<HERO {23EDF561}> #<SNAPSHOT-SET > oid:2>) > 3075: (ELEPHANT::SAVE-SNAPSHOT-OBJECT > 1532 > #<HERO {23EDF561}> > #<SNAPSHOT-SET oid:2>) > 3076: (ELEPHANT::REIFY-VALUE #<HERO {23EDF561}> #<SNAPSHOT-SET oid:2>) > 3077: (ELEPHANT::SAVE-PROXY-OBJECT > #<HERO-BODY {23EDF551}> > #<SNAPSHOT-SET oid:2>) > 3078: (ELEPHANT::SAVE-SNAPSHOT-OBJECT > 1534 > #<HERO-BODY {23EDF551}> > #<SNAPSHOT-SET oid:2>) > 3079: (ELEPHANT::REIFY-VALUE #<HERO-BODY {23EDF551}> #<SNAPSHOT-SET > oid:2>) > 3080: (ELEPHANT::SAVE-PROXY-OBJECT #<HERO {23EDF561}> #<SNAPSHOT-SET > oid:2>) > 3081: (ELEPHANT::SAVE-SNAPSHOT-OBJECT > 1532 > #<HERO {23EDF561}> > #<SNAPSHOT-SET oid:2>) > 3082: (ELEPHANT::REIFY-VALUE #<HERO {23EDF561}> #<SNAPSHOT-SET oid:2>) > 3083: (ELEPHANT::SAVE-PROXY-OBJECT > #<HERO-BODY {23EDF551}> > #<SNAPSHOT-SET oid:2>) > 3084: (ELEPHANT::SAVE-SNAPSHOT-OBJECT > 1534 > #<HERO-BODY {23EDF551}> > #<SNAPSHOT-SET oid:2>) > 3085: (ELEPHANT::REIFY-VALUE #<HERO-BODY {23EDF551}> #<SNAPSHOT-SET > oid:2>) > 3086: (ELEPHANT::SAVE-PROXY-OBJECT #<HERO {23EDF561}> #<SNAPSHOT-SET > oid:2>) > 3087: (ELEPHANT::SAVE-SNAPSHOT-OBJECT > 1532 > #<HERO {23EDF561}> > #<SNAPSHOT-SET oid:2>) > 3088: (ELEPHANT::REIFY-VALUE #<HERO {23EDF561}> #<SNAPSHOT-SET oid:2>) > 3089: (ELEPHANT::SAVE-PROXY-OBJECT > #<HERO-BODY {23EDF551}> > #<SNAPSHOT-SET oid:2>) > 3090: (ELEPHANT::SAVE-SNAPSHOT-OBJECT > 1534 > #<HERO-BODY {23EDF551}> > #<SNAPSHOT-SET oid:2>) > 3091: (ELEPHANT::REIFY-VALUE #<HERO-BODY {23EDF551}> #<SNAPSHOT-SET > oid:2>) > 3092: (ELEPHANT::SAVE-PROXY-OBJECT #<HERO {23EDF561}> #<SNAPSHOT-SET > oid:2>) > 3093: (ELEPHANT::SAVE-SNAPSHOT-OBJECT > 1532 > #<HERO {23EDF561}> > #<SNAPSHOT-SET oid:2>) > 3094: (ELEPHANT::REIFY-VALUE #<HERO {23EDF561}> #<SNAPSHOT-SET oid:2>) > 3095: (ELEPHANT::SAVE-PROXY-OBJECT > #<HERO-BODY {23EDF551}> > #<SNAPSHOT-SET oid:2>) > 3096: (ELEPHANT::SAVE-SNAPSHOT-OBJECT > 1534 > #<HERO-BODY {23EDF551}> > #<SNAPSHOT-SET oid:2>) > 3097: (ELEPHANT::REIFY-VALUE #<HERO-BODY {23EDF551}> #<SNAPSHOT-SET > oid:2>) > 3098: (ELEPHANT::SAVE-PROXY-OBJECT #<HERO {23EDF561}> #<SNAPSHOT-SET > oid:2>) > 3099: (ELEPHANT::SAVE-SNAPSHOT-OBJECT > 1532 > #<HERO {23EDF561}> > #<SNAPSHOT-SET oid:2>) > 3100: (ELEPHANT::REIFY-VALUE #<HERO {23EDF561}> #<SNAPSHOT-SET oid:2>) > 3101: (ELEPHANT::SAVE-PROXY-OBJECT > #<HERO-BODY {23EDF551}> > #<SNAPSHOT-SET oid:2>) > 3102: (ELEPHANT::SAVE-SNAPSHOT-OBJECT > 1534 > #<HERO-BODY {23EDF551}> > #<SNAPSHOT-SET oid:2>) > 3103: (ELEPHANT::REIFY-VALUE #<HERO-BODY {23EDF551}> #<SNAPSHOT-SET > oid:2>) > 3104: (ELEPHANT::SAVE-PROXY-OBJECT #<HERO {23EDF561}> #<SNAPSHOT-SET > oid:2>) > 3105: (ELEPHANT::SAVE-SNAPSHOT-OBJECT > 1532 > #<HERO {23EDF561}> > #<SNAPSHOT-SET oid:2>) > > On Mar 18, 2009, at 11:31 PM, Elliott Slaughter wrote: > > > Hi, > > > > I have been exploring using snapshot-set in my application, and > > noticed a couple of issues. > > > > First, snapshot set doesn't compile under SBCL since the cache > > initform includes > > > > (make-hash-table :weak-keys t) > > > > and SBCL doesn't recognize the :weak-keys argument. This is easily > > enough fixed (in the short term) by commenting this out; in the long > > term it may be useful to use trivial-garbage for weak hash-tables. > > > > > > Second, after hacking snapshot-set into my application, and > > following a pause of about 30 seconds, > > > > debugger invoked on a SB-KERNEL::CONTROL-STACK-EXHAUSTED: > > Control stack exhausted (no more space for function call frames). > > This is probably due to heavily nested or infinitely recursive > > function > > calls, or a tail call that SBCL cannot or has not optimized away. > > > > This is on a data set of roughly 2000 objects. The data consists of > > a hash-table from symbols to hash-tables, which map integers to > > instances of a custom metaclass. The data contains circular > > references. (I don't know how complete snapshot-set is, so I don't > > know if any of these are potentially problematic.) > > > > I would include the backtrace except it is over 30,000 calls long. I > > can give the code that calls snapshot-set if that would be helpful. > > > > > > Any advice or assistance would be appreciated. Thanks. > > > > -- > > Elliott Slaughter > > > > "Any road followed precisely to its end leads precisely nowhere." - > > Frank Herbert > > _______________________________________________ > > elephant-devel site list > > elephant-devel@common-lisp.net > > http://common-lisp.net/mailman/listinfo/elephant-devel > > > _______________________________________________ > elephant-devel site list > elephant-devel@common-lisp.net > http://common-lisp.net/mailman/listinfo/elephant-devel > > > > -- > Elliott Slaughter > > "Any road followed precisely to its end leads precisely nowhere." - > Frank Herbert > _______________________________________________ > elephant-devel site list > elephant-devel@common-lisp.net > http://common-lisp.net/mailman/listinfo/elephant-devel _______________________________________________ elephant-devel site list elephant-devel@common-lisp.net http://common-lisp.net/mailman/listinfo/elephant-devel