Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 193258 - make-3.81 isn't parallel build safe
Summary: make-3.81 isn't parallel build safe
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL: http://savannah.gnu.org/bugs/?18124
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-20 22:49 UTC by Alexey Kretov
Modified: 2010-03-31 22:36 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
main.c (jobserver_fds_invalid_flag) (make-3.81-job-4.patch,5.47 KB, patch)
2007-09-21 21:33 UTC, Alexey Kretov
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Kretov 2007-09-20 22:49:13 UTC
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.
Comment 1 Ferris McCormick (RETIRED) gentoo-dev 2007-09-21 00:29:55 UTC
Not devrel; reassigning.
Comment 2 SpanKY gentoo-dev 2007-09-21 07:45:02 UTC
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
Comment 3 Alexey Kretov 2007-09-21 21:33:40 UTC
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.
Comment 4 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2010-03-31 22:36:11 UTC
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