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

jemalloc 5.1 causes memory corruption with the max_background_threads option. #174

Open
awused opened this issue Jan 11, 2022 · 0 comments

Comments

@awused
Copy link

awused commented Jan 11, 2022

I'm reporting this even though the crate is unmaintained because it ended up wasting a lot of my own time. 5.2 and 5.2.1 have some fixes for max_background_threads specifically and memory corruption in general. Switching to https://crates.io/crates/tikv-jemallocator appears to have resolved them since it has updated to 5.2.1.

Using this crate and _RJEM_MALLOC_CONF=abort_conf:true,background_thread:true,max_background_threads:1 I was able to corrupt memory in rayon: this line panicked, but only once by luck and I've not been able to reproduce it. More commonly my application just crashed with various errors.

The most common crash is tpp.c:84: __pthread_tpp_change_priority: Assertion `new_prio == -1 || (new_prio >= fifo_min_prio && new_prio <= fifo_max_prio)' failed. and the second most common is a more generic illegal hardware instruction that I haven't bothered to dig deeply into.

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

No branches or pull requests

1 participant