[Spread-users] RE: Spread on Linux question

Theo Schlossnagle jesus at omniti.com
Tue Jul 12 14:31:01 EDT 2005

Crystal, Mayer wrote:

>Hi Theo,
>	I was finally able to recreate the issue.  It seems if one starts a
>spread daemon, connects to groups and then brings up a separate daemon that
>is when the issue occurs.  I tried the patch that you suggested, and it
>seems to have helped... a little bit at least :(  I'm still getting illegal
>access in some other places now.  It seems that skiplist.c (at least for the
>most part) is not properly cleaning up a bunch of memory.  Are the
>developers aware of this?  
I wouldn't say it is skiplist's fault exactly...  The intention of 
sl_destruct is that it frees everything that was allocated.  The problem 
is that in groups.c sl_destruct is called on a skiplist and then it is 
later used! (after it has been destroyed).  It's an issue of the 
skiplist objects being statically included in the structures in groups.c 
(in my opinion).  But the groups.c needs to be audited to determine the 
reason which a skiplist is destroyed and then referenced.

I wrote most of the code that integrated skiplists into groups.c.  I 
adapted it from the preexisting code that used static arrays.  So, 
whether I adopted this behaviour or induced it is beyond my memory and I 
haven't looked at the code in ages.  If I get some time, I'll take a 
stab at nailing the other valgrind errors you sent.  I have a hectic 
speaking circuit starting up, so I'll be circling the world instead of 
debugging this.

If you are familiar with valgrind (which I assume you are marginally at 
least), I welcome you to take a stab are tracking down the problem.

// Theo Schlossnagle
// Principal Engineer -- http://www.omniti.com/~jesus/
// Ecelerity: Run with it. -- http://www.omniti.com/

More information about the Spread-users mailing list