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

Re: [PATCH] index-pack: spawn threads atomically

From
Jeff King <peff@peff.net>
Date
Jan 10, 2024, 11:44 UTC
Message-ID
<20240110114456.GF16674@coredump.intra.peff.net>
In-Reply-To
<ZZgvUyQK6X/MacDC@nand.local>
On Fri, Jan 05, 2024 at 11:33:23AM -0500, Taylor Blau wrote:
Show 7 quoted lines
> -	test_must_fail git index-pack --fix-thin --stdin <recoverable.pack
> +	test_must_fail git index-pack --threads=1 --fix-thin --stdin <recoverable.pack
> [...]
> For what it's worth, I'm fine with either approach, mostly to avoid
> tying up more of the list's time discussing the options. But I have a
> vague preference towards `--threads=1` since it doesn't require us to
> touch production code.

That's quite tempting, actually. The flip side, though, is that the test no longer reflects the production code as well. That is, in the real world we'd still call exit() from a thread. That obviously works OK now (modulo LSan), but if we ever had a regression where that left us in an inconsistent state, we'd be less likely to notice it. Feels kind of unlikely in practice, though.

I dunno. I guess the real least-bad thing is seeing if LSan can be fixed to handle this atomically. I haven't even reported it there.

If do go with "--threads=1", I suspect several tests in that file need it.

-Peff
Previous: Taylor BlauNext: Taylor Blau
Message 3 of 12 in “index-pack: spawn threads atomically”
  1. index-pack: spawn threads atomicallyJeff King, Jan 5, 2024
  2. Taylor BlauJan 5, 2024
  3. Jeff KingJan 10, 2024
  4. Taylor BlauJan 10, 2024
  5. 1/5 t5309: run expected-to-fail `index-pack`s with `--threads=1`Taylor Blau, Jan 10, 2024
  6. Junio C HamanoJan 10, 2024
  7. Taylor BlauJan 10, 2024
  8. 2/5 t5302: run expected-to-fail `index-pack`s with `--threads=1`Taylor Blau, Jan 10, 2024
  9. 3/5 t5308: run expected-to-fail `index-pack`s with `--threads=1`Taylor Blau, Jan 10, 2024
  10. 4/5 t5313: run expected-to-fail `index-pack`s with `--threads=1`Taylor Blau, Jan 10, 2024
  11. 5/5 t5325: run expected-to-fail `index-pack`s with `--threads=1`Taylor Blau, Jan 10, 2024
  12. Jeff KingJan 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.