Skip to contentSkip to conversation

perl makefile race - any make experts who can help?

DISCUSSION Richard Purdie 4 participants 9 messages Jun 4, 2022 – Jun 6, 2022 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

Hi,

Occasionally we see perl do_install failures on the autobuilder. It looks like some kind of make race. With the last failure I saved off the build directory and have spent a lot of time staring at it but I don't understand how what the logs say happened actually happened.

The build failure is here:

https://autobuilder.yoctoproject.org/typhoon/#/builders/37/builds/5315/steps/11/logs/stdio

and you can see it failed in do_install. The first error is;

| Couldn't copy cpan/podlators/blib/script/pod2text to /home/pokybuild/yocto-worker/genericx86-64/build/build/tmp/work/core2-64-poky-linux/perl/5.34.1-r0/image/usr/bin/pod2text: No such file or directory | Couldn't chmod 755 /home/pokybuild/yocto-worker/genericx86-64/build/build/tmp/work/core2-64-poky-linux/perl/5.34.1-r0/image/usr/bin/pod2text: No such file or directory

then

installman: Can't open cpan/podlators/blib/script/pod2text: No such file or directory | ABORTED

Looking at the build directory, cpan/podlators/blib/script/pod2text isn't there, cpan/podlators/script/pod2text is. I went digging in the compile log which didn't fail but is interesting in what it doesn't say nd the ordering. The full log:

https://autobuilder.yocto.io/pub/failed-builds-data/perl-race/log.do_compile.25823

or my edited down version:

https://autobuilder.yocto.io/pub/failed-builds-data/perl-race/compile-cutdown.log

and note it never actually builds cpan/podlators/blib/script/pod2text.

If I go into the failed build dir, it does build it:

https://autobuilder.yocto.io/pub/failed-builds-data/perl-race/manual-compile.log

I tried a few variations of deleting and rebuilding files there just to show behaviour.

The makefiles from the podlators directory:

https://autobuilder.yocto.io/pub/failed-builds-data/perl-race/Makefile
https://autobuilder.yocto.io/pub/failed-builds-data/perl-race/Makefile.PL

What really puzzles me is the "Manifying 2 pod documents" message *before* it then generates scripts/pod2text from scripts/pod2text.PL in the do_compile log. It appears to run the scripts/pod2text late and never runs the $(INST_SCRIPT)/pod2text at all (hence no cp message and the missing file).

The Makefile has default targets of pure_all and manifypods, that message comes from manifypods but manifypods depends on pure_all.

pure_all is a double colon rule and I'm on less certain ground with how those behave.

Are there any make experts out there who can spot the race in this makefile?

Cheers,

Richard

#1 lore raw

Here's something I didn't think of before. Has this occurred anywhere else except Ubuntu 18.04?

Alex

Quoted 75 lines · Richard Purdie

Hi,

Occasionally we see perl do_install failures on the autobuilder. It looks like some kind of make race. With the last failure I saved off the build directory and have spent a lot of time staring at it but I don't understand how what the logs say happened actually happened.

The build failure is here:

https://autobuilder.yoctoproject.org/typhoon/#/builders/37/builds/5315/steps/11/logs/stdio

and you can see it failed in do_install. The first error is;

| Couldn't copy cpan/podlators/blib/script/pod2text to /home/pokybuild/yocto-worker/genericx86-64/build/build/tmp/work/core2-64-poky-linux/perl/5.34.1-r0/image/usr/bin/pod2text: No such file or directory | Couldn't chmod 755 /home/pokybuild/yocto-worker/genericx86-64/build/build/tmp/work/core2-64-poky-linux/perl/5.34.1-r0/image/usr/bin/pod2text: No such file or directory

then

installman: Can't open cpan/podlators/blib/script/pod2text: No such file or directory | ABORTED

Looking at the build directory, cpan/podlators/blib/script/pod2text isn't there, cpan/podlators/script/pod2text is. I went digging in the compile log which didn't fail but is interesting in what it doesn't say nd the ordering. The full log:

https://autobuilder.yocto.io/pub/failed-builds-data/perl-race/log.do_compile.25823

