# Built Git 2.27.0 from sources on macOS Catalina fails on "make profile"

5 messages from 2020-07-01 to 2020-07-01. Participants: Fabio Frumento, Jeff King.
Thread: https://gitlist.dev/t/53785

## Fabio Frumento, 2020-07-01 13:17

Subject: Built Git 2.27.0 from sources on macOS Catalina fails on "make profile"
Message-ID: <618374D7-60E1-4942-B29F-4F2EA261996F@gmail.com>
URL: https://gitlist.dev/e/618374D7-60E1-4942-B29F-4F2EA261996F%40gmail.com

```
I'm trying to build Git 2.27.0 from sources on MACOS

I've got to get the build works solving missing autoconf app and gcov issues (clang does not need it)

now I'm struggling during the ˋˋˋmake profileˋˋˋ step

some tests fail on ˋˋˋt0410-partial-clone.shˋˋˋ

ˋˋˋ
not ok 15 - missing tree objects with --missing=allow-promisor and --exclude-promisor-objects
#
#		rm -rf repo &&
#		test_create_repo repo &&
#		test_commit -C repo foo &&
#		test_commit -C repo bar &&
#		test_commit -C repo baz &&
#
#		promise_and_delete $(git -C repo rev-parse bar^{tree}) &&
#		promise_and_delete $(git -C repo rev-parse foo^{tree}) &&
#
#		git -C repo config core.repositoryformatversion 1 &&
#		git -C repo config extensions.partialclone "arbitrary string" &&
#
#		git -C repo rev-list --missing=allow-promisor --objects HEAD >objs 2>rev_list_err &&
#		test_must_be_empty rev_list_err &&
#		# 3 commits, 3 blobs, and 1 tree
#		test_line_count = 7 objs &&
#
#		# Do the same for --exclude-promisor-objects, but with all trees gone.
#		promise_and_delete $(git -C repo rev-parse baz^{tree}) &&
#		git -C repo rev-list --exclude-promisor-objects --objects HEAD >objs 2>rev_list_err &&
#		test_must_be_empty rev_list_err &&
#		# 3 commits, no blobs or trees
#		test_line_count = 3 objs
#
not ok 16 - missing non-root tree object and rev-list
#
#		rm -rf repo &&
#		test_create_repo repo &&
#		mkdir repo/dir &&
#		echo foo >repo/dir/foo &&
#		git -C repo add dir/foo &&
#		git -C repo commit -m "commit dir/foo" &&
#
#		promise_and_delete $(git -C repo rev-parse HEAD:dir) &&
#
#		git -C repo config core.repositoryformatversion 1 &&
#		git -C repo config extensions.partialclone "arbitrary string" &&
#
#		git -C repo rev-list --missing=allow-any --objects HEAD >objs 2>rev_list_err &&
#		test_must_be_empty rev_list_err &&
#		# 1 commit and 1 tree
#		test_line_count = 2 objs
#
ˋˋˋ

I'm a little surprised as presumed, since 2.27.0 is an official release, all the tests should pass without any issue.

I'm not interested to get latest version using home-brew so please leave it out of the answers

Any idea?

How to file a bug to the Git developers?


```

## Jeff King, 2020-07-01 15:37

Subject: Re: Built Git 2.27.0 from sources on macOS Catalina fails on "make profile"
Message-ID: <20200701153726.GC6726@coredump.intra.peff.net>
URL: https://gitlist.dev/e/20200701153726.GC6726%40coredump.intra.peff.net
In-Reply-To: <618374D7-60E1-4942-B29F-4F2EA261996F@gmail.com>

```
On Wed, Jul 01, 2020 at 03:17:05PM +0200, Fabio Frumento wrote:

> now I'm struggling during the ˋˋˋmake profileˋˋˋ step
> [...]
> I'm a little surprised as presumed, since 2.27.0 is an official
> release, all the tests should pass without any issue.

They generally do (not just for releases but for every commit that hits
master). However, we've sometimes seen weird test failures from "make
profile" (which in my experience isn't all that well maintained).

That said, "make profile" passes for me on v2.27.0, on Linux.  It's
possible that a test is racy (the profiler often slows things down,
exacerbating races), but I can't seem to get t0410 to fail with our
usual stress-test to find races.

If you don't care about profile-optimized builds, then I'd suggest
skipping "make profile".

If you want to look further into the test failure, probably it would
help to re-run the test with more verbose settings. E.g.:

  [wait for this to fail, which would leave the problematic version of
   git in the build directory]
  $ make profile
  $ cd t
  $ ./t0410-partial-clone.sh -v -i -x

then we could see what's failing.

> How to file a bug to the Git developers?

I think you just did.

-Peff

```

## Fabio Frumento, 2020-07-01 16:00

Subject: Re: Built Git 2.27.0 from sources on macOS Catalina fails on "make profile"
Message-ID: <E9210645-66F4-4B76-BB26-C8282AE23B3D@gmail.com>
URL: https://gitlist.dev/e/E9210645-66F4-4B76-BB26-C8282AE23B3D%40gmail.com
In-Reply-To: <20200701153726.GC6726@coredump.intra.peff.net>

