GNU bug report logs - #68860
race condition with make recheck

Previous Next

Package: automake;

Reported by: Peter Johansson <trojkan <at> gmail.com>

Date: Thu, 1 Feb 2024 01:13:01 UTC

Severity: normal

Full log


View this message in rfc822 format

From: Bogdan <bogdro_rep <at> gmx.us>
To: Karl Berry <karl <at> freefriends.org>, 68860 <at> debbugs.gnu.org, trojkan <at> gmail.com
Subject: bug#68860: race condition with make recheck
Date: Sun, 25 Aug 2024 20:43:31 +0200
Karl Berry <karl <at> freefriends.org>, 2024-08-25 10:45:
> Thanks much, Bogdan.
>
>      -recheck: all %CHECK_DEPS%
>      +recheck: all-am %CHECK_DEPS%
>
> Do you have a grip on all-am? Looking at handle_all in bin/automake, I
> admit I remain baffled as to what all those pieces of all-am are, and
> why it's done as it is.


 Te be honest, not really :). At least, not fully. As far as I
understand/remember, those "all-am" were the ones processed
recursively. But, I may be wrong, seeing this comment in handle_all:

	# We need to make sure config.h is built before we recurse.
	# We also want to make sure that built sources are built
	# before any ordinary 'all' targets are run.  We can't do this
	# by changing the order of dependencies to the "all" because
	# that breaks when using parallel makes.  Instead we handle
	# things explicitly.

So, "all" just checks/remakes config.h before starting "the real work"
in all-am (be it recursive or not, parallel or not).


>      -  $output_rules .= "check-am: all-am\n";
>      +  $output_rules .= "check-am: all-am";
>         if (@check)
>           {
>      -      pretty_print_rule ("\t\$(MAKE) \$(AM_MAKEFLAGS)", "\t  ", @check);
>      +      $output_rules .= " @check";
>      +      #pretty_print_rule ("\t\$(MAKE) \$(AM_MAKEFLAGS)", "\t  ", @check);
>             depend ('.MAKE', 'check-am');
>           }
>      +  $output_rules .= "\n";
>
> So I gather the basic fix to output the check targets as dependencies of
> check-am, instead of as sub-makes. That seems a plausible reason and fix
> for the parallel bug to me.


 Yes, I'm adding the dependencies as I believe they should be. Here
and in check.am. Maybe the check.am is too much (especially seeing
that skipping the dependency on config.h may *not* be desired) and
fixing only the code will be enough.
 As it is with non-deterministic problem, it's not 100% guaranteed
that this fixes the problem. But, a few runs of parallel 'make
recheck' seems to prove it.


> Anyway, I will tweak a few words and install this soon. --thanks again, karl.


 No problem. And thanks :)

--
Regards - Bogdan ('bogdro') D.                 (GNU/Linux & FreeDOS)
X86 assembly (DOS, GNU/Linux):    http://bogdro.evai.pl/index-en.php
Soft(EN): http://bogdro.evai.pl/soft  http://bogdro.evai.pl/soft4asm
www.Xiph.org  www.TorProject.org  www.LibreOffice.org  www.GnuPG.org




This bug report was last modified 291 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.