or my edited down version:

https://autobuilder.yocto.io/pub/failed-builds-data/perl-race/compile-cutdown.log

and note it never actually builds cpan/podlators/blib/script/pod2text.

If I go into the failed build dir, it does build it:

https://autobuilder.yocto.io/pub/failed-builds-data/perl-race/manual-compile.log

I tried a few variations of deleting and rebuilding files there just to show behaviour.

The makefiles from the podlators directory:

https://autobuilder.yocto.io/pub/failed-builds-data/perl-race/Makefile
https://autobuilder.yocto.io/pub/failed-builds-data/perl-race/Makefile.PL

What really puzzles me is the "Manifying 2 pod documents" message *before* it then generates scripts/pod2text from scripts/pod2text.PL in the do_compile log. It appears to run the scripts/pod2text late and never runs the $(INST_SCRIPT)/pod2text at all (hence no cp message and the missing file).

The Makefile has default targets of pure_all and manifypods, that message comes from manifypods but manifypods depends on pure_all.

pure_all is a double colon rule and I'm on less certain ground with how those behave.

Are there any make experts out there who can spot the race in this makefile?

Cheers,

Richard

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#166564): https://lists.openembedded.org/g/openembedded-core/message/166564
Mute This Topic: https://lists.openembedded.org/mt/91538663/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#2 lore raw
Quoted 2 lines · Alexander Kanavin

Here's something I didn't think of before. Has this occurred anywhere else except Ubuntu 18.04?

https://bugzilla.yoctoproject.org/show_bug.cgi?id=14096

I'm struggling to get the data out from the old builds, one mentions ubuntu1604, there is an ubuntu1804 on both x86 and arm hosts.

It is possible this is an ubuntu specific make issue or a make bug.

Cheers,

Richard

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw
Quoted 10 lines · Richard Purdie via lists.yoctoproject.org
Quoted 2 lines · Alexander Kanavin

Here's something I didn't think of before. Has this occurred anywhere else except Ubuntu 18.04?

https://bugzilla.yoctoproject.org/show_bug.cgi?id=14096

I'm struggling to get the data out from the old builds, one mentions ubuntu1604, there is an ubuntu1804 on both x86 and arm hosts.

It is possible this is an ubuntu specific make issue or a make bug.

Ubuntu 18.04 uses make 4.1 which is old (Oct 2014).

I noticed these patches from 2016:

https://git.savannah.gnu.org/cgit/make.git/commit/?id=9bb994e8319c2b153cd3d6d61e2c2882895e7c3a
https://git.savannah.gnu.org/cgit/make.git/commit/?id=4762480ae9cb8df4878286411f178d32db14eff0

I think we may want to mandate a modern make for both this class of issues and also perhaps for better loadavg support to keep load under control on the autobuilders.

I'm torn, on the one hand we need to test the distros people use, on the other we do need to remove sources of intermittent issues. I think this bug must be some issue with make itself.

Adding a make-native dependency to perl would "hurt" people on modern distros...

Cheers,

Richard

#5 lore raw
Quoted 26 lines · Richard Purdie
Quoted 10 lines · Richard Purdie via lists.yoctoproject.org
Quoted 2 lines · Alexander Kanavin

Here's something I didn't think of before. Has this occurred anywhere else except Ubuntu 18.04?

https://bugzilla.yoctoproject.org/show_bug.cgi?id=14096

I'm struggling to get the data out from the old builds, one mentions ubuntu1604, there is an ubuntu1804 on both x86 and arm hosts.

It is possible this is an ubuntu specific make issue or a make bug.

Ubuntu 18.04 uses make 4.1 which is old (Oct 2014).

I noticed these patches from 2016:

https://git.savannah.gnu.org/cgit/make.git/commit/?id=9bb994e8319c2b153cd3d6d61e2c2882895e7c3a

https://git.savannah.gnu.org/cgit/make.git/commit/?id=4762480ae9cb8df4878286411f178d32db14eff0