```
Hi,

Thanks for the reply.

I get several messages like this

LLVM Profile Warning: Unable to track new values: Running out of static counters.  Consider using option -mllvm -vp-counters-per-site=<n> to allocate more value profile counters at compile time.

I’ve checked the scripts in the t folder, they use #!/bin/sh while  I’m using zsh could  it be of some relevance? Which shell are they supposed to be run?

-Fabio

> Il giorno 1 lug 2020, alle ore 17:37, Jeff King <peff@peff.net> ha scritto:
> 
> On Wed, Jul 01, 2020 at 03:17:05PM +0200, Fabio Frumento wrote:
> 
>> now I'm struggling during the ˋˋˋmake profileˋˋˋ step
>> [...]
>> I'm a little surprised as presumed, since 2.27.0 is an official
>> release, all the tests should pass without any issue.
> 
> They generally do (not just for releases but for every commit that hits
> master). However, we've sometimes seen weird test failures from "make
> profile" (which in my experience isn't all that well maintained).
> 
> That said, "make profile" passes for me on v2.27.0, on Linux.  It's
> possible that a test is racy (the profiler often slows things down,
> exacerbating races), but I can't seem to get t0410 to fail with our
> usual stress-test to find races.
> 
> If you don't care about profile-optimized builds, then I'd suggest
> skipping "make profile".
> 
> If you want to look further into the test failure, probably it would
> help to re-run the test with more verbose settings. E.g.:
> 
>  [wait for this to fail, which would leave the problematic version of
>   git in the build directory]
>  $ make profile
>  $ cd t
>  $ ./t0410-partial-clone.sh -v -i -x
> 
> then we could see what's failing.
> 
>> How to file a bug to the Git developers?
> 
> I think you just did.
> 
> -Peff


```

## Jeff King, 2020-07-01 16:10

Subject: Re: Built Git 2.27.0 from sources on macOS Catalina fails on "make profile"
Message-ID: <20200701161018.GD6726@coredump.intra.peff.net>
URL: https://gitlist.dev/e/20200701161018.GD6726%40coredump.intra.peff.net
In-Reply-To: <E9210645-66F4-4B76-BB26-C8282AE23B3D@gmail.com>

```
On Wed, Jul 01, 2020 at 06:00:49PM +0200, Fabio Frumento wrote:

> I get several messages like this
> 
> LLVM Profile Warning: Unable to track new values: Running out of static counters.  Consider using option -mllvm -vp-counters-per-site=<n> to allocate more value profile counters at compile time.

That could be related. I don't know enough about llvm's profiling to
say. If it's just a warning and not terminating the process, that might
be OK. But some of the tests check the stderr from Git. If the profiled
binaries are producing extra messages, that could cause a problem (and
it looks like t0410.15 that you posted does make sure stderr is empty,
so this seems a likely culprit).

> I’ve checked the scripts in the t folder, they use #!/bin/sh while
> I’m using zsh could  it be of some relevance? Which shell are they
> supposed to be run?

They're generally run with whatever $SHELL_PATH is set by the Makefile
knobs, which defaults to /bin/sh. The interactive shell you're using
shouldn't be relevant.

-Peff

```

## Fabio Frumento, 2020-07-01 16:14

Subject: Re: Built Git 2.27.0 from sources on macOS Catalina fails on "make profile"
Message-ID: <C72555F0-4CAE-4488-B32E-FD06D1204935@gmail.com>
URL: https://gitlist.dev/e/C72555F0-4CAE-4488-B32E-FD06D1204935%40gmail.com
In-Reply-To: <20200701161018.GD6726@coredump.intra.peff.net>

```
You got it!

++ test_must_be_empty err
++ test_path_is_file err
++ test -f err
++ test -s err
++ echo ''\''err'\'' is not empty, it contains:'
'err' is not empty, it contains:
++ cat err
LLVM Profile Warning: Unable to track new values: Running out of static counters.  Consider using option -mllvm -vp-counters-per-site=<n> to allocate more value profile counters at compile time.
LLVM Profile Warning: Unable to track new values: Running out of static counters.  Consider using option -mllvm -vp-counters-per-site=<n> to allocate more value profile counters at compile time.
LLVM Profile Warning: Unable to track new values: Running out of static counters.  Consider using option -mllvm -vp-counters-per-site=<n> to allocate more value profile counters at compile time.
++ return 1
error: last command exited with $?=1
not ok 5 - pretend we have a fully passing test suite

Ok now I know I have to solve the LLVM generating this issue.

Thanks a lot

Fabio

> Il giorno 1 lug 2020, alle ore 18:10, Jeff King <peff@peff.net> ha scritto:
> 
> On Wed, Jul 01, 2020 at 06:00:49PM +0200, Fabio Frumento wrote:
> 
>> I get several messages like this
>> 
>> LLVM Profile Warning: Unable to track new values: Running out of static counters.  Consider using option -mllvm -vp-counters-per-site=<n> to allocate more value profile counters at compile time.
> 
> That could be related. I don't know enough about llvm's profiling to
> say. If it's just a warning and not terminating the process, that might
> be OK. But some of the tests check the stderr from Git. If the profiled
> binaries are producing extra messages, that could cause a problem (and
> it looks like t0410.15 that you posted does make sure stderr is empty,
> so this seems a likely culprit).
> 
>> I’ve checked the scripts in the t folder, they use #!/bin/sh while
>> I’m using zsh could  it be of some relevance? Which shell are they
>> supposed to be run?
> 
> They're generally run with whatever $SHELL_PATH is set by the Makefile
> knobs, which defaults to /bin/sh. The interactive shell you're using
> shouldn't be relevant.
> 
> -Peff


```
