Bug 1789116 - make: occasional deadlock when using parallel build
Summary: make: occasional deadlock when using parallel build
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: make
Version: 8.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.0
Assignee: DJ Delorie
QA Contact: Michal Kolar
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-01-08 19:21 UTC by DJ Delorie
Modified: 2023-07-18 14:30 UTC (History)
3 users (show)

Fixed In Version: gcc-toolset-9-make-4.2.1-2.el8
Doc Type: Bug Fix
Doc Text:
Cause: make's job server may block waiting for a job token Consequence: builds with high -j values may slow down or run at lower effective -j values Fix: job server logic was changed to non-blocking Result: builds with high -j values should run at full -j speed
Clone Of:
Environment:
Last Closed: 2020-04-28 16:04:37 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:1742 0 None None None 2020-04-28 16:04:39 UTC

Description DJ Delorie 2020-01-08 19:21:46 UTC
This bug was initially created as a copy of Bug #1774790

This bug was initially created as a copy of Bug #1556839

I am copying this bug because: 
This bug is present in RHEL 8 (gcc-toolset-9-make-4.2.1-9.el8).


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 2 Michal Kolar 2020-02-07 11:31:59 UTC
Verified against gcc-toolset-9-make-4.2.1-2.el8.
SanityOnly because of unstable reproducer. Required patch was successfully applied.

Comment 3 Oss Tikhomirova 2020-03-24 01:32:23 UTC
Setting requires_doc_text to "-" since one release note for both make versions will be provided through this BZ bug: https://bugzilla.redhat.com/show_bug.cgi?id=1774790.

Comment 5 errata-xmlrpc 2020-04-28 16:04:37 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:1742


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