I think we may want to mandate a modern make for both this class of issues and also perhaps for better loadavg support to keep load under control on the autobuilders.

Quoted 6 lines

I'm torn, on the one hand we need to test the distros people use, on the other we do need to remove sources of intermittent issues. I think this bug must be some issue with make itself.

Adding a make-native dependency to perl would "hurt" people on modern distros...

Make perhaps does not have many complex dependency needs so it might not be as bad

Second option is to mandate buildtools on this distro And add make to tarball

Quoted 18 lines

Cheers,

Richard

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#166567):
https://lists.openembedded.org/g/openembedded-core/message/166567
Mute This Topic: https://lists.openembedded.org/mt/91540379/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#6 lore raw
Quoted 40 lines · Khem Raj

On Sat, Jun 4, 2022 at 6:23 AM Richard Purdie <[email protected] <mailto:[email protected]>> wrote:

    On Sat, 2022-06-04 at 13:36 +0100, Richard Purdie via
    lists.yoctoproject.org <http://lists.yoctoproject.org> wrote:
     > On Sat, 2022-06-04 at 13:51 +0200, Alexander Kanavin wrote:
     > > Here's something I didn't think of before. Has this occurred
    anywhere
     > > else except Ubuntu 18.04?
     >
     > https://bugzilla.yoctoproject.org/show_bug.cgi?id=14096
    <https://bugzilla.yoctoproject.org/show_bug.cgi?id=14096>
     >
     > I'm struggling to get the data out from the old builds, one mentions
     > ubuntu1604, there is an ubuntu1804 on both x86 and arm hosts.
     >
     > It is possible this is an ubuntu specific make issue or a make bug.

    Ubuntu 18.04 uses make 4.1 which is old (Oct 2014).

    I noticed these patches from 2016:

    https://git.savannah.gnu.org/cgit/make.git/commit/?id=9bb994e8319c2b153cd3d6d61e2c2882895e7c3a
    <https://git.savannah.gnu.org/cgit/make.git/commit/?id=9bb994e8319c2b153cd3d6d61e2c2882895e7c3a>
    https://git.savannah.gnu.org/cgit/make.git/commit/?id=4762480ae9cb8df4878286411f178d32db14eff0
    <https://git.savannah.gnu.org/cgit/make.git/commit/?id=4762480ae9cb8df4878286411f178d32db14eff0>

    I think we may want to mandate a modern make for both this class of
    issues and also perhaps for better loadavg support to keep load under
    control on the autobuilders.

    I'm torn, on the one hand we need to test the distros people use, on
    the other we do need to remove sources of intermittent issues. I think
    this bug must be some issue with make itself.

    Adding a make-native dependency to perl would "hurt" people on modern
    distros...
Quoted 2 lines

Make perhaps does not have many complex dependency needs so it might not be as bad

My master build is already building make-native due to a dependency from glibc, since 2018:

https://git.openembedded.org/openembedded-core/commit/?id=0cd89e4af625941f8ab8c033f72f900a2979b304

Don't know if that dependency is still valid though.

Jacob

#7 lore raw
Quoted 47 lines · Jacob Kroon
Quoted 42 lines · Khem Raj

On Sat, Jun 4, 2022 at 6:23 AM Richard Purdie <[email protected] <mailto:[email protected]>> wrote:

    On Sat, 2022-06-04 at 13:36 +0100, Richard Purdie via
    lists.yoctoproject.org <http://lists.yoctoproject.org> wrote:
     > On Sat, 2022-06-04 at 13:51 +0200, Alexander Kanavin wrote:
     > > Here's something I didn't think of before. Has this occurred
    anywhere
     > > else except Ubuntu 18.04?
     >
     > https://bugzilla.yoctoproject.org/show_bug.cgi?id=14096
    <https://bugzilla.yoctoproject.org/show_bug.cgi?id=14096>
     >
     > I'm struggling to get the data out from the old builds, one mentions
     > ubuntu1604, there is an ubuntu1804 on both x86 and arm hosts.
     >
     > It is possible this is an ubuntu specific make issue or a make bug.

    Ubuntu 18.04 uses make 4.1 which is old (Oct 2014).

    I noticed these patches from 2016:

    https://git.savannah.gnu.org/cgit/make.git/commit/?id=9bb994e8319c2b153cd3d6d61e2c2882895e7c3a
    <https://git.savannah.gnu.org/cgit/make.git/commit/?id=9bb994e8319c2b153cd3d6d61e2c2882895e7c3a>
    https://git.savannah.gnu.org/cgit/make.git/commit/?id=4762480ae9cb8df4878286411f178d32db14eff0
    <https://git.savannah.gnu.org/cgit/make.git/commit/?id=4762480ae9cb8df4878286411f178d32db14eff0>

    I think we may want to mandate a modern make for both this class of
    issues and also perhaps for better loadavg support to keep load under
    control on the autobuilders.

    I'm torn, on the one hand we need to test the distros people use, on
    the other we do need to remove sources of intermittent issues. I think
    this bug must be some issue with make itself.

    Adding a make-native dependency to perl would "hurt" people on modern
    distros...
Quoted 3 lines

Make perhaps does not have many complex dependency needs so it might not be as bad

Quoted 6 lines

My master build is already building make-native due to a dependency from glibc, since 2018:

https://git.openembedded.org/openembedded-core/commit/?id=0cd89e4af625941f8ab8c033f72f900a2979b304

Don't know if that dependency is still valid though.

It is a fair point. We may as well add it to perl/perl-native. Centos7 still has make 3.82 but I think we now already require buildtools tarball there so we could probably drop the glibc dependency on make- native now.

Cheers,

Richard

#8 lore raw
Quoted 65 lines · On Sat, 4 Jun 2022, 19:40 Richard Purdie, <…
Quoted 7 lines · Jacob Kroon
Quoted 6 lines · Khem Raj

On Sat, Jun 4, 2022 at 6:23 AM Richard Purdie <[email protected] <mailto:[email protected]>> wrote:

Quoted 11 lines
Quoted 11 lines
    On Sat, 2022-06-04 at 13:36 +0100, Richard Purdie via
    lists.yoctoproject.org <http://lists.yoctoproject.org> wrote:
     > On Sat, 2022-06-04 at 13:51 +0200, Alexander Kanavin wrote:
     > > Here's something I didn't think of before. Has this occurred
    anywhere
     > > else except Ubuntu 18.04?
     >
     > https://bugzilla.yoctoproject.org/show_bug.cgi?id=14096
    <https://bugzilla.yoctoproject.org/show_bug.cgi?id=14096>
     >
     > I'm struggling to get the data out from the old builds, one

mentions

Quoted 3 lines
Quoted 3 lines

> ubuntu1604, there is an ubuntu1804 on both x86 and arm hosts. >
> It is possible this is an ubuntu specific make issue or a make

bug.

Quoted 6 lines
Quoted 6 lines

Ubuntu 18.04 uses make 4.1 which is old (Oct 2014).

I noticed these patches from 2016:

https://git.savannah.gnu.org/cgit/make.git/commit/?id=9bb994e8319c2b153cd3d6d61e2c2882895e7c3a

Quoted 1 line
Quoted 1 line
    <

https://git.savannah.gnu.org/cgit/make.git/commit/?id=9bb994e8319c2b153cd3d6d61e2c2882895e7c3a

Quoted 2 lines
Quoted 2 lines

https://git.savannah.gnu.org/cgit/make.git/commit/?id=4762480ae9cb8df4878286411f178d32db14eff0

Quoted 1 line
Quoted 1 line
    <

https://git.savannah.gnu.org/cgit/make.git/commit/?id=4762480ae9cb8df4878286411f178d32db14eff0

Quoted 4 lines
Quoted 4 lines

I think we may want to mandate a modern make for both this class of issues and also perhaps for better loadavg support to keep load

under

Quoted 3 lines
Quoted 3 lines

control on the autobuilders.

I'm torn, on the one hand we need to test the distros people use,

on

Quoted 1 line
Quoted 1 line

the other we do need to remove sources of intermittent issues. I

think

Quoted 3 lines
Quoted 3 lines

this bug must be some issue with make itself.

Adding a make-native dependency to perl would "hurt" people on

modern

Quoted 4 lines
Quoted 4 lines
    distros...

Make perhaps does not have many complex dependency needs so it might

not

Quoted 7 lines
Quoted 2 lines

be as bad

My master build is already building make-native due to a dependency from glibc, since 2018:

Quoted 9 lines

https://git.openembedded.org/openembedded-core/commit/?id=0cd89e4af625941f8ab8c033f72f900a2979b304

Quoted 2 lines

Don't know if that dependency is still valid though.

It is a fair point. We may as well add it to perl/perl-native. Centos7 still has make 3.82 but I think we now already require buildtools tarball there so we could probably drop the glibc dependency on make- native now.

Would it be a bad idea to add make-native to DEPENDS depending on whether the host version of make is new enough or not ? Would it break sstate cache reuse in some way ?

Quoted 1 line
#9 lore raw
Quoted 86 lines · Jacob Kroon
Quoted 74 lines · On Sat, 4 Jun 2022, 19:40 Richard Purdie, <[email protected]>…
Quoted 73 lines · Jacob Kroon
Quoted 56 lines · Khem Raj

On Sat, Jun 4, 2022 at 6:23 AM Richard Purdie <[email protected] <mailto:[email protected]>> wrote:

     On Sat, 2022-06-04 at 13:36 +0100, Richard Purdie via lists.yoctoproject.org <http://lists.yoctoproject.org>
wrote:
      > On Sat, 2022-06-04 at 13:51 +0200, Alexander Kanavin wrote:
      > > Here's something I didn't think of before. Has this occurred
     anywhere
      > > else except Ubuntu 18.04?
      >
      > https://bugzilla.yoctoproject.org/show_bug.cgi?id=14096
     <https://bugzilla.yoctoproject.org/show_bug.cgi?id=14096>
      >
      > I'm struggling to get the data out from the old builds, one mentions
      > ubuntu1604, there is an ubuntu1804 on both x86 and arm hosts.
      >
      > It is possible this is an ubuntu specific make issue or a make bug.

     Ubuntu 18.04 uses make 4.1 which is old (Oct 2014).

     I noticed these patches from 2016:


 https://git.savannah.gnu.org/cgit/make.git/commit/?id=9bb994e8
319c2b153cd3d6d61e2c2882895e7c3a

 <https://git.savannah.gnu.org/cgit/make.git/commit/?id=9bb994e
8319c2b153cd3d6d61e2c2882895e7c3a>

 https://git.savannah.gnu.org/cgit/make.git/commit/?id=4762480a
e9cb8df4878286411f178d32db14eff0

 <https://git.savannah.gnu.org/cgit/make.git/commit/?id=4762480
ae9cb8df4878286411f178d32db14eff0>

     I think we may want to mandate a modern make for both this class of
     issues and also perhaps for better loadavg support to keep load under
     control on the autobuilders.

     I'm torn, on the one hand we need to test the distros people use, on
     the other we do need to remove sources of intermittent issues. I think
     this bug must be some issue with make itself.

Quoted 9 lines

     Adding a make-native dependency to perl would "hurt" people on modern
     distros...

Make perhaps does not have many complex dependency needs so it might not
be as bad

My master build is already building make-native due to a dependency from
glibc, since 2018:

https://git.openembedded.org/openembedded-core/commit/?id=0cd89e4af625941f8ab8c033f72f900a2979b304

Quoted 8 lines
Quoted 1 line

Don't know if that dependency is still valid though.

It is a fair point. We may as well add it to perl/perl-native. Centos7
still has make 3.82 but I think we now already require buildtools tarball there so we could probably drop the glibc dependency on make-
native now.

Quoted 3 lines

Would it be a bad idea to add make-native to DEPENDS depending on whether the host version of make is new enough or not ? Would it break sstate cache reuse in some way ?

We can't have a conditional dependency like that, the task checksums as implemented today wouldn't work and it would break ssttate reuse.

Cheers,

Richard