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(4556,0x7fffcca583c0) malloc: *** malloc_zone_unregister() failed for 0x7fffcca4f548 on OSX 10.12 beta 2 #34674

Closed
glandium opened this issue Jul 5, 2016 · 13 comments · Fixed by #34719
Labels
E-help-wanted Call for participation: Help is requested to fix this issue.

Comments

@glandium
Copy link
Contributor

glandium commented Jul 5, 2016

Heads up: Running the rust compiler on OSX 10.12 beta 2 leads to the following error message:

rustc(4556,0x7fffcca583c0) malloc: *** malloc_zone_unregister() failed for 0x7fffcca4f548

Then the process gets stuck.

This roots from the malloc zone registration code in jemalloc 3, which is shared with Firefox's replace-malloc and causes the same issue on Firefox (https://bugzilla.mozilla.org/show_bug.cgi?id=1284677)

Filed jemalloc issue: jemalloc/jemalloc#420

@brson
Copy link
Contributor

brson commented Jul 5, 2016

Thanks for the report! This is scheduled for release Thursday. @glandium is 10.12 beta 2 compatible with stable and/or nightly?

@brson
Copy link
Contributor

brson commented Jul 5, 2016

Since this is an unreleased version of OS X, and the final release isn't scheduled until fall, I think it's not a pressing issue, but we should solve it for 1.11.

@brson brson added T-tools E-help-wanted Call for participation: Help is requested to fix this issue. labels Jul 5, 2016
@brson
Copy link
Contributor

brson commented Jul 5, 2016

Nominating because this is a high priority issue someone should investigate.

glandium added a commit to glandium/rust that referenced this issue Jul 8, 2016
alexcrichton added a commit to rust-lang/jemalloc that referenced this issue Jul 8, 2016
bors added a commit that referenced this issue Jul 9, 2016
Update jemalloc to include a fix for startup issues on OSX 10.12

This fixes jemalloc/jemalloc#140 in the version used by the rust compiler.

Fixes #34674
@jansegre
Copy link

As a data point, I don't experience this issue on nightly (9f1ffdd 2016-07-11), but I do on stable. I'm on macOS 10.12 Beta (16A238m).

alexcrichton pushed a commit to alexcrichton/rust that referenced this issue Jul 19, 2016
@tzakharko
Copy link

I am still experiencing this issue when trying to build rust on OS X. Rustc just enters a (seemingly) infinite loop with a comparable error message. Note: this also happens if I disable jemalloc via the --disable-jemalloc option to configure. This is under Sierra Dev build 6 (16A294a), Rust 413ada3

@e-oz
Copy link

e-oz commented Aug 20, 2016

@tzakharko can't reproduce.
Beta 12 installed successfully and working fine on Sierra 10.12 Beta (16A294a).

@tzakharko
Copy link

@e-oz True, Beta 12 is building and working correctly. However, the current master does not. I do not know whether its a regression or not, as I have no idea about how Rust repo is organised.

@ghost
Copy link

ghost commented Aug 26, 2016

Hey, just wanted to know what's the status on this? jemalloc has fixed this on their end, by PR jemalloc/jemalloc#427. Is there an update yet for this?

@zeusdeux
Copy link

This is still broken on macOS Sierra version 10.12 (16A323).

I tried to upgrade my local rust installation using homebrew (brew update && brew upgrade rust) and that lead to the build hanging on make

Output reported by homebrew:

==> ./configure --prefix=/usr/local/Cellar/rust/1.11.0 --enable-clang --release-channel=stable
==> make

@tzakharko
Copy link

@zeusdeux Installing with --HEAD works

@cielavenir
Copy link

However currently we have to kill docdir stuff from install.mk.
https://raw.githubusercontent.com/cielavenir/homebrew-ciel/master/patch/rust.patch

pmatos pushed a commit to LinkiTools/rust that referenced this issue Sep 27, 2016
@keeganstothert
Copy link

came issue on official release of high sierra. rustc errors (with above error) and cargo just hangs.

@peterbe
Copy link

peterbe commented Dec 18, 2021

Still a thing apparently. I'm on macOS 11.6.1 and I had (long ago) installed rust with brew. I'm pretty sure it's the brew upgrade here. I ran brew upgrade rust
Before i had:

▶ rustc --version
rustc 1.56.0

The upgrade looked like this:
Screen Shot 2021-12-18 at 2 35 33 PM

I've lost it now but I got the this same error (OT of this issue) when running rustc --version.

Anyway, think what happened was that I had started a terminal BEFORE the upgrade. Creating a fresh new terminal now "solves" it and all is well:

▶ rustc --version
rustc 1.56.1

So basically, if anybody else sees this: create a new terminal and see if that makes the error go away.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E-help-wanted Call for participation: Help is requested to fix this issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants