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

Re: Is SANITIZE=leak make test unreliable for anyone else?

From
Eric W. Biederman <ebiederm@xmission.com>
Date
Oct 4, 2023, 14:19 UTC
Message-ID
<871qea31xf.fsf@email.froward.int.ebiederm.org>
In-Reply-To
<20231004132132.GC607079@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 27 quoted lines
> On Tue, Oct 03, 2023 at 08:33:26PM -0500, Eric W. Biederman wrote:
>
>> My big question is:
>> 
>>     Do other people see random test failures when SANITIZE=leak is enabled?
>> 
>> Is it just me?
>
> Yes, I've seen this. You mentioned that you were testing with v2.42,
> which lacks 370ef7e40d (test-lib: ignore uninteresting LSan output,
> 2023-08-28). Try using the current version of 'master', or just
> cherry-picking that commit onto v2.42.
>
> A few other tips to avoid confusing results (though they at least do not
> vary from run to run):
>
>   - use the LEAK_LOG option, since you otherwise miss some cases (it
>     looks like you already are from what you posted above)
>
>   - gcc and clang sometimes produce different results. Right now I get
>     no leak from gcc on t9004, but clang reports one (I think clang is
>     right here)
>
>   - turn off compiler optimizations; we've had cases where code
>     reordering/removal creates false positives. Oh, hmm, I forgot we do
>     this by default since d3775de074 (Makefile: force -O0 when compiling
>     with SANITIZE=leak, 2022-10-18), so your v2.42 should be covered.
I just tried master, aka commit d0e8084c65cb ("The fourteenth batch").
What I see on a random failure looks like:
Show 8 quoted lines
> make -C t/ all
> make[1]: Entering directory '/home/user/projects/git/git/t'
> rm -f -r 'test-results'
> GIT_TEST_EXT_CHAIN_LINT=0 && export GIT_TEST_EXT_CHAIN_LINT && make aggregate-results-and-cleanup
> make[2]: Entering directory '/home/user/projects/git/git/t'
> *** t0000-basic.sh ***
> Segmentation fault
> error: test_bool_env requires bool values both for $GIT_TEST_PASSING_SANITIZE_LEAK and for the default fallback

Which doesn't sound like anything you have described so I am guessing it is something with my environment I need to track down.

Eric
Previous: Jeff KingNext: Jeff King
Message 20 of 24 in “some commit-graph leak fixes”
  1. 0/10 some commit-graph leak fixesJeff King, Oct 3, 2023
  2. 01/10 t6700: mark test as leak-freeJeff King, Oct 3, 2023
  3. Taylor BlauOct 5, 2023
  4. 02/10 commit-reach: free temporary list in get_octopus_merge_bases()Jeff King, Oct 3, 2023
  5. 03/10 merge: free result of repo_get_merge_bases()Jeff King, Oct 3, 2023
  6. Taylor BlauOct 5, 2023
  7. 04/10 commit-graph: move slab-clearing to close_commit_graph()Jeff King, Oct 3, 2023
  8. Taylor BlauOct 5, 2023
  9. 05/10 commit-graph: free all elements of graph chainJeff King, Oct 3, 2023
  10. 06/10 commit-graph: delay base_graph assignment in add_graph_to_chain()Jeff King, Oct 3, 2023
  11. Taylor BlauOct 5, 2023
  12. 07/10 commit-graph: free graph struct that was not added to chainJeff King, Oct 3, 2023
  13. 08/10 commit-graph: free write-context entries before overwritingJeff King, Oct 3, 2023
  14. Taylor BlauOct 5, 2023
  15. Jeff KingOct 5, 2023
  16. 09/10 commit-graph: free write-context base_graph_name during cleanupJeff King, Oct 3, 2023
  17. 10/10 commit-graph: clear oidset after finishing writeJeff King, Oct 3, 2023
  18. Is SANITIZE=leak make test unreliable for anyone else?Eric W. Biederman, Oct 4, 2023
  19. Jeff KingOct 4, 2023
  20. Eric W. BiedermanOct 4, 2023
  21. Jeff KingOct 4, 2023
  22. Eric W. BiedermanOct 4, 2023
  23. Taylor BlauOct 5, 2023
  24. Junio C HamanoOct 6, 2023

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.