make-3.81 isn't parallel build safe Reproducible: Always Steps to Reproduce: To reproduce it, after glibc build is done, in glibc build directory: [hjl@gnu-25 build-x86_64-linux]$ rm -rf iconv [hjl@gnu-25 build-x86_64-linux]$ make -j4 PARALLELMFLAGS=-j4 > make.log make[2]: warning: -jN forced in submake: disabling jobserver mode. make[2]: warning: -jN forced in submake: disabling jobserver mode. mkdir /export/build/gnu/glibc-nptl-local/build-x86_64-linux/iconv gconv_open.c: In function ‘__gconv_open’: gconv_open.c:59: warning: ‘ptr’ may be used uninitialized in this function gconv_open.c: In function ‘__gconv_open’: gconv_open.c:59: warning: ‘ptr’ may be used uninitialized in this function make[2]: warning: -jN forced in submake: disabling jobserver mode. make[2]: warning: -jN forced in submake: disabling jobserver mode. No rule to make target `/export/build/gnu/glibc-nptl-local/build-x86_64-linux/iconv/charmap.o', needed by `others' make[1]: *** [iconv/others] Aborted (core dumped) make: *** [all] Error 2 [hjl@gnu-25 build-x86_64-linux]$ he problem is when start_job_command closes job_fds, it doesn't set them to -1. Then the same fd is returned by opendir. Later it is used for pipe again. From there, everything goes down hill.
Not devrel; reassigning.
the command run there is invalid anyways ... that isnt how glibc is supposed to be built ... so unless there's a realistic example of this causing problems, i'll just wait for upstream to merge a fix
Created attachment 131561 [details, diff] main.c (jobserver_fds_invalid_flag) * main.c (jobserver_fds_invalid_flag): New. (switches): Add jobserver_fds_invalid_flag. (main): Skip job_fds if jobserver_fds_invalid_flag is nonzero. Add --jobserver-fds-invalid when re-exec if jobserver_fds_invalid_flag is nonzero. (clean_jobserver): Check if job_fds[0] >= 0 nefore closing job_fds. Set jobserver_fds_invalid_flag to 1 after closing job_fds.
RedHat never included this patch in the end, and I don't think we should either. https://bugzilla.redhat.com/show_bug.cgi?id=212111