From 3506b1edcdef4220e90cb9469260fa2c6efb5f86 Mon Sep 17 00:00:00 2001 From: yosoyubik Date: Fri, 10 Feb 2023 14:37:05 +0100 Subject: [PATCH 1/5] ames: fix number of stale flows log --- pkg/arvo/gen/stale-flows.hoon | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/arvo/gen/stale-flows.hoon b/pkg/arvo/gen/stale-flows.hoon index d4d889313..c5e956fd6 100644 --- a/pkg/arvo/gen/stale-flows.hoon +++ b/pkg/arvo/gen/stale-flows.hoon @@ -24,7 +24,7 @@ ~? &(=(%3 veb) (gth (lent v) 1)) "#{<(dec (lent v))>} stale resubs on {}" ?. (gth (lent v) 1) num - (add (lent v) num) + (add (dec (lent v)) num) -- :: :- %say From 93b9423bcc9ca75e4c241d555d4a47bba6e76ef1 Mon Sep 17 00:00:00 2001 From: yosoyubik Date: Fri, 10 Feb 2023 16:13:28 +0100 Subject: [PATCH 2/5] ames: improve logs for stale retries --- pkg/arvo/gen/stale-flows.hoon | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/pkg/arvo/gen/stale-flows.hoon b/pkg/arvo/gen/stale-flows.hoon index c5e956fd6..f7b668b2f 100644 --- a/pkg/arvo/gen/stale-flows.hoon +++ b/pkg/arvo/gen/stale-flows.hoon @@ -49,8 +49,8 @@ :- %tang %- flop %+ weld :~ leaf+"#{<~(wyt in naks)>} flows from %nacking %watches" - leaf+"#{} backward flows with >10 retries" - leaf+"#{} forward flows with >10 retries" + leaf+"#{} live backward flows with (keep retrying)" + leaf+"#{} live forward flows with (keep retrying)" leaf+"#{<(resubs subs veb)>} stale resubscriptions" == ?. =(%21 veb) ~ @@ -76,7 +76,10 @@ :: ++ stale %+ roll ~(tap by snd.peer-state) - |= [[=bone message-pump-state:ames] subs=_subs pags=_p backward=_b forward=_f] + |= $: [=bone message-pump-state:ames] + subs=_subs pags=_p + backward=_b forward=_f + == =, packet-pump-state :- ?~ duct=(~(get by by-bone.ossuary.peer-state) bone) subs ?. ?=([* [%gall %use sub=@ @ %out @ @ nonce=@ pub=@ *] *] u.duct) @@ -90,7 +93,10 @@ :: (weld (scag 7 wire) (slag 8 wire)) %+ roll ~(tap in live) - |= [[* [packet-state:ames *]] pags=_pags out=[b=_backward f=_forward]] + |= $: [[msg=@ frag=@] [packet-state:ames *]] + pags=_pags + out=[b=_backward f=_forward] + == :: :: only forward flows :: @@ -104,7 +110,9 @@ :: ~? &(=(%2 veb) (gth retries 10)) =+ arrow=?:(=(0 (end 0 bone)) "<-" "->") - "{arrow} ({(cite:title ship)}) bone #{}, retries: #{}" + =+ closing=(~(has in closing.peer-state) bone) + %+ weld "{arrow} ({(cite:title ship)}) bone=#{} " + "closing={} msg=#{} frag=#{} #{}" :- pags =? out (gth retries 10) ?: =(0 (end 0 bone)) From c92c2c9279f612fd897738b7b51709dd3b6aac2e Mon Sep 17 00:00:00 2001 From: yosoyubik Date: Fri, 10 Feb 2023 16:19:18 +0100 Subject: [PATCH 3/5] ames: log stale flows in closing state --- pkg/arvo/sys/vane/ames.hoon | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pkg/arvo/sys/vane/ames.hoon b/pkg/arvo/sys/vane/ames.hoon index 02be753f5..345d33c89 100644 --- a/pkg/arvo/sys/vane/ames.hoon +++ b/pkg/arvo/sys/vane/ames.hoon @@ -1935,9 +1935,15 @@ =/ =peer-state:ames ?>(?=(%known -.ship-state) +.ship-state) =/ subs=(jar path [bone sub-nonce=@]) %+ roll ~(tap by snd.peer-state) - |= [[=forward=bone *] subs=(jar path [bone sub-nonce=@])] + |= $: [=forward=bone message-pump-state:ames] + subs=(jar path [bone sub-nonce=@]) + == ?: (~(has in closing.peer-state) forward-bone) - subs + %. subs + %^ trace &(dry odd.veb) ship + |. + %+ weld "stale flow bone={} in closing, " + "#{<~(wyt in live:packet-pump-state)>} packets retrying" ?~ duct=(~(get by by-bone.ossuary.peer-state) forward-bone) subs ?. ?=([* [%gall %use sub=@ @ %out @ @ nonce=@ pub=@ *] *] u.duct) From 21158d6d54dde80db34d08809d638ae377506555 Mon Sep 17 00:00:00 2001 From: yosoyubik Date: Tue, 14 Feb 2023 06:06:41 +0100 Subject: [PATCH 4/5] ames: style fixes and comments --- pkg/arvo/gen/hood/close-flows.hoon | 4 ++-- pkg/arvo/lib/hood/helm.hoon | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/arvo/gen/hood/close-flows.hoon b/pkg/arvo/gen/hood/close-flows.hoon index 53bfbb7cb..8804c9e34 100644 --- a/pkg/arvo/gen/hood/close-flows.hoon +++ b/pkg/arvo/gen/hood/close-flows.hoon @@ -1,4 +1,4 @@ -:: |close-flows: corks all stale ames flows +:: Deletes all stale ames flows from failed (re) subscriptions :: :: It runs in dry mode by default, printing the flows that can be closed. :: To actually close the flows, run with |close-flows, =dry | @@ -6,4 +6,4 @@ :- %say |= [^ arg=~ dry=?] :: -[%helm-kroc dry] +[%helm-ames-kroc dry] diff --git a/pkg/arvo/lib/hood/helm.hoon b/pkg/arvo/lib/hood/helm.hoon index 34b68bad8..b5a63287e 100644 --- a/pkg/arvo/lib/hood/helm.hoon +++ b/pkg/arvo/lib/hood/helm.hoon @@ -245,9 +245,9 @@ |= ~ =< abet (emit %pass /helm %arvo %a %stir '') :: -++ poke-kroc +++ poke-ames-kroc |= dry=? =< abet - (emit [%pass /helm/kroc %arvo %a %kroc dry]) + (emit %pass /helm %arvo %a %kroc dry) :: ++ poke-knob |= [error-tag=@tas level=?(%hush %soft %loud)] =< abet @@ -284,7 +284,7 @@ %helm-ames-sift =;(f (f !<(_+<.f vase)) poke-ames-sift) %helm-ames-verb =;(f (f !<(_+<.f vase)) poke-ames-verb) %helm-ames-wake =;(f (f !<(_+<.f vase)) poke-ames-wake) - %helm-kroc =;(f (f !<(_+<.f vase)) poke-kroc) + %helm-ames-kroc =;(f (f !<(_+<.f vase)) poke-ames-kroc) %helm-atom =;(f (f !<(_+<.f vase)) poke-atom) %helm-automass =;(f (f !<(_+<.f vase)) poke-automass) %helm-cancel-automass =;(f (f !<(_+<.f vase)) poke-cancel-automass) From c503647eb3286f077435a4c36d453329cb8a70a2 Mon Sep 17 00:00:00 2001 From: yosoyubik Date: Tue, 14 Feb 2023 06:07:59 +0100 Subject: [PATCH 5/5] ames: no-op on %kroc task --- pkg/arvo/sys/vane/ames.hoon | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/arvo/sys/vane/ames.hoon b/pkg/arvo/sys/vane/ames.hoon index f5d20a354..3a0692a4b 100644 --- a/pkg/arvo/sys/vane/ames.hoon +++ b/pkg/arvo/sys/vane/ames.hoon @@ -1962,11 +1962,14 @@ =/ rcvr [ship her-life.channel] "cork plea {}" abet:(on-memo:(make-peer-core peer-state channel) bone plea %plea) - :: +on-kroc: cork all flows from failed subscriptions + :: +on-kroc: cork all stale flows from failed subscriptions :: ++ on-kroc |= dry=? ^+ event-core + :: no-op + :: + ?: & %.(event-core (slog leaf/"ames: %kroc task not ready" ~)) :: =; [corks=@ core=_event-core] ?. dry core