Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gnumake: fix occasional hangs in parallel builds #30979

Merged
merged 1 commit into from Oct 30, 2017

Conversation

wizeman
Copy link
Member

@wizeman wizeman commented Oct 30, 2017

Motivation for this change

WARNING: This causes a mass rebuild.

GNU make 4.2.1, which is the most recent stable release, occasionally hangs (especially?) when doing parallel builds.

The included patch seems to fix the issue.

https://savannah.gnu.org/bugs/?49014
https://savannah.gnu.org/bugs/?51159

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@dezgeg
Copy link
Contributor

dezgeg commented Oct 30, 2017

Nice, I have been suffering from (probably) that problem with kernel builds every now and then.

@vcunat
Copy link
Member

vcunat commented Oct 30, 2017

You explicitly use a jobserver?

@dezgeg
Copy link
Contributor

dezgeg commented Oct 30, 2017

Nothing explicit (just nix-build -A linux_latest, typically on ARM), but AFAIK 'jobserver' is just GNU make's internal term for the algorithm for managing build parallelism.

@vcunat
Copy link
Member

vcunat commented Oct 30, 2017

No, you can actually use an external job-server and I have considered doing that instead of -l. Still, I suspect they internally use that to coordinate recursive make invocations.

@vcunat
Copy link
Member

vcunat commented Oct 30, 2017

Ah, the second upstream bug mentions it happening during parallel recurse make.

@vcunat vcunat changed the base branch from master to staging October 30, 2017 22:18
@vcunat vcunat self-assigned this Oct 30, 2017
@vcunat vcunat merged commit 0295222 into NixOS:staging Oct 30, 2017
vcunat added a commit that referenced this pull request Oct 30, 2017
vcunat added a commit that referenced this pull request Nov 1, 2017
(cherry picked from commit 53c6b01)
This fix is perhaps borderline for inclusion on 17.09,
but we have a stdenv rebuild anyway, so let's fix the hangs.
@vcunat
Copy link
Member

vcunat commented Nov 1, 2017

In master and 17.09 now.

@wizeman wizeman deleted the u/fix-gnu-make branch December 1, 2017 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants