# [spurious parallel build bug] make -j fails with: "mv: mv: cannot stat `perl.mak': No such file or directory"

4 messages from 2009-04-27 to 2009-04-27. Participants: Ingo Molnar, Junio C Hamano, Jeff King.
Thread: https://gitlist.dev/t/19083

## Ingo Molnar, 2009-04-27 09:48

Subject: [spurious parallel build bug] make -j fails with: "mv: mv: cannot stat `perl.mak': No such file or directory"
Message-ID: <20090427094843.GA5849@elte.hu>
URL: https://gitlist.dev/e/20090427094843.GA5849%40elte.hu

```

I got this when i built v1.6.3-rc3 for the first time:

$ make -j
[...]
    CC builtin-annotate.o
    CC builtin-apply.o
    CC builtin-archive.o
    CC builtin-bisect--helper.o
mv: mv: cannot stat `perl.mak': No such file or directory
mv: cannot stat `perl.mak': No such file or directory
    CC builtin-blame.o
mv: cannot stat `perl.mak': No such file or directory
mv: cannot stat `perl.mak': No such file or directory
cannot stat `perl.mak': No such file or directory

a plain 'make' worked.

Interestingly, a second attempt to reproduce it after a 'make clean' 
failed to trigger the bug. So it's either timing sensitive or 
there's some other weirdness that caused this.

	Ingo

```

## Junio C Hamano, 2009-04-27 17:01

Subject: Re: [spurious parallel build bug] make -j fails with: "mv: mv: cannot stat `perl.mak': No such file or directory"
Message-ID: <7vk5563ua8.fsf@gitster.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vk5563ua8.fsf%40gitster.siamese.dyndns.org
In-Reply-To: <20090427094843.GA5849@elte.hu>

```
Ingo Molnar <mingo@elte.hu> writes:

> I got this when i built v1.6.3-rc3 for the first time:
>
> $ make -j
> [...]
>     CC builtin-annotate.o
>     CC builtin-apply.o
>     CC builtin-archive.o
>     CC builtin-bisect--helper.o
> mv: mv: cannot stat `perl.mak': No such file or directory
> mv: cannot stat `perl.mak': No such file or directory
>     CC builtin-blame.o
> mv: cannot stat `perl.mak': No such file or directory
> mv: cannot stat `perl.mak': No such file or directory
> cannot stat `perl.mak': No such file or directory
>
> a plain 'make' worked.
>
> Interestingly, a second attempt to reproduce it after a 'make clean' 
> failed to trigger the bug. So it's either timing sensitive or 
> there's some other weirdness that caused this.

I've seen this a few times on the master machine at k.org but haven't seen
it elsewhere, perhaps because I do not have an access to 8-way parallelism
anywhere else.

```

## Ingo Molnar, 2009-04-27 18:34

Subject: Re: [spurious parallel build bug] make -j fails with: "mv: mv: cannot stat `perl.mak': No such file or directory"
Message-ID: <20090427183451.GA23862@elte.hu>
URL: https://gitlist.dev/e/20090427183451.GA23862%40elte.hu
In-Reply-To: <7vk5563ua8.fsf@gitster.siamese.dyndns.org>

```

* Junio C Hamano <gitster@pobox.com> wrote:

> Ingo Molnar <mingo@elte.hu> writes:
> 
> > I got this when i built v1.6.3-rc3 for the first time:
> >
> > $ make -j
> > [...]
> >     CC builtin-annotate.o
> >     CC builtin-apply.o
> >     CC builtin-archive.o
> >     CC builtin-bisect--helper.o
> > mv: mv: cannot stat `perl.mak': No such file or directory
> > mv: cannot stat `perl.mak': No such file or directory
> >     CC builtin-blame.o
> > mv: cannot stat `perl.mak': No such file or directory
> > mv: cannot stat `perl.mak': No such file or directory
> > cannot stat `perl.mak': No such file or directory
> >
> > a plain 'make' worked.
> >
> > Interestingly, a second attempt to reproduce it after a 'make 
> > clean' failed to trigger the bug. So it's either timing 
> > sensitive or there's some other weirdness that caused this.
> 
> I've seen this a few times on the master machine at k.org but 
> haven't seen it elsewhere, perhaps because I do not have an access 
> to 8-way parallelism anywhere else.

btw, this happened on a plain dual-core box. But i couldnt reproduce 
after that.

	Ingo

```

## Jeff King, 2009-04-27 20:19

Subject: Re: [spurious parallel build bug] make -j fails with: "mv: mv: cannot stat `perl.mak': No such file or directory"
Message-ID: <20090427201920.GD4067@coredump.intra.peff.net>
URL: https://gitlist.dev/e/20090427201920.GD4067%40coredump.intra.peff.net
In-Reply-To: <20090427183451.GA23862@elte.hu>

```
On Mon, Apr 27, 2009 at 08:34:51PM +0200, Ingo Molnar wrote:

> > I've seen this a few times on the master machine at k.org but 
> > haven't seen it elsewhere, perhaps because I do not have an access 
> > to 8-way parallelism anywhere else.
> 
> btw, this happened on a plain dual-core box. But i couldnt reproduce 
> after that.

I've seen it occasionally on a dual-core, as well, but was never able to
track it down. I suspect it is caused by the fact that there are two
rules which recurse into the perl subdir: perl/perl.mak, if needed, will
recurse, as will "all".  So I think we are losing the usual parallelism
guard there, and we have two makes running inside "perl" at the same
time, both of which then try to make perl.mak and step on each other.

But I still can't reproduce it at will, so it is hard to test.

-Peff

```
