From: Jeff King <peff@peff.net>
To: Koji Nakamaru via GitGitGadget <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, Koji Nakamaru <koji.nakamaru@gree.net>
Subject: Re: [PATCH] fsmonitor: fix hangs by delayed fs event listening
Date: Mon, 7 Oct 2024 02:08:13 -0400 [thread overview]
Message-ID: <20241007060813.GA34827@coredump.intra.peff.net> (raw)
In-Reply-To: <20241007055821.GA34037@coredump.intra.peff.net>
On Mon, Oct 07, 2024 at 01:58:21AM -0400, Jeff King wrote:
> I think your patch has one small bug, which is that you don't
> pthread_mutex_destroy() at the end of fsmonitor_run_daemon(). But other
> than that I think it should work OK (I haven't tried it in practice yet;
> I assume you did?).
I just checked your patch in our CI, using the sleep(1) you suggested
earlier to more predictably lose the race(). It does work reliably (and
I confirmed with some extra trace statements that it does spin on the
sleep_millisec() loop).
I had also previously checked my suggested solution. So I do think
either is a valid solution to the problem.
-Peff
next prev parent reply other threads:[~2024-10-07 6:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-02 9:47 [PATCH] fsmonitor: fix hangs by delayed fs event listening Koji Nakamaru via GitGitGadget
2024-10-07 5:58 ` Jeff King
2024-10-07 6:08 ` Jeff King [this message]
2024-10-07 9:45 ` Koji Nakamaru
2024-10-08 8:31 ` [PATCH 0/2] alternate approach to fixing fsmonitor hangs Jeff King
2024-10-08 8:33 ` [PATCH 1/2] simple-ipc: split async server initialization and running Jeff King
2024-10-08 8:36 ` [PATCH 2/2] fsmonitor: initialize fs event listener before accepting clients Jeff King
2024-10-08 16:03 ` [PATCH 0/2] alternate approach to fixing fsmonitor hangs Koji Nakamaru
2024-10-11 9:00 ` Jeff King
2024-10-11 18:01 ` Junio C Hamano
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=20241007060813.GA34827@coredump.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=koji.nakamaru@gree.net \
/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).