-
Notifications
You must be signed in to change notification settings - Fork 116
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
Update jemalloc to 5.0.1 #34
Conversation
Looks like CI is red? Can this also avoid a version bump? There seem to be a ton of changes in flight... |
@alexcrichton I did the version bump because that's what the last commit that updated the allocator did. I'll revert that. |
Did this update bring anything useful? Landing it in rust-lang/rust was abandoned rust-lang/rust#45163 (comment), and now using a new version of this crate in Servo fails to land for possibly the same reason: servo/servo#20640 (comment). |
@SimonSapin it uses Are those bugs reported in jemalloc upstream? Also, what's Android's system allocator? |
I don’t know if they’re really upstream bugs. Servo (and I think Rust as well?) uses a fairly old Android toolchain, presumably for compat with old Android versions. I haven’t found out for sure, but it’s possible that the The system allocator is not really relevant here. Even if it happens to be jemalloc, it’s probably a different version built with a different build system. |
@SimonSapin I've reported that upstream: jemalloc/jemalloc#1175 We'll see what happens. Jemalloc 5.1 will be released soon, so maybe a fix can land on upstream jemalloc for it. I am fine with reverting the jemalloc version here, but if @alexcrichton agrees I'd like to add here the same android build bots that we are using in libc/stdsimd to prevent this from happening again. Upgrading jemallocator shouldn't lead to failures 6 months later in neither Rust nor servo.. |
CC https://github.com/alexcrichton/jemallocator/pull/40, rust-lang/rust#49669 The new version of jemallocator requires a more recent jemalloc https://github.com/alexcrichton/jemallocator/pull/34 which doesn’t build on our current Android toolchain jemalloc/jemalloc#1175. To avoid blocking on figuring that out, duplicate ~70 lines from jemallocator and use the older jemalloc-sys directly.
Fork the jemallocator crate, fix for nightly-2018-04-15 CC https://github.com/alexcrichton/jemallocator/pull/40, rust-lang/rust#49669 The new version of jemallocator requires a more recent jemalloc https://github.com/alexcrichton/jemallocator/pull/34 which doesn’t build on our current Android toolchain jemalloc/jemalloc#1175. To avoid blocking on figuring that out, duplicate ~70 lines from jemallocator and use the older jemalloc-sys directly. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20641) <!-- Reviewable:end -->
I'd be tempted to either patch this locally and/or work around it somehow personally rather than be beholden to ancient versions due to variuos platforms |
Steps to reproduce (in this crate, I’ve not managed to get the same build error with jemalloc directly): In a temporary directory: wget https://dl.google.com/android/repository/android-ndk-r12b-linux-x86_64.zip
unzip -q android-ndk-r12b-linux-x86_64.zip
android-ndk-r12b/build/tools/make_standalone_toolchain.py --arch arm --api 19 --install-dir toolchain In jemallocator:
Full output below. Changing Full output:
|
@SimonSapin so I just started adding android CI to jemallocator and had a dejavu... In fact, before submitting this PR upgrading the jemalloc version, I submitted a PR that did exactly that: add CI for 4 Android targets, amongst many other targets, that would have caught this: https://github.com/alexcrichton/jemallocator/pull/31 In that PR I wrote:
To which @alexcrichton responded:
So the work for expanding the CI of jemallocator was already done. The problem is that nobody did the job of updating jemalloc in rustc, catching failures, and fixing things as necessary. @sfackler tried, but IMO it is much easier to catch and debug failures here in isolation than when running the full rust-lang/rust testsuite. I almost think that if the tests do not pass here, it is actually pointless to try to get the rust-lang/rust tests to pass on all relevant targets. Should I reopen that PR ? |
FWIW that PR uses |
CC https://github.com/alexcrichton/jemallocator/pull/40, rust-lang/rust#49669 The new version of jemallocator requires a more recent jemalloc https://github.com/alexcrichton/jemallocator/pull/34 which doesn’t build on our current Android toolchain jemalloc/jemalloc#1175. To avoid blocking on figuring that out, duplicate ~70 lines from jemallocator and use the older jemalloc-sys directly.
Updates jemalloc to rust-lang/jemalloc branch: rust-2017-10-09