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

Upgrade jemallocator #1953

Merged
merged 1 commit into from
Dec 16, 2019
Merged

Upgrade jemallocator #1953

merged 1 commit into from
Dec 16, 2019

Conversation

jtgeibel
Copy link
Member

Background threads are now enabled for all artifacts by enabling the
background_threads feature.

Reviewing jemalloc-sys shows the underlying jemalloc version remains
unchanged at 5.1, so this is not expected to affect runtime behavior in
production.

Refs: #1265

Background threads are now enabled for all artifacts by enabling the
`background_threads` feature.

Reviewing `jemalloc-sys` shows the underlying `jemalloc` version remains
unchanged at 5.1, so this is not expected to affect runtime behavior in
production.

Refs: rust-lang#1265
@rust-highfive
Copy link

r? @smarnach

(rust_highfive has picked a reviewer for you, use r? to override)

@smarnach
Copy link
Contributor

Background threads are now enabled for all artifacts by enabling the
background_threads feature.

This looks like a questionable design choice, since you basically don't have any way to make sure no background threads are used – features are additve and could be enabled by any transitive dependency. It may make sense in this particular case, and it's definitely not a problem for us, since making sure that a feature i enabled is easy.

@bors r+

@bors
Copy link
Contributor

bors commented Dec 16, 2019

📌 Commit 8671445 has been approved by smarnach

@bors
Copy link
Contributor

bors commented Dec 16, 2019

⌛ Testing commit 8671445 with merge a7a40ff...

bors added a commit that referenced this pull request Dec 16, 2019
Upgrade `jemallocator`

Background threads are now enabled for all artifacts by enabling the
`background_threads` feature.

Reviewing `jemalloc-sys` shows the underlying `jemalloc` version remains
unchanged at 5.1, so this is not expected to affect runtime behavior in
production.

Refs: #1265
@bors
Copy link
Contributor

bors commented Dec 16, 2019

☀️ Test successful - checks-travis
Approved by: smarnach
Pushing a7a40ff to master...

@bors bors merged commit 8671445 into rust-lang:master Dec 16, 2019
@carols10cents
Copy link
Member

Errrr when I try to run the server locally with this PR on macOS, I get:

$ cargo run --bin server
    Finished dev [unoptimized + debuginfo] target(s) in 0.51s
     Running `target/debug/server`
<jemalloc>: option background_thread currently supports pthread only
memory allocation of 40 bytes failedAbort trap: 6

Looking into this now to see if this is a personal problem...

@ehuss
Copy link
Contributor

ehuss commented Dec 18, 2019

background_threads is not supported on macOS (jemalloc/jemalloc#1433). Perhaps jemalloc could ignore the feature on that platform? Or make it an non-default feature in the crates.io code and turn it on for deployment?

EDIT: Oops, I didn't see this is already being resolved in #1956.

@jtgeibel jtgeibel deleted the update/jemallocator branch December 19, 2019 00:48
@jtgeibel
Copy link
Member Author

Thanks @ehuss, that's alright. The biggest thing that surprised me is that jemalloc appears to behave very differently at runtime (ignoring the option on macOS) than with the same option compiled into the binary (always an error on macOS).

bors added a commit that referenced this pull request Dec 19, 2019
Disable the background_threads jemallocator feature

It's not supported on macOS :(

![Sad mac icon](https://user-images.githubusercontent.com/193874/70942958-c20d1880-201d-11ea-88bb-4f4188ce0d36.png)

When I try to `cargo run --bin server` on macOS Catalina 10.15.1, I get:

```
$ cargo run --bin server
    Finished dev [unoptimized + debuginfo] target(s) in 0.51s
     Running `target/debug/server`
<jemalloc>: option background_thread currently supports pthread only
memory allocation of 40 bytes failedAbort trap: 6
```

Leave [the upgrade](#1953) but turn off the `background_threads` feature for now. [Someday we might be able to enable features per-target](rust-lang/cargo#1197), but that day is not today.

r? @jtgeibel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants