From 0a8821a1c60e1b08977a2403e88a152849640e7a Mon Sep 17 00:00:00 2001 From: Scott Lystig Fritchie Date: Thu, 16 Jul 2015 23:23:30 +0900 Subject: [PATCH] WIP: bugfix for rare flapping infinite loop (fixed I hope) I'll run a set of PULSE tests (Cmd_e of the 'regression' style) to try to confirm a fix for this pernicious little thing. Final (?) part of the fix: add myself to SeenFlappers in react_to_env_A30(). --- src/machi_chain_manager1.erl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/machi_chain_manager1.erl b/src/machi_chain_manager1.erl index 6d24a4d..b6c091a 100644 --- a/src/machi_chain_manager1.erl +++ b/src/machi_chain_manager1.erl @@ -987,7 +987,7 @@ react_to_env_A30(Retries, P_latest, LatestUnanimousP, _ReadExtra, PossibleFlappers = All_list -- Down_list, SeenFlappers = [FLU || {FLU, {{{epk,_},_}, Cnt}} <- AllFlapCounts, - Cnt >= FlapLimit], + Cnt >= FlapLimit] ++ [MyName], FlappingAll = (PossibleFlappers -- SeenFlappers) == [], ?V("~w,", [{'YOYO',MyName,NewEpoch,FlappingAll}]), @@ -995,6 +995,11 @@ react_to_env_A30(Retries, P_latest, LatestUnanimousP, _ReadExtra, flapping_all=FlappingAll}, ?REACT({a30, ?LINE, [flap_continue, {flapping_me, true}, + {all_list, All_list}, + {down_list, Down_list}, + {possible_flappers, PossibleFlappers}, + {seen_flappers, SeenFlappers}, + {all_flap_counts, AllFlapCounts}, {flapping_all, FlappingAll}]}), %% Put it all together. P_newprop4 = machi_projection:update_checksum(