Bug 12029 - Makefile missing dep gives parallel race for rounding.h
Makefile missing dep gives parallel race for rounding.h
Status: RESOLVED FIXED
Product: rsync
Classification: Unclassified
Component: core
3.1.2
All All
: P5 minor
: ---
Assigned To: Wayne Davison
Rsync QA Contact
:
: 10910 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-07-20 07:12 UTC by Greg Whiteley
Modified: 2016-07-20 15:54 UTC (History)
1 user (show)

See Also:


Attachments
Patch to depend on generated proto.h for rounding.h (896 bytes, patch)
2016-07-20 07:22 UTC, Greg Whiteley
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Greg Whiteley 2016-07-20 07:12:15 UTC
I've observed a make race when building in parallel against 3.1.1 and 3.1.2.

Reproducibility is low - I've had a CI machine building ~once a week for over a year and just now its hit twice in a row - never before.  Can't reproduce it on my own machine.

> $ git clone ...
> ./configure --prefix=/path/to/sysroot/rpi/usr --disable-ipv6 --disable-locale --disable-iconv-open --disable-iconv --disable-acl-support --disable-xattr-support --host=arm-linux-gnueabihf
> $ make -j8
> perl ./mkproto.pl ./*.c ./lib/compat.c
> sed 's;\@bindir\@;/home/buildbot/slaves/enterprise-master/enterprise-rootfs-master/build/sysroot/rpi/usr/bin;g' <./rsync-ssl.in >rsync-ssl
> sed 's;\@stunnel4\@;stunnel;g' <./stunnel-rsync.in >stunnel-rsync
> sed 's;\@bindir\@;/home/buildbot/slaves/enterprise-master/enterprise-rootfs-master/build/sysroot/rpi/usr/bin;g' <./stunnel-rsyncd.conf.in >stunnel-rsyncd.conf
> Copying srcdir rsync.1
> cp: cannot stat ‘./rsync.1’: No such file or directory
> make: [man-copy] Error 1 (ignored)
> Copying srcdir rsyncd.conf.5
> cp: cannot stat ‘./rsyncd.conf.5’: No such file or directory
> make: [man-copy] Error 1 (ignored)
> arm-linux-gnueabihf-gcc -std=gnu99 -I. -I. -I./zlib -I./popt -g -O2 -DHAVE_CONFIG_H -Wall -W -Wno-unused-parameter  -c rsync.c -o rsync.o
> In file included from ./rounding.c:20:0:
> ./rsync.h:1006:19: fatal error: proto.h: No such file or directory
>  #include "proto.h"
>                    ^
> compilation terminated.
> Failed to create rounding.h!
> make: *** [rounding.h] Error 1
> make: *** Waiting for unfinished jobs....
Comment 1 Greg Whiteley 2016-07-20 07:22:24 UTC
Created attachment 12280 [details]
Patch to depend on generated proto.h for rounding.h

The temporary `rounding` requires rsync.h to be includable, which requires proto.h to have been pre-generated

Generation of rounding.h seems to be the only exception to the proto.h dependencies applied by line 96:

> $(OBJS): $(HEADERS)


This is almost certainly a duplicate of bug 10910, however without context in that error report I cannot be sure.

If they are duplicate then the patch attached to bug 10910 is not correct as proto.h rsync.h is source and not generated by make, and thus its "up-to-date" status is dependent on checkout ordering.
Comment 2 Wayne Davison 2016-07-20 15:52:12 UTC
I've committed your patch to git for the next release. Thanks!
Comment 3 Wayne Davison 2016-07-20 15:54:02 UTC
*** Bug 10910 has been marked as a duplicate of this bug. ***