[DGD] Circular Object Links
Blain
blain20 at gmail.com
Sat Apr 20 11:30:44 CEST 2013
Hello:
I put some functions in objregd so I could inspect the contents of the
links mapping and gather up all objects of a given user for debugging. I
found a problem. Just to be sure it wasn't something I did on accident, I
tested it with a stock kernel-networking klib and it also had the problem.
The function I put into objregd for testing simply grabs the link for the
given owner and then loops through link->_Q_next() and builds an array.
The first time I did this, I ran out of ticks. So to inspect what was
going on, I put in a if(!random(100) break; The result was an array with
my wiztool and tons of "/usr/admin/_code" objects. So it would appear that
/usr/admin/_code points to itself for next and prev (I switch to use
_Q_prev() just to be sure). Is this normal for an LWO to only point to
itself, yet other persistent objects point to LWO's? I wonder if this can
cause problems elsewhere... I'm wondering if the proper fix is to exclude
LWO's from the objregd or maybe keep them in a separate links list, or if
they should properly update their next/prev links to other objects. I
don't think the latter is good because LWO's are deallocated. However, I'm
wondering if my wiztool is keeping the _code LWO alive since it points to
it (or a copy of it).
Curious.
--Blain
More information about the DGD
mailing list