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

Environment variable cleanup can ICE again #2396

Closed
saethlin opened this issue Jul 20, 2022 · 1 comment · Fixed by #2397
Closed

Environment variable cleanup can ICE again #2396

saethlin opened this issue Jul 20, 2022 · 1 comment · Fixed by #2397

Comments

@saethlin
Copy link
Member

saethlin commented Jul 20, 2022

This is a new form of #2020, and the circumstances are perhaps a bit more exotic. I can get ICEs out of rust-minidump and linfa-linalg at the moment, with this:

RUST_BACKTRACE=0 MIRIFLAGS="-Zmiri-panic-on-unsupported -Zmiri-disable-isolation -Zmiri-ignore-leaks" cargo +miri miri test --no-fail-fast -- --test-threads=2

As far as I can tell, all these options are required on rust-minidump, though that is surprising. Output looks like this:

<some more tests>

     Running tests/linux_minidump_writer.rs (target/miri/x86_64-unknown-linux-gnu/debug/deps/linux_minidump_writer-ee88d6f259ec3b82)

running 16 tests
test test_minidump_size_limit ... FAILED
test test_named_threads ... FAILED
test test_named_threads_with_context ... FAILED
test test_sanitized_stacks ... FAILED
test test_sanitized_stacks_with_context ... FAILED
test test_skip_if_requested ... FAILED
thread 'rustc' panicked at 'called `Result::unwrap()` on an `Err` value: InterpErrorInfo(InterpErrorInfoInner { kind: deallocating while item [SharedReadOnly for <3851536>] is protected by call 1071895, backtrace: None })', src/eval.rs:372:58
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.64.0-nightly (29c5a028b 2022-07-19) running on x86_64-unknown-linux-gnu

note: compiler flags: -C embed-bitcode=no -C debuginfo=2 -C linker=clang -C incremental -C link-arg=-fuse-ld=mold -Z miri-panic-on-unsupported -Z miri-disable-isolation -Z miri-ignore-leaks

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
end of query stack
@RalfJung
Copy link
Member

Ah yes, if we are unlucky then Stacked Borrows also has things to say about just deallocating memory that other threads are working on...

I think we should probably just not do this cleanup if leaks are ignored anyway.

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 a pull request may close this issue.

2 participants