Bugfix for rare crashes in Spread ...

John Schultz <[email protected]> Tue, 24 Sep 2013 17:57:20 -0400
Newsgroups gmane.network.spread.user
Message-ID <[email protected]>
Over the years, there have been intermittent and rare reports of Spread failing or getting hung during a membership when there is significant loss on the network.  We recently discovered a bug that might be behind many of these different errors.

I'm posting this fix to the list to document it and for anyone who wants to fix their source version of Spread.  This fix will go out in all future versions.

Index: daemon/membership.c
===================================================================
--- daemon/membership.c	(revision 583)
+++ daemon/membership.c	(working copy)
@@ -2213,6 +2213,7 @@
 	My_aru = Last_discarded;
 	for( i=Last_discarded+1; i <= Highest_seq; i++ )
 	{
+		pack_entry = i & PACKET_MASK;
 		if( !Packets[pack_entry].exist ) break;
 		My_aru++;
 	}


Cheers!

-----
John Lane Schultz
Spread Concepts LLC
Cell: 443 838 2200