-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Build fails with --disable-jemalloc #21526
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
Comments
I can reproduce. Running the aborting command under valgrind gives hundreds of errors like:
|
I have tracked down the introduction of this crash to the commit: 98d4d49 |
Wow, thanks for tracking it down, although it's surprising to me, since that commit seems fairly inoccuous. I wonder if one of the other commits in the rollup #21213 may be playing a part too (since those sort of PRs aren't guaranteed to have every commit compiling). |
- adapt openbsd patches for 2015-01-20 9006c3c - switch rustc build to use jemalloc (and patch jemalloc) due to bug in rustc without it (see rust-lang/rust#21526) - regen patches & distinfo (new bootstrap)
For what it's worth, I believe the issue is in the stage0 snapshot generating code that can have use-after-free issues. If it's a use-after-free issue (which the valgrind output seems to indicate), the problem's manifestation will be unrelated to the actual patch that generated the panic. While trying to track this down locally, this patch made the problem disappear so that the build ran to completion:
|
@aidancully what is your last known to work build with this workaround ? |
@semarie: I don't know, I needed --disable-jemalloc for fakeCargo, but I haven't been using fakeCargo since cargo seems to have stopped changing as frequently. So I've been using jemalloc -- only so many hours in the day. That "workaround" was never intended to solve the issue, but rather just to show that the issue seems to be in internal Rust memory management. There is no way that that patch should in any way address the actual issue. (Incidentally, I think this is a serious issue, and suspect that we're just lucky that jemalloc works differently internally than system-malloc does.) |
cc me |
Seeing how this hasn't cropped up in awhile, I'm gonna close as "presumably fixed" at some point |
Configuring with
../configure --disable-docs --enable-ccache --disable-jemalloc
causes the build to fail with:Usually it is
Illegal instruction
however sometimes a bad or double free is reported.Building with jemalloc enabled (
../configure --disable-docs --enable-ccache
) has no problem.The text was updated successfully, but these errors were encountered: