Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Sep 2025 11:15:18 -0600
From:      "Brad Davis" <brd@FreeBSD.org>
To:        "Warner Losh" <imp@bsdimp.com>
Cc:        "bob prohaska" <fbsd@www.zefox.net>, "FreeBSD Current" <freebsd-current@freebsd.org>
Subject:   Re: Git and buildworld running at the same time
Message-ID:  <62cfbc85-6e12-4b00-90f8-8bd96a64dff5@app.fastmail.com>
In-Reply-To:  <CANCZdfqfA8e4AJhDuCxDRYXJAt6cY1kGqwkS4da=b01zhfxEEw@mail.gmail.com>
References:  <aMWGWbI-8TwnAPnP@www.zefox.net> <f9ae18ca-13d9-4fdc-8ee4-6b1870ad67ad@app.fastmail.com> <CANCZdfrNw=AHLUcKxGzYoPQ7Zs=E2Wjp6Kqq4E3aU_LyBh_snA@mail.gmail.com> <e786ed05-5ce5-42dc-92bc-d6cfdd3ccc3d@app.fastmail.com> <CANCZdfqfA8e4AJhDuCxDRYXJAt6cY1kGqwkS4da=b01zhfxEEw@mail.gmail.com>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
On Sat, Sep 13, 2025, at 10:06 AM, Warner Losh wrote:
> 
> 
> On Sat, Sep 13, 2025 at 9:54 AM Brad Davis <brd@freebsd.org> wrote:
>> __
>> On Sat, Sep 13, 2025, at 9:40 AM, Warner Losh wrote:
>>> 
>>> 
>>> On Sat, Sep 13, 2025 at 9:28 AM Brad Davis <brd@freebsd.org> wrote:
>>>> On Sat, Sep 13, 2025, at 8:57 AM, bob prohaska wrote:
>>>> > Lately I've noticed that sometimes while running buildworld a top
>>>> > window reports git running also. Up to now, I've surmised that
>>>> > this is intentional, with git providing some housekeeping function.
>>>> >
>>>> > Yesterday a buildworld session was accompanied by a prolonged
>>>> > interval of git running also, with a large memory footprint,
>>>> > near 1GB. That seems rather excessive.
>>>> >
>>>> > At the same time, it dawned on me that my recent habit has been
>>>> > to run git pull, immediately followed by buildworld. Might it be
>>>> > prudent to wait (how long?) to let git finish any housekeeping
>>>> > triggered by the pull command? It seems likely that any overlap
>>>> > could readily lead to inconsistencies which might account for
>>>> > some of the buildworld problems I've been encountering lately.
>>>> 
>>>> This is part of the normal build process and how the output of uname -a includes bits like this: main-n280188-2024887abc7d-dirty or main-n280188-2024887abc7d
>>>> 
>>>> To find out of the src tree is pristine or dirty the build process uses git to find out.
>>> 
>>> Though that's only for the kernel, not for world builds. Right?
>> 
>> It happens for world builds as well.. newvers.sh runs git (used to be svnlite) and is called in Makefile.inc1.
> 
> It doesn't need git for this:
> 
> # Set VERSION for CTFMERGE to use via the default CTFFLAGS=-L VERSION.
> .for _V in BRANCH REVISION TYPE
> .if !defined(_${_V})
> ${_V}!=  eval $$(awk '/^${_V}=/{print}' ${SRCTOP}/sys/conf/newvers.sh); echo $$${_V}
> .export _${_V}
> .endif
> .endfor
> 
> In fact, it's not even running newvers.sh, just using awk to grep out these variables. Though it should be using newvers.sh -V here (which specifically doesn't run git).

Ooh, I see, good catch!


Regards,
Brad Davis

[-- Attachment #2 --]
<!DOCTYPE html><html><head><title></title></head><body><div>On Sat, Sep 13, 2025, at 10:06 AM, Warner Losh wrote:</div><blockquote type="cite" id="qt" style=""><div dir="ltr"><div dir="ltr"><br></div><div><br></div><div class="qt-gmail_quote qt-gmail_quote_container"><div dir="ltr" class="qt-gmail_attr">On Sat, Sep 13, 2025 at 9:54 AM Brad Davis &lt;<a href="mailto:brd@freebsd.org">brd@freebsd.org</a>&gt; wrote:</div><blockquote class="qt-gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204, 204, 204);padding-left:1ex;"><div><u></u><br></div><div><div>On Sat, Sep 13, 2025, at 9:40 AM, Warner Losh wrote:</div><blockquote type="cite" id="qt-m_7759951866738851315qt"><div dir="ltr"><div dir="ltr"><br></div><div><br></div><div><div dir="ltr">On Sat, Sep 13, 2025 at 9:28 AM Brad Davis &lt;<a href="mailto:brd@freebsd.org" target="_blank">brd@freebsd.org</a>&gt; wrote:</div><blockquote style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204, 204, 204);padding-left:1ex;"><div>On Sat, Sep 13, 2025, at 8:57 AM, bob prohaska wrote:</div><div>&gt; Lately I've noticed that sometimes while running buildworld a top</div><div>&gt; window reports git running also. Up to now, I've surmised that</div><div>&gt; this is intentional, with git providing some housekeeping function.</div><div>&gt;</div><div>&gt; Yesterday a buildworld session was accompanied by a prolonged</div><div>&gt; interval of git running also, with a large memory footprint,</div><div>&gt; near 1GB. That seems rather excessive.</div><div>&gt;</div><div>&gt; At the same time, it dawned on me that my recent habit has been</div><div>&gt; to run git pull, immediately followed by buildworld. Might it be</div><div>&gt; prudent to wait (how long?) to let git finish any housekeeping</div><div>&gt; triggered by the pull command? It seems likely that any overlap</div><div>&gt; could readily lead to inconsistencies which might account for</div><div>&gt; some of the buildworld problems I've been encountering lately.</div><div><br></div><div>This is part of the normal build process and how the output of uname -a includes bits like this: main-n280188-2024887abc7d-dirty or main-n280188-2024887abc7d</div><div><br></div><div>To find out of the src tree is pristine or dirty the build process uses git to find out.</div></blockquote><div><br></div><div>Though that's only for the kernel, not for world builds. Right?</div></div></div></blockquote><div><br></div><div>It happens for world builds as well.. newvers.sh runs git (used to be svnlite) and is called in Makefile.inc1.</div></div></blockquote><div><br></div><div>It doesn't need git for this:</div><div><br></div><div><div># Set VERSION for CTFMERGE to use via the default CTFFLAGS=-L VERSION.</div><div>.for _V in BRANCH REVISION TYPE</div><div>.if !defined(_${_V})</div><div>${_V}!= &nbsp;eval $$(awk '/^${_V}=/{print}' ${SRCTOP}/sys/conf/newvers.sh); echo $$${_V}</div><div>.export _${_V}</div><div>.endif</div><div>.endfor</div></div><div><br></div><div>In fact, it's not even running newvers.sh, just using awk to grep out these variables. Though it should be using newvers.sh -V here (which specifically doesn't run git).</div></div></div></blockquote><div><br></div><div>Ooh, I see, good catch!</div><div><br></div><div><br></div><div>Regards,</div><div>Brad Davis</div><div><br></div></body></html>
home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?62cfbc85-6e12-4b00-90f8-8bd96a64dff5>