Bug 1789116

Summary: make: occasional deadlock when using parallel build
Product: Red Hat Enterprise Linux 8 Reporter: DJ Delorie <dj>
Component: makeAssignee: DJ Delorie <dj>
make sub component: gcc-toolset-9 QA Contact: Michal Kolar <mkolar>
Status: CLOSED ERRATA Docs Contact:
Severity: unspecified    
Priority: unspecified CC: codonell, mcermak, otikhomi
Version: 8.1Keywords: Triaged
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
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
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-04-28 16:04:37 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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