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

rustc: build with jemalloc #152731

Merged
merged 1 commit into from
Dec 31, 2021
Merged

rustc: build with jemalloc #152731

merged 1 commit into from
Dec 31, 2021

Conversation

misuzu
Copy link
Contributor

@misuzu misuzu commented Dec 30, 2021

Motivation for this change

I have to run cargo build several times to build something on macOS, rustc randomly fails with SIGABRT.
This change fixes the issue for me.
Closes #144704

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 22.05 Release Notes (or backporting 21.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

This change should fix intermittent crashes on macOS Monterey.

Co-authored-by: Pavol Rusnak <pavol@rusnak.io>
@misuzu misuzu requested a review from prusnak December 30, 2021 15:46
@ofborg ofborg bot requested review from cstrahan, madjar and globin December 30, 2021 16:36
@ofborg ofborg bot added 10.rebuild-darwin: 501+ 10.rebuild-darwin: 5001+ 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels Dec 30, 2021
@Mic92 Mic92 merged commit 5f4ec0f into NixOS:staging Dec 31, 2021
@lilyball
Copy link
Member

lilyball commented Jan 1, 2022

The official Rust build uses jemalloc on aarch64-darwin (https://github.com/rust-lang/rust/blob/acbe4443cc4c9695c0b74a7b64b60333c990a400/src/ci/github-actions/ci.yml#L456). I am a little concerned by nixpkgs still not using jemalloc on aarch64-darwin.

@Mic92
Copy link
Member

Mic92 commented Jan 2, 2022

The official Rust build uses jemalloc on aarch64-darwin (https://github.com/rust-lang/rust/blob/acbe4443cc4c9695c0b74a7b64b60333c990a400/src/ci/github-actions/ci.yml#L456). I am a little concerned by nixpkgs still not using jemalloc on aarch64-darwin.

We could also switch on aarch64 as well.

@misuzu misuzu deleted the rustc-jemalloc branch June 7, 2022 10:36
jsoo1 pushed a commit to awakesecurity/nixpkgs that referenced this pull request Jul 14, 2022
jsoo1 pushed a commit to awakesecurity/nixpkgs that referenced this pull request Jul 14, 2022
jsoo1 pushed a commit to awakesecurity/nixpkgs that referenced this pull request Nov 6, 2022
jsoo1 pushed a commit to awakesecurity/nixpkgs that referenced this pull request Nov 11, 2022
jsoo1 pushed a commit to awakesecurity/nixpkgs that referenced this pull request Dec 14, 2022
jsoo1 pushed a commit to awakesecurity/nixpkgs that referenced this pull request Jun 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants