Bug 229522 - devel/automake: Set MAKE_JOBS_UNSAFE due to race condition when building
Summary: devel/automake: Set MAKE_JOBS_UNSAFE due to race condition when building
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Tijl Coosemans
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-07-05 01:20 UTC by Derek Schrock
Modified: 2018-07-06 13:51 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (tijl)


Attachments
patch-Makefile.in (564 bytes, patch)
2018-07-05 07:36 UTC, Tijl Coosemans
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Derek Schrock 2018-07-05 01:20:48 UTC
While doing a full rebuild inside of a poudriere bulk due to jail version update automake failed to what appears to be a race condition?

...
--- bin/aclocal-1.16 ---
rm -f bin/aclocal-1.16;  ln bin/aclocal bin/aclocal-1.16
--- doc/aclocal-1.16.1 ---
help2man: can't get `--help' info from aclocal-1.16
Try `--no-discard-stderr' if option outputs to stderr
*** [doc/aclocal-1.16.1] Error code 127

make[1]: stopped in /wrkdirs/usr/ports/devel/automake/work/automake-1.16.1
1 error

make[1]: stopped in /wrkdirs/usr/ports/devel/automake/work/automake-1.16.1
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1
...

Should devel/automake port set MAKE_JOBS_UNSAFE due to this?

Rerunning a bulk build for devel/automake in the same jail built automake without issue.  I have logs of both bulk runs if needed.
Comment 1 Tijl Coosemans freebsd_committer freebsd_triage 2018-07-05 07:36:40 UTC
Created attachment 194892 [details]
patch-Makefile.in

Try building with this patch in /usr/ports/devel/automake/files/.
Comment 2 Derek Schrock 2018-07-05 19:10:26 UTC
Since this failing bulk build on the 2nd I haven't been able to reproduce this issue with the current devel/automake rebuilding devel/automake trying 100 bulk builds.

However, performing the same test with this patch in devel/automake/files/ and confirming the patch was being applied those 100 bulk build were all successful as well.

So I have no means to tell if this patch is correct.  However, it doesn't seem to introduce any new issues.

I'd suspect this must have been some extreme corner case that cased devel/automake to fail.
Comment 3 commit-hook freebsd_committer freebsd_triage 2018-07-06 13:41:51 UTC
A commit references this bug:

Author: tijl
Date: Fri Jul  6 13:41:23 UTC 2018
New revision: 474011
URL: https://svnweb.freebsd.org/changeset/ports/474011

Log:
  Add patch to fix parallel build.

  PR:		229522

Changes:
  head/devel/automake/files/
  head/devel/automake/files/patch-Makefile.in
Comment 4 Tijl Coosemans freebsd_committer freebsd_triage 2018-07-06 13:51:30 UTC
I believe the patch fixes the problem.  The help2man command tries to run aclocal-1.16, but that may not exist yet.  It is created on the second line of the output you pasted.  The patch makes help2man run aclocal instead.