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

rustc panic in asan test #269

Closed
Jaegoomon opened this issue Dec 8, 2020 · 18 comments
Closed

rustc panic in asan test #269

Jaegoomon opened this issue Dec 8, 2020 · 18 comments
Assignees
Labels
question Further information is requested

Comments

@Jaegoomon
Copy link

Jaegoomon commented Dec 8, 2020

thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', compiler/rustc_middle/src/ty/query/mod.rs:235:5
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.50.0-nightly (3d6705aa5 2020-12-07) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z sanitizer=address -C embed-bitcode=no -C debuginfo=2 -C incremental

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

query stack during panic:
end of query stack
thread '<unnamed>' panicked at 'assertion failed: `(left == right)`
  left: `LLVMing`,
 right: `Codegenning`', /rustc/3d6705aa5abffe94c83bf09af8c3ba3c599845fc/compiler/rustc_codegen_ssa/src/back/write.rs:1425:21

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.50.0-nightly (3d6705aa5 2020-12-07) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z sanitizer=address -C embed-bitcode=no -C debuginfo=2 -C incremental

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

query stack during panic:
end of query stack
error: could not compile `cs492-concur-homework`

Is there anyone why those errors occurs?

I have not revised any code except for project .rs file.

But only in asan sanitizer test, those error occurs. Do I have to reinstall rustc or programs related to asan?

I have no idea, please help me....

@Jaegoomon Jaegoomon added the question Further information is requested label Dec 8, 2020
@blue-int
Copy link

blue-int commented Dec 8, 2020

Getting the same error occasionally. I think the reason is that nightly is updated recently.

@travis1829
Copy link

travis1829 commented Dec 8, 2020

I also had the same errors often. In my case, it worked again after running cargo clean.

@Jaegoomon
Copy link
Author

Jaegoomon commented Dec 8, 2020

Oh really? Thanks for comments, then I'll try again few hours later.....

@blue-int
Copy link

blue-int commented Dec 8, 2020

cargo clean fails of removing homework/target/rls/debug/deps/.nfs~~ file.

@travis1829
Copy link

That also happened to me, but it seems like you can ignore it.
Honestly, I also don't know the precise problem nor solution, but in my case after running
cargo clean, and then running
cargo update, cargo build, and then cargo_asan ...,
it worked.

@blue-int
Copy link

blue-int commented Dec 8, 2020

The reason was that I didn't properly exit the test execution and build files could not be removed.
I terminated the process manually by htop and did cargo clean again.

@blue-int
Copy link

blue-int commented Dec 8, 2020

The error happens continuously even if I correctly terminate the test.

@tomtomjhj
Copy link
Member

tomtomjhj commented Dec 8, 2020

Wow that's interesting. For now, lets use older nightly

rustup toolchain install nightly-2020-09-23-x86_64-unknown-linux-gnu
diff --git a/scripts/grade-utils.sh b/scripts/grade-utils.sh
index 5c6b6b7..aea163a 100755
--- a/scripts/grade-utils.sh
+++ b/scripts/grade-utils.sh
@@ -7,7 +7,7 @@
 # * RUNNERS: array of "cargo[_asan | _tsan] [--release]"
 # * TIMEOUT: default 10s
 
-rustup toolchain update stable nightly
+# rustup toolchain update stable nightly
 
 echo_err() {
     echo -e "\033[0;31m\033[1m$@\033[0m" 1>&2
@@ -31,7 +31,7 @@ cargo_asan() {
     local SUBCOMMAND=$1; shift
     RUSTFLAGS="-Z sanitizer=address" \
         RUSTDOCFLAGS="-Z sanitizer=address" \
-        cargo +nightly $SUBCOMMAND --target x86_64-unknown-linux-gnu $@
+        cargo +nightly-2020-09-23 $SUBCOMMAND --target x86_64-unknown-linux-gnu $@
 }
 export -f cargo_asan
 
@@ -41,7 +41,7 @@ cargo_tsan() {
         TSAN_OPTIONS="suppressions=suppress_tsan.txt" \
         RUSTDOCFLAGS="-Z sanitizer=thread" \
         RUST_TEST_THREADS=1 \
-        cargo +nightly $SUBCOMMAND --target x86_64-unknown-linux-gnu $@
+        cargo +nightly-2020-09-23 $SUBCOMMAND --target x86_64-unknown-linux-gnu $@
 }
 export -f cargo_tsan

@blue-int
Copy link

blue-int commented Dec 8, 2020

s20140600@kaist-cp-cs492:~/cs492-concur/homework$ RUSTFLAGS="-Z sanitizer=address" RUSTDOCFLAGS="-Z sanitizer=address" cargo +nightly-2020-09-23 test --target x86_64-unknown-linux-gnu --test split_ordered_list smoke -- --nocapture
error: toolchain 'nightly-2020-09-23-x86_64-unknown-linux-gnu' is not installed

@tomtomjhj
Copy link
Member

rustup toolchain install nightly-2020-09-23-x86_64-unknown-linux-gnu

@jeehoonkang
Copy link
Member

Thank you for the report. Did anyone report it via https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md ?

@Jaegoomon
Copy link
Author

No, I didn't..

@travis1829
Copy link

travis1829 commented Dec 8, 2020

Me neither.

@ghost
Copy link

ghost commented Dec 9, 2020

I'm having the same problem, even after fetching upstream and after running the line
'rustup toolchain install nightly-2020-09-23-x86_64-unknown-linux-gnu'

Is there anything more I must do to solve this problem?

@tomtomjhj
Copy link
Member

@bryanswkim99 have you applied this diff #269 (comment) ?

@ghost
Copy link

ghost commented Dec 9, 2020

It seems to be working now. Thank you!

@jeehoonkang
Copy link
Member

  • I'd like to keep it open until the issue is reported to the rust repository.
  • If you're inclined to do so, please do it and give me your student id.

@jeehoonkang jeehoonkang reopened this Dec 9, 2020
@yujingaya
Copy link

Seems like the Issue is already reported and it was related to incremental compilation. Hence the cargo clean worked.

The fix has been merged yesterday. So it'll be fine after nightly 2020-12-09 I guess?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

6 participants