From: Junio C Hamano <gitster@pobox.com>
To: Sam Delmerico <delmerico@google.com>
Cc: git@vger.kernel.org, steadmon@google.com
Subject: Re: [PATCH] push: region_leave trace for negotiate_using_fetch
Date: Fri, 05 Jan 2024 08:18:57 -0800 [thread overview]
Message-ID: <xmqq4jfrpxce.fsf@gitster.g> (raw)
In-Reply-To: <CAHVcGPSSJr7L_NyFSKEkEywBap6hUrucga98RLpa6xuZ0k4CzA@mail.gmail.com> (Sam Delmerico's message of "Thu, 4 Jan 2024 17:12:15 -0800")
Sam Delmerico <delmerico@google.com> writes:
> * I don't exactly remember how I noticed it. I was doing some
> debugging around the push negotiation code and either 1) saw this
> region get entered twice in the trace output, or 2) I was just reading
> the code around here and saw two enters.
>
> * Perhaps there could be a check before the last git process ends that
> checks that all opened trace regions have been closed? I'm not sure
> how much work this would involve. It's probably also not a very
> proactive way to catch these bugs since it would only get triggered
> when a *user* hits a code path with a trace region that never exits.
>
> * There could also be a test that checks that every region_enter trace
> log has a corresponding region_leave. But I'm not sure how to ensure
> that every code path is checked.
>
> Overall, I'm not sure how much benefit there is from checking for
> this. I'm not sure that it would have a large impact if it were to
> happen again. For example, I think that it could be noticed relatively
> quickly by a person/system looking at metrics like I was (e.g. if the
> time spent in a region is infinite or zero).
>
> FWIW I didn't see any other examples of this when going through logs.
The above matches my intuition. A test that covers this specific
case would likely be of low value as it is unlikely for us to
regress this specific one. A CI job that runs all the tests under
tracing and inspects the log may catch some but its finding would be
limited to the code paths that are covered (but increasing the test
coverage would help here, not just for finding unbalanced region
markers, but for finding bugs in general).
Thanks.
prev parent reply other threads:[~2024-01-05 16:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-03 22:40 [PATCH] push: region_leave trace for negotiate_using_fetch Sam Delmerico
2024-01-03 23:37 ` Junio C Hamano
2024-01-05 1:12 ` Sam Delmerico
2024-01-05 16:18 ` Junio C Hamano [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqq4jfrpxce.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=delmerico@google.com \
--cc=git@vger.kernel.org \
--cc=steadmon@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).