On Sun, Sep 14, 2025 at 10:25 AM bob prohaska <f...@www.zefox.net> wrote:

> On Sat, Sep 13, 2025 at 10:13:19AM -0600, Warner Losh wrote:
> > On Sat, Sep 13, 2025 at 10:08 AM bob prohaska <f...@www.zefox.net>
> wrote:
> >
> > > Is it normal for git to consume (while buildworld is running) close
> > > to 1 GB of memory for durations exceeding an hour?
> > >
> > > More fundamentally, is it OK to start buildworld immediately after
> > > a git pull finishes interactive output and returns a shell prompt?
> > >
> >
> > It's what I do:
> >
> > % git pull --rebase
> > % make buildworld <args>
>
> After running make cleandir twice, buildworld still failed with
> the same "failed assertion" error.
>
> Running
> git pull --rebase
> reported
> Updating 63bd2416ccd..455426da078 with no apparent errors
> and a return to the shell prompt. Meanwhile, top continues
> to show git activity, some minutes later amounting to  over
> one GB of memory use, 66MB of swap use and ~80% of one core
> in use. After a few more minutes memory use grew to 1.2 GB,
> but %CPU is lower, ~10-20%.
>
>
> Top does not show any flags applied to git, and a
> ps -aux | grep git
> reports only the "grep git" process, nothing else.
>
> It's very likely that at some point I started buildworld
> while git was similarly active.
>
> Am I correct thinking this would be a bad thing?
>

Yes. It can be. RPi2, IIRC, has USB2, so having root on usb would mean it's
a relatively high latency connection. That's fine, in general, but causes
two problems for you. (1) git is very sensitive to high latency I/O path.
This means git will run for much longer on such a system and (2) git can
take a lot of memory, which is bad during buildworld which itself creates a
lot of memory pressure. The two together means that buildworld has a lot
less memory to work with and will be slower or may even fail.

I'm surprised at the git activity. top only reports the command. It must be
in tear-down still (which is weird, because the shell does a wait() for the
process and the process is completely torn down before that returns... So
I'm super confused...

I like the more plausible explanation of 'git was running in another
session when I started world' but it does seem like that might not be the
case.

Warner

Reply via email to