[DGD] dump/restore

bart at wotf.org bart at wotf.org
Sun Dec 23 03:12:05 CET 2007


Sorry for bugging you some more about this, trying to understand better what I
am looking at..

If obj->count is 0, that would indicate the object being destroyed, no?

After reading a lot more, adding some logging of what is happening, I found
that when DGD complains it can't read from its swapfile, I have ended up with
an object in the statedump with count == 0, and indeed trying to destruct it
gives a 'Destructing destructed object' error. At times it doesn't fail like
that, but with a sig 11 when trying to read the dataspace for the object, but
in that case again count is 0 for that object, and trying to destruct it gives
the expected error.

Obviously, the next thing for me to track down is why it is still there and
why there are still references to the object while it seems to be destructed
already. Oh, the object in question is a connection object, so I bet I'll find
the cause in the network patch.

Anyway, thanks for your patience and explanation so far :)

Bart.

On Sun, 23 Dec 2007 00:35:26 +0100, Felix A. Croes wrote
> bart at wotf.org wrote:
> 
> > While investigating my dump/restore issue, I stumbled upon o_sweep().
> > I noticed it is called after a dump or restore. I'm curious as to why it is
> > called after a dump, I'd somewhat expect it to happen before a dump?
> 
> I'm not sure why you should think so.
> 
> The function accomplishes two things.  First, it marks every object
> as present in the dump file, rather than the swap file.  Second,
> it changes the "count" field of each object and prepares to also
> change it in each object reference later, while the swap file is
> rebuilt.  Running this function just before a state dump, instead
> of just after, would probably turn a lot of object references in
> that state dump into nil values, though if you're lucky and no
> objects were added or removed after the previous statedump, it
> might not.
> 
> Regards,
> Dworkin
> ___________________________________________
> https://mail.dworkin.nl/mailman/listinfo/dgd

--
Created with Open WebMail at http://www.bartsplace.net/
Read my weblog at http://soapbox.bartsplace.net/



More information about the DGD mailing list