Bug 1556839 - make: occasional deadlock when using parallel build
Summary: make: occasional deadlock when using parallel build
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: make
Version: 30
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: DJ Delorie
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-03-15 11:08 UTC by Ronald Wahl
Modified: 2019-12-20 04:10 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-12-20 04:10:48 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
GNU Savannah 51159 0 None None None 2018-03-15 11:08:54 UTC

Description Ronald Wahl 2018-03-15 11:08:55 UTC
Description of problem:
Parallel make sometimes hangs with processes in zombie state. Happens with large projects like building the kernel.

Version-Release number of selected component (if applicable):
make-4.2.1-4.fc27.x86_64


How reproducible:
Occasionally.

Steps to Reproduce:
1. Do a parallel build of a large project like the linux kernel (make -j8 ...)
2.
3.

Actual results:
Build sometimes hangs and looking in the process list there are <defunct> processes

Expected results:
Build completes

Additional info:
Seems to be a deadlock where the jobserver waits for children to die but at least one child tries to read from the jobserver pipe.
This bug seems to be known upstream:
https://savannah.gnu.org/bugs/?51159
https://savannah.gnu.org/bugs/?49014 (duplicate)

There seems to be a fix in upstream git:
https://git.savannah.gnu.org/cgit/make.git/commit/?id=b552b05251980f693c729e251f93f5225b400714

Comment 1 Ronald Wahl 2018-03-15 13:32:25 UTC
The make package in Fedora 26 is affected as well

Comment 2 Ben Cotton 2018-11-27 16:37:49 UTC
This message is a reminder that Fedora 27 is nearing its end of life.
On 2018-Nov-30  Fedora will stop maintaining and issuing updates for
Fedora 27. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora  'version' of '27'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 27 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 3 Ronald Wahl 2018-11-29 16:06:55 UTC
Looking at the make package of F29 I do not see it fixed yet.

Comment 4 Enrico Scholz 2019-07-29 13:37:07 UTC
seen with make-4.2.1-13.fc30.x86_64 too:

ensc      9816  0.0  0.0  12268  3320 ?        S    13:15   0:00  |               \_ make -C .../kernel-source O=.../build/. modules
ensc      9819  0.0  0.0  13012  6712 ?        S    13:15   0:00  |                   \_ make -C .../build KBUILD_SRC=.../kernel-source -f /srv/.oe/doc
ensc     12906  0.0  0.0   9900  3796 ?        S    13:15   0:00  |                       \_ make -f .../kernel-source/scripts/Makefile.build obj=drivers
ensc     16328  0.0  0.0  10112  4040 ?        S    13:15   0:00  |                       |   \_ make -f .../kernel-source/scripts/Makefile.build obj=drivers/md
ensc     17381  0.0  0.0      0     0 ?        Z    13:15   0:00  |                       |   |   \_ [sh] <defunct>
ensc     16343  0.0  0.0  10112  4080 ?        S    13:15   0:00  |                       |   \_ make -f .../kernel-source/scripts/Makefile.build obj=drivers/media
ensc     16735  0.0  0.0   9628  3552 ?        S    13:15   0:00  |                       |       \_ make -f .../kernel-source/scripts/Makefile.build obj=drivers/media/platform
ensc     16917  0.0  0.0   9728  3712 ?        S    13:15   0:00  |                       |           \_ make -f .../kernel-source/scripts/Makefile.build obj=drivers/media/platform/imx
ensc     17211  0.0  0.0      0     0 ?        Z    13:15   0:00  |                       |               \_ [sh] <defunct>
ensc     14326  0.0  0.0   9728  3684 ?        S    13:15   0:00  |                       \_ make -f .../kernel-source/scripts/Makefile.build obj=sound
ensc     17331  0.0  0.0      0     0 ?        Z    13:15   0:00  |                           \_ [make] <defunct>

$ date
Mon Jul 29 13:34:02 UTC 2019

A 'kill -HUP' continues the build.

Environment:

- docker container in F30 host (kernel 5.1.19-300.fc30.x86_64)

Comment 5 Enrico Scholz 2019-07-29 14:10:50 UTC
> A 'kill -HUP' continues the build.

ignore this... I wanted to type '-CHLD' but muscle memory made it '-HUP'

Comment 6 Akemi Yagi 2019-11-20 23:29:34 UTC
This problem is now seen with RHEL 8 (make-4.2.1-9.el8). Will file a bug report by cloning this.

Comment 7 Florian Weimer 2019-12-06 10:49:45 UTC
I have seen this with build-many-glibcs.py as well. Is it fixed in Fedora 31? Thanks.

Comment 8 Ronald Wahl 2019-12-06 12:50:56 UTC
No, Still not fixed in Fedora 31.

Comment 9 Akemi Yagi 2019-12-06 18:32:44 UTC
The referenced patch has been confirmed to fix the issue as reported in the corresponding bug I filed for RHEL 8 (BZ #1774790).

Comment 10 DJ Delorie 2019-12-06 21:04:01 UTC
make-4.2.1-15.fc32 has been built and pushed to rawhide, please test:
https://koji.fedoraproject.org/koji/buildinfo?buildID=1420394

Comment 11 Akemi Yagi 2019-12-15 17:29:31 UTC
Copying from a lmkl post (with the current status):

Builds for F30 and F31 are in bodhi, waiting on testing and karma...
https://bodhi.fedoraproject.org/updates/FEDORA-2019-bd81ed62bf  => needs more karma
https://bodhi.fedoraproject.org/updates/FEDORA-2019-a056aa61d4  => in stable

Comment 12 Akemi Yagi 2019-12-20 01:23:42 UTC
As of Dec 19, 2019, the make patch for F30 got 3 kerma's. Current update status is:

F30: pushed to stable today
F31: pushed to stable 7 days ago

Comment 13 DJ Delorie 2019-12-20 04:10:48 UTC
Closing now that builds with this patch have been pushed to F30/F31.


Note You need to log in before you can comment on or make changes to this bug.