git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] fsmonitor: fix hangs by delayed fs event listening

From
Jeff King <peff@peff.net>
Date
Oct 7, 2024, 06:08 UTC
Message-ID
<20241007060813.GA34827@coredump.intra.peff.net>
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
Previous: Jeff KingNext: Koji Nakamaru
Message 3 of 10 in “fsmonitor: fix hangs by delayed fs event listening”
  1. fsmonitor: fix hangs by delayed fs event listeningKoji Nakamaru via GitGitGadget, Oct 2, 2024
  2. Jeff KingOct 7, 2024
  3. Jeff KingOct 7, 2024
  4. Koji NakamaruOct 7, 2024
  5. 0/2 alternate approach to fixing fsmonitor hangsJeff King, Oct 8, 2024
  6. 1/2 simple-ipc: split async server initialization and runningJeff King, Oct 8, 2024
  7. 2/2 fsmonitor: initialize fs event listener before accepting clientsJeff King, Oct 8, 2024
  8. Koji NakamaruOct 8, 2024
  9. Jeff KingOct 11, 2024
  10. Junio C HamanoOct 11, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.