Regression on Cygwin: Problems with parallel make in 4.4
Several packages that used to build fine on Cygwin with parallel make now fail to build. I either get strange errors or a hang. The problems started with version 4.4 and seem to stem from the fact that make now uses a FIFO by default instead of a pipe. If I use the flag '--jobserver-style=pipe', parallel make works again. A recent example is described here: https://tug.org/pipermail/tlbuild/2023q1/005290.html There may be a bug in Cygwin's FIFO implementation underlying this, but nevertheless it's a regression from 4.3 to 4.4, and most Cygwin users won't know that they have to use the --jobserver-style flag. I suggest that you provide a configure option to set the jobserver style at the time make is built, and set it to 'pipe' by default on Cygwin. Thanks. Ken
Re: Regression on Cygwin: Problems with parallel make in 4.4
On 2/15/2023 1:34 PM, Bruno Haible wrote: Paul Smith wrote: And possibly also on GNU/Hurd. Cf. https://lists.gnu.org/archive/html/bug-make/2023-01/msg00107.html I may be misremembering but I thought that you had tried forcing the pipe jobserver option on GNU/Hurd and it didn't help. This must be a misunderstanding. I never said that. I don't even know how to do this, within the framework of GNU make's test suite. All I said was, comparing the Cygwin failures with the GNU/Hurd failures [1]: "In all these failures, where we see an error message "Leftover temporary files" in GNU/Hurd, we see "Device or resource busy" in Cygwin." Bruno [1] https://lists.gnu.org/archive/html/bug-make/2023-01/msg00134.html One thing to keep in mind here is that your tests on Cygwin were done on Cygwin 2.9.0, in which FIFOs were very poorly supported. For example, a FIFO couldn't have multiple readers or writers. If GNU/Hurd has similar limitations, that could explain the similar test results. Cygwin's FIFO implementation was completely rewritten starting with 3.0, and it now supports multiple readers and writers. So the issue with current Cygwin is more likely a bug in Cygwin and/or make. Marco, did you by any chance run the test suite when you built make for Cygwin? It would by interesting to know what test failures there are with Cygwin 3.4.6. Ken P.S. Here's a footnote about the failures I'm seeing. I cited https://tug.org/pipermail/tlbuild/2023q1/005290.html , in which I reported problems with the build of TeX Live. I said I had a hang in 'make -j13 world'. This was an oversimplification. What really happens is that the hang occurs when I run the 'Build' script provided by the TeX Live sources. This is a shell script that runs make in a further sub-shell. If I simply run 'make -j13 world' without using the Build script, it doesn't hang. I don't know if this provides any clue as to where the problem is.
Re: Regression on Cygwin: Problems with parallel make in 4.4
On 2/19/2023 8:49 AM, Paul Smith wrote: On Wed, 2023-02-15 at 13:57 -0500, Ken Brown wrote: One thing to keep in mind here is that your tests on Cygwin were done on Cygwin 2.9.0, in which FIFOs were very poorly supported. For example, a FIFO couldn't have multiple readers or writers. If GNU/Hurd has similar limitations, that could explain the similar test results. Cygwin's FIFO implementation was completely rewritten starting with 3.0, and it now supports multiple readers and writers. So the issue with current Cygwin is more likely a bug in Cygwin and/or make. GNU make _definitely_ has multiple readers/writers (that's really the whole point :)). So I'm not sure where to go from here on Cygwin. Should I force Cygwin builds to use the "pipe" jobserver, as I've done for GNU/Hurd? My preference would be for you to provide a configure option, which defaults to "pipe" on Cygwin. But if you don't want to do that, then I think you should force Cygwin builds to use "pipe". Should I add preprocessor checks (or autoconf checks?) to try to figure out which version of Cygwin is being used and choose based on that? I don't know how to check versions. That wouldn't help. There's currently no known version of Cygwin on which the fifo option works well. (Bruno tested on old version, I tested the current version.) Ken
Re: Regression on Cygwin: Problems with parallel make in 4.4
On 2/19/2023 9:29 AM, Paul Smith wrote: On Sun, 2023-02-19 at 09:17 -0500, Ken Brown wrote: So I'm not sure where to go from here on Cygwin. Should I force Cygwin builds to use the "pipe" jobserver, as I've done for GNU/Hurd? My preference would be for you to provide a configure option, which defaults to "pipe" on Cygwin. But if you don't want to do that, then I think you should force Cygwin builds to use "pipe". There is (in my current implementation, not released yet) a way to do that but it's a little obscure; you need to use: ./configure CPPFLAGS=-DJOBSERVER_USE_FIFO=0 or ./configure CPPFLAGS=-DJOBSERVER_USE_FIFO=1 That's good. If you set it explicitly then that setting is obeyed regardless of the capabilities of the system (well, if mkfifo() is not available then trying to enable it is a no-op of course). Should I add preprocessor checks (or autoconf checks?) to try to figure out which version of Cygwin is being used and choose based on that? I don't know how to check versions. That wouldn't help. There's currently no known version of Cygwin on which the fifo option works well. (Bruno tested on old version, I tested the current version.) OK but I noted you said: If I simply run 'make -j13 world' without using the Build script, it doesn't hang. so I wasn't sure if we were considering that a "full failure". I agree that it's not a full failure, but it's annoying when it happens. In my use case (building TeX Live using the supplied Build script), the build runs for about 2 hours before it fails. I guess if we don't know why it happens, we just have to disable mkfifo(). I will change the default setting of the jobserver to use "pipe" on Cygwin, at least for now. Thanks. Ken
Re: GNU Make 4.4.0.91 on Cygwin
On 2/19/2023 2:59 PM, Paul Smith wrote: On Sun, 2023-02-19 at 20:32 +0100, Bruno Haible wrote: All "Device or resource busy" failures are gone. Only the 1 failure in category 'misc/general4' is still present. Hm. This is a test of this: https://savannah.gnu.org/bugs/index.php?57674 which explicitly removes PATH from the environment completely. It should use a default PATH, which should mean "echo" works even so. I'm not really sure how this should react on a cygwin system, but I guess since it behaves properly on Windows and POSIX it should work on cygwin as well. I'll have to figure out why only cygwin isn't working. All tests pass on my Cygwin 3.4.6 system. Ken
Re: Regression on Cygwin: Problems with parallel make in 4.4
On 2/19/2023 9:29 AM, Paul Smith wrote: I will change the default setting of the jobserver to use "pipe" on Cygwin, at least for now. Parallel make is still not working reliably. I've just discovered that my TeX Live build logs have several occurrences of the following warning: jobserver unavailable: using -j1. Add '+' to parent make rule. This has been going on since I first started using 4.4.0.90 with the jobserver style set to "pipe". It *only* occurs when the jobserver uses a pipe. Two others in the Cygwin community are reporting the same thing when they build projects using cmake (with Unix Makefiles and make 4.4.0.91). I don't know if this is Cygwin-specific, since other platforms (except GNU/Hurd) are using fifos. So the "pipe" jobserver style might not have gotten a lot of testing since the switch to fifos was made. I guess the first step in tracking this down is for people working on other platforms to see if they can reproduce the problem when they set the jobserver style to "pipe". Unfortunately, I don't have a simple reproduction recipe. I myself have seen it when building TeX Live, as I've said, and also when building doxygen (which uses cmake with Unix Makefiles). The other Cygwin users who have reported the problem (both CC'd) haven't yet said what cmake projects they were building. Ken
Re: Regression on Cygwin: Problems with parallel make in 4.4
On 2/21/2023 12:27 AM, Paul Smith wrote: On Mon, 2023-02-20 at 20:21 -0500, Ken Brown wrote: Parallel make is still not working reliably. I've just discovered that my TeX Live build logs have several occurrences of the following warning: jobserver unavailable: using -j1. Add '+' to parent make rule. This has been going on since I first started using 4.4.0.90 with the jobserver style set to "pipe". It *only* occurs when the jobserver uses a pipe. Two others in the Cygwin community are reporting the same thing when they build projects using cmake (with Unix Makefiles and make 4.4.0.91). Just to note, I do run the regression test suite with the equivalent of "jobserver-style=pipe" (basically I force the configure to believe that the system doesn't support mkfifo() so it falls back to "pipe" mode). Can you run builds with GNU Make 4.4 and --jobserver-style=pipe? Do you see the same warnings there? I just want to know if the problem happened in 4.4 or post-4.4. If the latter, that's very odd. If the former, it's more understandable because we did make the "pipe" mode more strict in 4.4. I do see it in 4.4 with --jobserver-style=pipe. I misspoke when I said I first saw it in 4.4.0.90. This message means only one thing: the parent make didn't provide the proper environment (that is, the correct file descriptors) to its sub- make. However, there could be different ways in which the environment is wrong. If you have the ability, it would be helpful if you could apply the attached patch to your build of GNU Make and try the build again, and let me know which of these different messages are generated right before the above error. I'll be able to do that later today. It would also be very helpful if someone could provide me with the complete rule that the parent make uses to invoke the sub-make, where that message appears. And, if you can include the output that make generates to invoke the submake (the command it prints) that would be excellent as well. I'll try, again later.
Re: Regression on Cygwin: Problems with parallel make in 4.4
On 2/21/2023 9:39 AM, Paul Smith wrote: On Tue, 2023-02-21 at 08:35 -0500, Ken Brown wrote: make check-TESTS make[4]: Entering directory '/home/kbrown/src/texlive/test.x86_64/Work/texk/kpathsea' make[5]: Entering directory '/home/kbrown/src/texlive/test.x86_64/Work/texk/kpathsea' OK, I see the rule that generates the [5] recursion: $(TEST_SUITE_LOG): $(TEST_LOGS) @$(am__set_TESTS_bases); \ ... (I think). Hm, this rule does contain $(MAKE) so it should be automatically marked for recursion. Maybe something weird about AM_MAKEFLAGS? Sorry for the iteration but can you run the build again, this time with the "--trace" option and also editing the above rule (at line 1755 of kpathsea/Makefile to add "set -x" as in: $(TEST_SUITE_LOG): $(TEST_LOGS) @$(set -x; am__set_TESTS_bases); \ ... There will likely be a lot of output. Here it is. KenMakefile:570: update target 'check-recursive' due to: target is .PHONY fail=; \ if (target_option=k; case ${target_option-} in ?) ;; *) echo "am__make_running_with_option: internal error: invalid" "target option '${target_option-}' specified" >&2; exit 1;; esac; has_opt=no; sane_makeflags=$MAKEFLAGS; if { if test -z '0'; then false; elif test -n 'x86_64-pc-cygwin'; then true; elif test -n '4.4.0.91' && test -n '/home/kbrown/src/texlive/test.x86_64/Work'; then true; else false; fi; }; then sane_makeflags=$MFLAGS; else case $MAKEFLAGS in *\\[\ \ ]*) bs=\\; sane_makeflags=`printf '%s\n' "$MAKEFLAGS" | sed "s/$bs$bs[$bs $bs ]*//g"`;; esac; fi; skip_next=no; strip_trailopt () { flg=`printf '%s\n' "$flg" | sed "s/$1.*$//"`; }; for flg in $sane_makeflags; do test $skip_next = yes && { skip_next=no; continue; }; case $flg in *=*|--*) continue;; -*I) strip_trailopt 'I'; skip_next=yes;; -*I?*) strip_trailopt 'I';; -*O) strip_trailopt 'O'; skip_next=yes;; -*O?*) strip_trailopt 'O';; -*l) strip_trailopt 'l'; skip_next=yes;; -*l?*) strip_trailopt 'l';; -[dEDm]) skip_next=yes;; -[JT]) skip_next=yes;; esac; case $flg in *$target_option*) has_opt=yes; break;; esac; done; test $has_opt = yes); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo check-recursive | sed s/-recursive//`; \ case "check-recursive" in \ distclean-* | maintainer-clean-*) list='auxdir/auxsub doc texk/kpathsea texk/ptexenc libs utils texk' ;; \ *) list='. doc texk/kpathsea texk/ptexenc libs utils texk' ;; \ esac; \ for subdir in $list; do \ echo "Making $target in $subdir"; \ if test "$subdir" = "."; then \ dot_seen=yes; \ local_target="$target-am"; \ else \ local_target="$target"; \ fi; \ (CDPATH="${ZSH_VERSION+.}:" && cd $subdir && make $local_target) \ || eval $failcom; \ done; \ if test "$dot_seen" = "no"; then \ make "$target-am" || exit 1; \ fi; test -z "$fail" Making check in . make[1]: Entering directory '/home/kbrown/src/texlive/test.x86_64/Work' Makefile:1002: update target 'recurse' due to: target is .PHONY fail= failcom='exit 1'; \ for f in x $MAKEFLAGS; do \ case $f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ list='texk/kpathsea texk/ptexenc '; for one_dir in $list; do \ if test ! -f $one_dir/Makefile; then \ test -d $one_dir || /usr/bin/mkdir -p $one_dir; \ cmd=`cat subsubdir-conf.cmd | sed "s,auxdir/auxsub,$one_dir,g"`; \ case " texk/kpathsea texk/ptexenc " in \ *" $one_dir "*) skip=;; \ *) skip=' --disable-build';; \ esac; \ (cd $one_dir && echo "=== configuring in $one_dir (`pwd`)" && \ if :; then echo "make: running /bin/sh $cmd$skip"; fi && \ CONFIG_SHELL=/bin/sh && export CONFIG_SHELL && \ eval /bin/sh $cmd$skip || \ { echo "=== configuring in $one_dir failed"; exit 1; }) && \ if test "x$skip" = x; then \ echo "Making all in $one_dir" && \ (cd $one_dir && make all); \ fi || eval $failcom; \ fi; \ done; test -z "$fail" make[1]: Leaving directory '/home/kbrown/src/texlive/test.x86_64/Work' Making check in doc make[1]: Entering directory '/home/kbrown/src/texlive/test.x86_64/Work/doc' make[1]: Nothing to be done for 'check'. make[1]: Leaving directory '/home/kbrown/src/texlive/test.x86_64/Work/doc' Making check in texk/kpathsea make[1]: Entering directory
Re: Regression on Cygwin: Problems with parallel make in 4.4
On 2/21/2023 11:34 AM, Paul Smith wrote: On Tue, 2023-02-21 at 10:36 -0500, Paul Smith wrote: But, I think I might have found the bug. If I'm right, it's a doozy! But, as you mentioned it's not widespread because it only affects pipe jobservers. I'm glad 4.4.1 is almost ready to go. I'll try to write a test case for it to see if I'm right. I was able to write a regression test that shows the bug. Can you please apply the change below and see if it fixes the problem? I don't think this is the final solution I'll apply for 4.4.1 but it will let me know if I'm on the right track. I think you're on the right track. I got through 'make -j13 check' without the jobserver warning. Ken
Re: Regression on Cygwin: Problems with parallel make in 4.4
On 2/21/2023 1:26 PM, Paul Smith wrote: On Tue, 2023-02-21 at 13:11 -0500, Ken Brown wrote: I think you're on the right track. I got through 'make -j13 check' without the jobserver warning. w00t! Thanks for the help. A full fix should be in 4.4.1 which I hope to release this week or weekend. Just as a little icing on the cake, I tried my cmake build of doxygen, and again it went through with no jobserver warnings. Ken
Re: Regression on Cygwin: Problems with parallel make in 4.4
On 2/21/2023 5:59 PM, Ken Brown wrote: On 2/21/2023 1:26 PM, Paul Smith wrote: On Tue, 2023-02-21 at 13:11 -0500, Ken Brown wrote: I think you're on the right track. I got through 'make -j13 check' without the jobserver warning. w00t! Thanks for the help. A full fix should be in 4.4.1 which I hope to release this week or weekend. Just as a little icing on the cake, I tried my cmake build of doxygen, and again it went through with no jobserver warnings. Sorry, I spoke too soon. I just went back to my original use case, in which I used the TeX Live "Build" script instead of directly invoking make, and I again got the jobserver warning. [This is the use case in which I got a hang when using a fifo instead of a pipe.] I'm attaching that script so you can see exactly how "make" is invoked in a subshell. I'm also attaching my build log up to the point of the warning and the Makefile in the ft-build directory in which the warning occurred. I've previously sent you the top-level Makefile. Let me know if you need anything else. Kenstarting TeX Live build at Thu Feb 23 15:43:01 EST 2023 CMDLINE "./Build " PWD "/home/kbrown/src/texlive/test.x86_64/Work" UNAME "CYGWIN_NT-10.0-22621" See also buildenv.log and buildinfo.log in /home/kbrown/src/texlive/test.x86_64/Work + eval ../configure --prefix=/home/kbrown/src/texlive/test.x86_64/inst --datadir=/home/kbrown/src/texlive/test.x86_64/inst --disable-missing --enable-largefile --disable-shared --with-xdvi-x-toolkit=xaw --enable-xindy --enable-shared --enable-silent-rules CLISP=/home/kbrown/src/clisp-texlive/clisp-2.49.92-1.x86_64/build/clisp.exe 'LDFLAGS='\''-Wl,--no-insert-timestamp' '-Wl,--stack,0x80'\''' ../configure --prefix=/home/kbrown/src/texlive/test.x86_64/inst --datadir=/home/kbrown/src/texlive/test.x86_64/inst --disable-missing --enable-largefile --disable-shared --with-xdvi-x-toolkit=xaw --enable-xindy --enable-shared --enable-silent-rules CLISP=/home/kbrown/src/clisp-texlive/clisp-2.49.92-1.x86_64/build/clisp.exe LDFLAGS='-Wl,--no-insert-timestamp -Wl,--stack,0x80' ++ ../configure --prefix=/home/kbrown/src/texlive/test.x86_64/inst --datadir=/home/kbrown/src/texlive/test.x86_64/inst --disable-missing --enable-largefile --disable-shared --with-xdvi-x-toolkit=xaw --enable-xindy --enable-shared --enable-silent-rules CLISP=/home/kbrown/src/clisp-texlive/clisp-2.49.92-1.x86_64/build/clisp.exe 'LDFLAGS=-Wl,--no-insert-timestamp -Wl,--stack,0x80' checking build system type... x86_64-pc-cygwin checking host system type... x86_64-pc-cygwin checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.exe checking for suffix of executables... .exe checking whether we are cross compiling... no checking for suffix of object files... o checking whether the compiler supports GNU C... yes checking whether gcc accepts -g... yes checking for gcc option to enable C11 features... none needed checking whether gcc understands -c and -o together... yes checking for native WIN32 or MINGW32... no configure: Assuming `--with-x' configure: Assuming `--enable-autosp=yes' configure: Assuming `--enable-axodraw2=yes' configure: Assuming `--enable-devnag=yes' configure: Assuming `--enable-lacheck=yes' configure: Assuming `--enable-m-tx=yes' configure: Assuming `--enable-pmx=yes' configure: Assuming `--enable-ps2eps=yes' configure: Assuming `--enable-t1utils=yes' configure: Assuming `--enable-texdoctk=yes' configure: Assuming `--enable-tpic2pdftex=yes' configure: Assuming `--enable-vlna=yes' configure: Assuming `--with-clisp-runtime=default' configure: Assuming `--enable-xml2pmx=yes' configure: Assuming `--enable-xpdfopen=yes' configure: Assuming `--enable-web2c=yes' configure: Assuming `--enable-afm2pl=yes' configure: Assuming `--enable-bibtex-x=yes' configure: Assuming `--enable-chktex=yes' configure: Assuming `--enable-cjkutils=yes' configure: Assuming `--enable-detex=yes' configure: Assuming `--enable-dtl=yes' configure: Assuming `--enable-dvi2tty=yes' configure: Assuming `--enable-dvidvi=yes' configure: Assuming `--enable-dviljk=yes' configure: Assuming `--enable-dviout-util=yes' configure: Assuming `--enable-dvipdfm-x=yes' configure: Assuming `--enable-dvipng=yes' configure: Assuming `--enable-dvipos=yes' configure: Assuming `--enable-dvipsk=yes' configure: Assuming `--enable-dvisvgm=yes' configure: Assuming `--enable-gregorio=yes' configure: Assuming `--enable-gsftopk=yes' configure: Assuming `--enable-lcdf-typetools=yes' configure: Assuming `--enable-makeindexk=yes' configure: Assuming `--enable-makejvf=yes' configure: Assuming `-
Re: Regression on Cygwin: Problems with parallel make in 4.4
On 2/24/2023 9:54 AM, Paul Smith wrote: On Thu, 2023-02-23 at 16:17 -0500, Ken Brown wrote: I'm attaching that script so you can see exactly how "make" is invoked in a subshell. I'm also attaching my build log up to the point of the warning and the Makefile in the ft-build directory in which the warning occurred. I've previously sent you the top-level Makefile. Let me know if you need anything else. The ft-build/Makefile is not the interesting one: by the time make is invoked here it already has the bad arguments. The makefile we want is the one that invoked this make, with the bad arguments; from your build: make[3]: Entering directory '/home/kbrown/src/texlive/test.x86_64/Work/libs/freetype2' rm -rf ft-build /usr/bin/mkdir -p ft-build cd ft-build && \ CC='gcc' CONFIG_SITE=/dev/null CONFIG_SHELL='/bin/sh' \ /bin/sh /home/kbrown/src/texlive/test.x86_64/Work/libs/freetype2/../../../libs/freetype2/freetype-src/configure \ --disable-shared \ --without-bzip2 \ --without-brotli \ --without-harfbuzz \ --without-png \ --without-zlib \ --prefix=/home/kbrown/src/texlive/test.x86_64/Work/libs/freetype2/ft-install \ --libdir=/home/kbrown/src/texlive/test.x86_64/Work/libs/freetype2 \ --includedir=/home/kbrown/src/texlive/test.x86_64/Work/libs/freetype2 so, the makefile we want is the makefile in freetype2 that contains the recipe that invokes the make command in the ft-build subdirectory. OK, I hope I'm attaching the right one now. I thought it might also help for me to send a complete recipe for reproducing the problem rather than just sending bits and pieces. The recipe is adapted from https://www.tug.org/texlive/build.html 1. git clone https://github.com/TeX-Live/texlive-source.git 2. cd texlive-source 3. TL_MAKE_FLAGS="-j13" ./Build The build is then done in texlive-source/Work, which also contains a log file "build.log". On my system the jobserver warning appears after about 10 minutes and is in line 2074 of build.log. I'm using make 4.4.0.91 patched with commit 8b8cc3a825b0e9e176db5d90084c814e3744a300. Ken # Makefile.in generated by automake 1.16.5 from Makefile.am. # Makefile. Generated from Makefile.in by configure. # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. VPATH = ../../../libs/freetype2 am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/freetype--tex-live- pkgincludedir = $(includedir)/freetype--tex-live- pkglibdir = $(libdir)/freetype--tex-live- pkglibexecdir = $(libexecdir)/freetype--tex-live- am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh
Re: Regression on Cygwin: Problems with parallel make in 4.4
On 2/24/2023 11:29 AM, Paul Smith wrote: On Thu, 2023-02-23 at 16:17 -0500, Ken Brown wrote: Sorry, I spoke too soon. I just went back to my original use case, in which I used the TeX Live "Build" script instead of directly invoking make, and I again got the jobserver warning. Thanks for the info. TL;DR: this is not an error in make :) That's a relief. Thanks for the detailed explanation. Ken
Re: Regression on Cygwin: Problems with parallel make in 4.4
I'm returning to this thread because a surprising thing happened. I decided to try to debug the fifo problem I reported at the beginning of the thread (a hang building TeX Live on Cygwin when the jobserver used a fifo). So I installed make 4.4.1 built with fifos enabled (by setting CPPFLAGS=-DJOBSERVER_USE_FIFO=1). And now I can no longer reproduce the hang. The only explanation I can think of is that commit 8b8cc3a825, which was intended to fix a pipe problem, also fixed the fifo problem. Is that plausible? Or does that commit only affect the behavior of make in the pipe case? Ken
Re: Regression on Cygwin: Problems with parallel make in 4.4
On 3/2/2023 5:39 PM, Ken Brown wrote: I'm returning to this thread because a surprising thing happened. I decided to try to debug the fifo problem I reported at the beginning of the thread (a hang building TeX Live on Cygwin when the jobserver used a fifo). So I installed make 4.4.1 built with fifos enabled (by setting CPPFLAGS=-DJOBSERVER_USE_FIFO=1). And now I can no longer reproduce the hang. Update: The hang occurred again. It appears to be caused by an infinite loop starting with a call to pselect[*]. I looked briefly at the code that calls pselect, and I suspect that there is a timing issue. Perhaps certain operations that are supposed to be atomic on Posix platforms are not atomic on Cygwin. (Unfortunately, Cygwin's fifo implementation is extremely complicated in order to support multiple readers and writers, and atomicity had to be sacrificed.) If I'm right, the solution would seem to be to disable the use of pselect on Cygwin when the jobserver is using a fifo. I'll try that on a local build of make and see if I can still reproduce the problem. It might be several weeks until I'm confident, since the hang occurs only sporadically and only after about 90 minutes of running the TeX Live build. Ken [*] I say "appears to be" because I was running an optimized build of make and an optimized build of the Cygwin DLL, so the gdb backtrace might not be reliable.
Re: Regression on Cygwin: Problems with parallel make in 4.4
On 3/11/2023 12:51 PM, Ken Brown wrote: Update: The hang occurred again. It appears to be caused by an infinite loop starting with a call to pselect[*]. [...] If I'm right, the solution would seem to be to disable the use of pselect on Cygwin when the jobserver is using a fifo. I'll try that on a local build of make and see if I can still reproduce the problem. Never mind. My speculation is leading nowhere. I just had 5 successful builds followed by a hang in the 6th attempt. I guess I just have to continue using a pipe for my TeX Live builds. Ken
Re: Regression on Cygwin: Problems with parallel make in 4.4
On 3/13/2023 9:15 AM, Paul Smith wrote: On Sun, 2023-03-12 at 11:25 -0400, Ken Brown wrote: If I'm right, the solution would seem to be to disable the use of pselect on Cygwin when the jobserver is using a fifo. I'll try that on a local build of make and see if I can still reproduce the problem. Never mind. My speculation is leading nowhere. I just had 5 successful builds followed by a hang in the 6th attempt. I guess I just have to continue using a pipe for my TeX Live builds. The latest release (GNU Make 4.4.1) uses pipes for jobserver on both Cygwin and Hurd, which both seem to have problems emulating POSIX-style FIFOs. Did that change not work for you, or did you by-hand force the jobserver to use FIFOs for these tests? We forced it to use FIFOs by configuring with -DJOBSERVER_USE_FIFO=1. Ken
Re: [bug #64806] "invalid output sync mutex" on windows
This is a long shot, but I had a problem a year ago with parallel make on Cygwin occasionally hanging. The solution turned out to be to force make's jobserver to use pipes instead of fifos. If you want to try this, pass make the option '--jobserver-style=pipe'. Ken