From jschultz at spread.org Wed May 16 01:29:51 2018 From: jschultz at spread.org (jschultz at spread.org) Date: Wed, 16 May 2018 01:29:51 -0400 Subject: [Spread-cvs] commit: r899 - trunk/daemon Message-ID: Author: jschultz Date: 2018-05-16 01:29:50 -0400 (Wed, 16 May 2018) New Revision: 899 Modified: trunk/daemon/membership.c trunk/daemon/protocol.c Log: Merging membership bug fix into trunk svn merge -r895:896 svn+ssh://svn.spread.org/spread/branches/work_4_4_1 . > r896 | jschultz | 2018-03-28 01:00:40 -0400 (Wed, 28 Mar 2018) | 5 lines > > Attempted bugfix for new packets received after sending form1 that are not reflected on form2 > -- Handle when our Highest_seq is higher than what is on form2 > -- Recompute My_aru due to dropping of such packets (old code didn't do this when we dropped such packets still marked as holes on form2) > Changed some int's -> int32's that are used for indexing packet sequences Modified: trunk/daemon/membership.c =================================================================== --- trunk/daemon/membership.c 2018-03-29 16:00:25 UTC (rev 898) +++ trunk/daemon/membership.c 2018-05-16 05:29:50 UTC (rev 899) @@ -2018,7 +2018,9 @@ int tot_len; proc p; int ret; - int i; + int32 i; + int32 my_aru; + int32 my_aru2; int32 memb_time = 0; num_bytes = 0; @@ -2165,10 +2167,52 @@ Prot_set_prev_proc(&Future_membership); FC_new_configuration( ); - Alarmp( SPLOG_INFO, MEMB, "Read_form2: updating Highest_seq %d -> %d; Aru %d -> %d\n", Highest_seq, my_rg_info->highest_seq, Aru, my_rg_info->aru ); + Alarmp( SPLOG_INFO, MEMB, "Read_form2: updating Highest_seq %d -> %d; Aru %d -> %d based on token contents (Last_discarded %d, My_aru %d)\n", + Highest_seq, my_rg_info->highest_seq, Aru, my_rg_info->aru, Last_discarded, My_aru ); - Highest_seq = my_rg_info->highest_seq; - Aru = my_rg_info->aru; + /* NOTE: forget packets that arrived after this daemon sent its form1 token and aren't reflected on the form2 token at all (i.e. - Highest_seq is higher than token's) */ + + for ( ; Highest_seq > my_rg_info->highest_seq; --Highest_seq ) + { + pack_entry = Highest_seq & PACKET_MASK; + + if ( !Packets[ pack_entry ].exist ) + continue; + + if ( 1 != Packets[ pack_entry ].exist ) + Alarmp( SPLOG_FATAL, MEMB, "Read_form2: dropping %d (> my_rg_info->highest_seq %d), but its .exist (%d) != 1\n", + Highest_seq, my_rg_info->highest_seq, Packets[ pack_entry ].exist ); + + if ( !Memb_is_equal( Packets[ pack_entry ].head->memb_id, Membership_id ) ) + Alarmp( SPLOG_FATAL, MEMB, "Read_form2: dropping %d (> my_rg_info->highest_seq %d), but it's memb_id (0x%08X, %d) is wrong (0x%08X, %d)!\n", + Highest_seq, my_rg_info->highest_seq, Packets[ pack_entry ].head->memb_id.proc_id, Packets[ pack_entry ].head->memb_id.time, + Membership_id.proc_id, Membership_id.time ); + + if ( Packets[ pack_entry ].head->seq != Highest_seq ) + Alarmp( SPLOG_FATAL, MEMB, "Read_form2: dropping %d (> my_rg_info->highest_seq %d), but I have an entry for it in Packets, but it's seq (%d) is wrong!\n", + Highest_seq, my_rg_info->highest_seq, Packets[ pack_entry ].head->seq ); + + if ( Conf_proc_by_id_in_conf( &Future_membership, Packets[ pack_entry ].head->proc_id, &p ) != -1 ) + Alarmp( SPLOG_FATAL, MEMB, "Read_form2: dropping %d (> my_rg_info->highest_seq %d), but sender (0x%08X) is on the token!\n", + Highest_seq, my_rg_info->highest_seq, Packets[pack_entry].head->proc_id ); + + Alarmp( SPLOG_INFO, MEMB, "Read_form2: Dropping packet %d (> my_rg_info->highest_seq %d) from partitioning member 0x%08X received after sent FORM1!\n", + Highest_seq, my_rg_info->highest_seq, Packets[ pack_entry ].head->proc_id ); + + Packets[ pack_entry ].exist = 0; + dispose( Packets[ pack_entry ].head ); + dispose( Packets[ pack_entry ].body ); + } + + if ( My_aru > my_rg_info->highest_seq ) + { + Alarmp( SPLOG_INFO, MEMB, "Read_form2: updating My_aru %d -> %d (my_rg_info->highest_seq)\n", My_aru, my_rg_info->highest_seq ); + My_aru = my_rg_info->highest_seq; + } + + Highest_seq = my_rg_info->highest_seq; /* above loop already lowered Highest_seq as necessary; other daemons can raise Highest_seq through token */ + Aru = my_rg_info->aru; /* other daemons should only lower Aru through token */ + /* Note: this call to Discard_packets handles delivery of all the messages * from the old membership with sequence numbers prior to the old Aru. */ @@ -2184,6 +2228,10 @@ if( Packets[pack_entry].exist != 0 ) { + if ( 1 != Packets[ pack_entry ].exist ) + Alarmp( SPLOG_FATAL, MEMB, "Read_form2: %d is a hole on token, but I have it, but its .exist (%d) != 1\n", + *my_holes_procs_ptr, Packets[ pack_entry ].exist ); + if ( !Memb_is_equal( Packets[pack_entry].head->memb_id, Membership_id ) ) Alarmp( SPLOG_FATAL, MEMB, "Read_form2: %d is a hole on token, but I have it, but it's memb_id (0x%08X, %d) is wrong (0x%08X, %d)!\n", *my_holes_procs_ptr, Packets[pack_entry].head->memb_id.proc_id, Packets[pack_entry].head->memb_id.time, @@ -2203,7 +2251,7 @@ * consistent across all daemons, all who did get it must now forget it. This won't * violate any form of self delivery because the originator is not in this attempt. */ - Alarmp( SPLOG_WARNING, MEMB, "Read_form2: WARNING!!! Dropping packet %d from partitioning member 0x%08X received after FORM1 processed!\n", + Alarmp( SPLOG_INFO, MEMB, "Read_form2: Dropping packet %d from partitioning member 0x%08X received after FORM1 processed!\n", *my_holes_procs_ptr, Packets[pack_entry].head->proc_id ); dispose( Packets[pack_entry].head ); @@ -2214,6 +2262,41 @@ my_holes_procs_ptr++; } + /* recompute My_aru and validate .exist across (Last_discarded, Highest_seq]; NOTE: above dropping of packets recorded as holes could require lowering My_aru */ + + for ( my_aru = i = Last_discarded, my_aru2 = My_aru; ++i <= Highest_seq; ) + { + switch ( Packets[ i & PACKET_MASK ].exist ) + { + case 1: + case 2: + if ( i == my_aru + 1 ) + my_aru = i; + break; + + case 0: + case 3: + if ( my_aru2 >= i ) + my_aru2 = i - 1; + break; + + default: + Alarmp( SPLOG_FATAL, MEMB, "Read_form2: Unexpected .exist (%d) at seq %d; Last_discarded (%d); Highest_seq (%d)\n", + Packets[ i & PACKET_MASK ].exist, i, Last_discarded, Highest_seq ); + break; + } + } + + if ( my_aru != my_aru2 ) + Alarmp( SPLOG_FATAL, MEMB, "Read_form2: unexpected My_aru (%d) value based off of Last_discarded (%d), Highest_seq (%d) and Packets[].exist; (my_aru %d, my_aru2 %d)\n", + My_aru, Last_discarded, Highest_seq, my_aru, my_aru2 ); + + if ( my_aru != My_aru ) + { + Alarmp( SPLOG_INFO, MEMB, "Read_form2: updating My_aru %d -> %d based off of Packets (probably due to dropping packets from partitioning members)\n", My_aru, my_aru ); + My_aru = my_aru; + } + /* extract future commit set (and future trans membership) */ Future_commit_set.num_members = my_rg_info->num_commit; Future_commit_set.num_pending = my_rg_info->num_trans; @@ -2460,11 +2543,10 @@ static void Backoff_membership( void ) { int pack_entry; - int i; + int32 i; Alarmp( SPLOG_INFO, MEMB, "Backoff_membership entered: Last_discarded = %d; Highest_seq = %d; Aru = %d; My_aru = %d\n", Last_discarded, Highest_seq, Aru, My_aru ); - pack_entry=-1; for( i=Last_discarded+1; i <= Highest_seq; i++ ) { /* clear dummy messages */ Modified: trunk/daemon/protocol.c =================================================================== --- trunk/daemon/protocol.c 2018-03-29 16:00:25 UTC (rev 898) +++ trunk/daemon/protocol.c 2018-05-16 05:29:50 UTC (rev 899) @@ -1526,7 +1526,7 @@ { int pack_entry; int end_seq; - int i; + int32 i; if ( Memb_state() == EVS ) return; if ( Prot_delivery_threshold > RELIABLE_TYPE ) return; @@ -1560,7 +1560,7 @@ /* deliver all non-safe packets that are ordered and not delivered */ int pack_entry; - int i; + int32 i; if ( My_aru <= Last_delivered ) return; if ( Memb_state() == EVS ) return; @@ -1600,7 +1600,7 @@ packet_body *body_ptr; up_queue *up_ptr; int proc_index; - int i; + int32 i; if ( Aru <= Last_discarded ) return; if ( Memb_state() == EVS ) From jschultz at spread.org Wed May 16 01:51:37 2018 From: jschultz at spread.org (jschultz at spread.org) Date: Wed, 16 May 2018 01:51:37 -0400 Subject: [Spread-cvs] commit: r900 - in trunk: . daemon Message-ID: Author: jschultz Date: 2018-05-16 01:51:37 -0400 (Wed, 16 May 2018) New Revision: 900 Modified: trunk/Readme.txt trunk/daemon/Changelog trunk/daemon/spread_params.h trunk/release_announcement_5.0.txt Log: Updates for patch release of 5.0.1 Modified: trunk/Readme.txt =================================================================== --- trunk/Readme.txt 2018-05-16 05:29:50 UTC (rev 899) +++ trunk/Readme.txt 2018-05-16 05:51:37 UTC (rev 900) @@ -49,9 +49,14 @@ | WWW : http://www.spread.org and http://www.spreadconcepts.com | | Contact: info at spreadconcepts.com | | | -| Version 5.0.0 built 1/Feb/2017 | +| Version 5.0.1 built 16/May/2018 | \=============================================================================/ +May 16, 2018 Ver 5.0.1 +---------------------- + +Bugfix in membership to drop messages we receive after sending form1 that are not on the form2 token. + February 1, 2017 Ver 5.0.0 -------------------------- Modified: trunk/daemon/Changelog =================================================================== --- trunk/daemon/Changelog 2018-05-16 05:29:50 UTC (rev 899) +++ trunk/daemon/Changelog 2018-05-16 05:51:37 UTC (rev 900) @@ -1,3 +1,13 @@ +May 16, 2018 Ver 5.0.1 +---------------------- + +r896 | jschultz | 2018-03-28 01:00:40 -0400 (Wed, 28 Mar 2018) | 5 lines + +Attempted bugfix for new packets received after sending form1 that are not reflected on form2 + -- Handle when our Highest_seq is higher than what is on form2 + -- Recompute My_aru due to dropping of such packets (old code didn't do this when we dropped such packets still marked as holes on form2) +Changed some int's -> int32's that are used for indexing packet sequences + February 1, 2017 Ver 5.0.0 -------------------------- Modified: trunk/daemon/spread_params.h =================================================================== --- trunk/daemon/spread_params.h 2018-05-16 05:29:50 UTC (rev 899) +++ trunk/daemon/spread_params.h 2018-05-16 05:51:37 UTC (rev 900) @@ -39,11 +39,11 @@ #define SP_MAJOR_VERSION 5 #define SP_MINOR_VERSION 0 -#define SP_PATCH_VERSION 0 +#define SP_PATCH_VERSION 1 #define SPREAD_PROTOCOL 3 -#define SPREAD_BUILD_DATE "1/Feb/2017" +#define SPREAD_BUILD_DATE "16/May/2018" #define DEFAULT_SPREAD_PORT 4803 Modified: trunk/release_announcement_5.0.txt =================================================================== --- trunk/release_announcement_5.0.txt 2018-05-16 05:29:50 UTC (rev 899) +++ trunk/release_announcement_5.0.txt 2018-05-16 05:51:37 UTC (rev 900) @@ -1,9 +1,9 @@ -Spread 5.0.0 http://www.spread.org +Spread 5.0.1 http://www.spread.org -Spread Concepts LLC is happy to announce a new version, 5.0.0, of +Spread Concepts LLC is happy to announce a new version, 5.0.1, of The Spread Toolkit. It can be downloaded here: -http://www.spread.org/download/spread-src-5.0.0.tar.gz +http://www.spread.org/download/spread-src-5.0.1.tar.gz Spread 5 is an important release that adds support for IPv6. From jschultz at spread.org Wed May 16 01:52:36 2018 From: jschultz at spread.org (jschultz at spread.org) Date: Wed, 16 May 2018 01:52:36 -0400 Subject: [Spread-cvs] commit: r901 - tags Message-ID: Author: jschultz Date: 2018-05-16 01:52:36 -0400 (Wed, 16 May 2018) New Revision: 901 Added: tags/REL_5_0_1/ Log: Tagging trunk as new 5.0.1 release From jschultz at spread.org Wed May 16 01:57:01 2018 From: jschultz at spread.org (jschultz at spread.org) Date: Wed, 16 May 2018 01:57:01 -0400 Subject: [Spread-cvs] commit: r902 - in branches/work_4_4_1: . daemon Message-ID: Author: jschultz Date: 2018-05-16 01:57:01 -0400 (Wed, 16 May 2018) New Revision: 902 Modified: branches/work_4_4_1/Readme.txt branches/work_4_4_1/daemon/Changelog branches/work_4_4_1/daemon/spread_params.h branches/work_4_4_1/release_announcement_4.4.txt Log: Updates for release of 4.4.1 release Modified: branches/work_4_4_1/Readme.txt =================================================================== --- branches/work_4_4_1/Readme.txt 2018-05-16 05:52:36 UTC (rev 901) +++ branches/work_4_4_1/Readme.txt 2018-05-16 05:57:01 UTC (rev 902) @@ -49,9 +49,14 @@ | WWW : http://www.spread.org and http://www.spreadconcepts.com | | Contact: info at spreadconcepts.com | | | -| Version 4.4.0 built 27/May/2014 | +| Version 4.4.1 built 17/May/2018 | \=============================================================================/ +May 17, 2018 Ver 4.4.1 +---------------------- + +Bugfix in membership to drop messages we receive after sending form1 that are not on the form2 token. + May 27, 2014 Ver 4.4.0 ---------------------- Modified: branches/work_4_4_1/daemon/Changelog =================================================================== --- branches/work_4_4_1/daemon/Changelog 2018-05-16 05:52:36 UTC (rev 901) +++ branches/work_4_4_1/daemon/Changelog 2018-05-16 05:57:01 UTC (rev 902) @@ -1,3 +1,13 @@ +May 16, 2018 Ver 4.4.1 +---------------------- + +r896 | jschultz | 2018-03-28 01:00:40 -0400 (Wed, 28 Mar 2018) | 5 lines + +Attempted bugfix for new packets received after sending form1 that are not reflected on form2 + -- Handle when our Highest_seq is higher than what is on form2 + -- Recompute My_aru due to dropping of such packets (old code didn't do this when we dropped such packets still marked as holes on form2) +Changed some int's -> int32's that are used for indexing packet sequences + May 27, 2014 Ver 4.4.0 ---------------------- Modified: branches/work_4_4_1/daemon/spread_params.h =================================================================== --- branches/work_4_4_1/daemon/spread_params.h 2018-05-16 05:52:36 UTC (rev 901) +++ branches/work_4_4_1/daemon/spread_params.h 2018-05-16 05:57:01 UTC (rev 902) @@ -39,11 +39,11 @@ #define SP_MAJOR_VERSION 4 #define SP_MINOR_VERSION 4 -#define SP_PATCH_VERSION 0 +#define SP_PATCH_VERSION 1 #define SPREAD_PROTOCOL 3 -#define SPREAD_BUILD_DATE "27/May/2014" +#define SPREAD_BUILD_DATE "16/May/2018" #define DEFAULT_SPREAD_PORT 4803 Modified: branches/work_4_4_1/release_announcement_4.4.txt =================================================================== --- branches/work_4_4_1/release_announcement_4.4.txt 2018-05-16 05:52:36 UTC (rev 901) +++ branches/work_4_4_1/release_announcement_4.4.txt 2018-05-16 05:57:01 UTC (rev 902) @@ -1,7 +1,7 @@ -Spread 4.4.0 http://www.spread.org +Spread 4.4.1 http://www.spread.org Spread Concepts LLC is happy to announce the release of a -new version, 4.4.0, of The Spread Toolkit. +new version, 4.4.1, of The Spread Toolkit. The Spread 4.4 version is an important release that incorporates a new, accelerated ring protocol. This protocol is tailored for data center networks From jschultz at spread.org Wed May 16 01:57:40 2018 From: jschultz at spread.org (jschultz at spread.org) Date: Wed, 16 May 2018 01:57:40 -0400 Subject: [Spread-cvs] commit: r903 - tags Message-ID: Author: jschultz Date: 2018-05-16 01:57:39 -0400 (Wed, 16 May 2018) New Revision: 903 Added: tags/REL_4_4_1/ Log: Adding tag for 4.4.1 release