cygporter / git

Cygwin Git packaging paraphernalia
2 stars 2 forks source link

Build race condition #60

Closed me-and closed 10 months ago

me-and commented 11 months ago

I'm seeing intermittent errors from builds that appear to be a race condition where one build script attempts to load user-manual.xml before it's fully written. This produces errors like the below:

make[2]: 'GIT-VERSION-FILE' is up to date.
    * new asciidoc flags
    ASCIIDOC user-manual.xml
make[2]: 'GIT-VERSION-FILE' is up to date.
make[2]: 'GIT-VERSION-FILE' is up to date.
    DB2TEXI user-manual.texi
    GEN howto-index.txt
user-manual.xml:1236: parser error : Premature end of data in tag screen line 1233

^
unable to parse user-manual.xml
Unable to recognise encoding of this document at /usr/share/perl5/vendor_perl/5.36/XML/SAX/PurePerl/EncodingDetect.pm line 100.
Document requires an element [Ln: 1, Col: 0]
make[1]: *** [Makefile:385: user-manual.texi] Error 255
make[1]: Leaving directory '/cygdrive/d/a/git/git/git-2.42.0-1.x86_64/build/Documentation'
make: *** [Makefile:2852: info] Error 2
make: *** Waiting for unfinished jobs....

(Full build output from the cygport compile step at https://gist.github.com/me-and/135266b610077cd39fe73b4950f1aded; this was the build at https://github.com/cygporter/git/actions/runs/6576970490/job/17867550305.)

me-and commented 11 months ago

Not sure what could be causing this, but the intermingled build output isn't helping. Possibly using one of the -O options to make would help? Possibly one of the --shuffle options would let me reproduce the behaviour more reliably? Possibly it's just some Cygwin-specific file flushing behaviour and the fix is just adding a sleep at the end of the recipe for making user-manual.xml