Skip to contentSkip to conversation

make -j fails with: "mv: mv: cannot stat `perl.mak': No such file or directory"

spurious parallel build bug Ingo Molnar 3 participants 4 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

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

#1 lore raw
Quoted 15 lines · Ingo Molnar

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
Quoted 5 lines

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.

#2 lore raw
Quoted 19 lines · Junio C Hamano
Quoted 17 lines · Ingo Molnar

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.

Quoted 7 lines
Quoted 3 lines

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

#3 lore raw
Quoted 6 lines · Ingo Molnar
Quoted 3 lines

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