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

Improve miri error reporting in check_in_alloc #59627

Merged
merged 19 commits into from
May 27, 2019
Merged

Improve miri error reporting in check_in_alloc #59627

merged 19 commits into from
May 27, 2019

Conversation

LooMaclin
Copy link
Contributor

@LooMaclin LooMaclin commented Apr 2, 2019

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 2, 2019
@bors
Copy link
Contributor

bors commented Apr 2, 2019

☔ The latest upstream changes (presumably #59632) made this pull request unmergeable. Please resolve the merge conflicts.

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-6.0 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
travis_time:end:07ad967e:start=1554755769348916885,finish=1554755918643171982,duration=149294255097
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
$ export GCP_CACHE_BUCKET=rust-lang-ci-cache
Setting environment variables from .travis.yml
---

[00:03:46] travis_fold:start:tidy
travis_time:start:tidy
tidy check
[00:03:47] tidy error: /checkout/src/librustc/mir/interpret/allocation.rs:381: line longer than 100 chars
[00:03:48] some tidy checks failed
[00:03:48] 
[00:03:48] 
[00:03:48] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/tidy" "/checkout/src" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "--no-vendor" "--quiet"
[00:03:48] 
[00:03:48] 
[00:03:48] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
[00:03:48] Build completed unsuccessfully in 0:00:44
[00:03:48] Build completed unsuccessfully in 0:00:44
[00:03:48] make: *** [tidy] Error 1
[00:03:48] Makefile:67: recipe for target 'tidy' failed
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:03d4ec00
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Mon Apr  8 20:42:35 UTC 2019
---
travis_time:end:08fc629e:start=1554756156550909760,finish=1554756156555426174,duration=4516414
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:0520b318
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|'); if [ -f "$EXE" ]; then printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; gdb --batch -q -c "$CORE" "$EXE" -iex 'set auto-load off' -iex 'dir src/' -iex 'set sysroot .' -ex bt -ex q; echo travis_fold":"end:crashlog; fi; done || true
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:2e7bb9cf
travis_time:start:2e7bb9cf
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:1ee4e60c
$ dmesg | grep -i kill

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

src/librustc/mir/interpret/allocation.rs Outdated Show resolved Hide resolved
src/librustc/mir/interpret/allocation.rs Outdated Show resolved Hide resolved
src/librustc/mir/interpret/allocation.rs Outdated Show resolved Hide resolved
src/librustc_mir/hair/pattern/_match.rs Outdated Show resolved Hide resolved
@oli-obk
Copy link
Contributor

oli-obk commented Apr 9, 2019

You can apply the same change to get_bytes_with_undef_and_ptr and get_bytes_mut

@LooMaclin
Copy link
Contributor Author

LooMaclin commented Apr 10, 2019

@oli-obk

You can apply the same change to get_bytes_with_undef_and_ptr and get_bytes_mut

fixed

@RalfJung
Copy link
Member

Sorry for the long delay! This looks great, I just have some naming and formatting nits.

Co-Authored-By: LooMaclin <loo.maclin@protonmail.com>
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-6.0 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
travis_time:end:095a2568:start=1555431985119545105,finish=1555432110596930974,duration=125477385869
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
$ export GCP_CACHE_BUCKET=rust-lang-ci-cache
$ export AWS_ACCESS_KEY_ID=AKIA46X5W6CZEJZ6XT55
---
[00:07:01]    Compiling rustc_macros v0.1.0 (/checkout/src/librustc_macros)
[00:07:08]    Compiling syntax_pos v0.0.0 (/checkout/src/libsyntax_pos)
[00:07:12]    Compiling rustc_errors v0.0.0 (/checkout/src/librustc_errors)
[00:08:13]    Compiling syntax_ext v0.0.0 (/checkout/src/libsyntax_ext)
[00:08:38] error[E0599]: no variant named `NullPointer` found for type `mir::interpret::allocation::CheckInAllocMsg` in the current scope
[00:08:38]   --> src/librustc/mir/interpret/allocation.rs:38:30
[00:08:38]    |
[00:08:38] 27 | pub enum CheckInAllocMsg {
[00:08:38]    | ------------------------ variant `NullPointer` not found here
[00:08:38] ...
[00:08:38] 38 |             CheckInAllocMsg::NullPointer => "null pointer",
[00:08:38]    |             |
[00:08:38]    |             |
[00:08:38]    |             variant not found in `mir::interpret::allocation::CheckInAllocMsg`
[00:08:46] error: aborting due to previous error
[00:08:46] 
[00:08:46] For more information about this error, try `rustc --explain E0599`.
[00:08:46] error: Could not compile `rustc`.
---
travis_time:end:149bda44:start=1555432647142692130,finish=1555432647147067060,duration=4374930
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:026f0b19
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|'); if [ -f "$EXE" ]; then printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; gdb --batch -q -c "$CORE" "$EXE" -iex 'set auto-load off' -iex 'dir src/' -iex 'set sysroot .' -ex bt -ex q; echo travis_fold":"end:crashlog; fi; done || true
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:1bdfa818
travis_time:start:1bdfa818
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: 

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@Mark-Simulacrum
Copy link
Member

Visiting from triage, it looks like there's one remaining review comment for you, @LooMaclin -- will you have some time to address that soon?

@Mark-Simulacrum Mark-Simulacrum added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 18, 2019
@LooMaclin
Copy link
Contributor Author

@Mark-Simulacrum @RalfJung sorry for delay, check please: ffd0dc7

Co-Authored-By: Ralf Jung <post@ralfj.de>
@RalfJung RalfJung changed the title [WIP] Improve miri error reporting in check_in_alloc Improve miri error reporting in check_in_alloc May 26, 2019
@RalfJung
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented May 26, 2019

📌 Commit 9e643e6 has been approved by RalfJung

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 26, 2019
@bors
Copy link
Contributor

bors commented May 27, 2019

⌛ Testing commit 9e643e6 with merge 7a1ecfc55579cd70fbd483d7350faee9388770f6...

@bors
Copy link
Contributor

bors commented May 27, 2019

💔 Test failed - checks-travis

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels May 27, 2019
@rust-highfive
Copy link
Collaborator

The job dist-x86_64-apple of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
wry
xmoto
zxing-cpp
==> Downloading https://homebrew.bintray.com/bottles/xz-5.2.4.high_sierra.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/e7/e7be50f4ee00e35887f3957263334eb3baba59e8c061919060f9259351be6880?__gda__=exp=1558918013~hmac=5aa54fc2022077973eaf8e47e2022408381b0d43d0c3a58e31dc5da0d805b90e&response-content-disposition=attachment%3Bfilename%3D%22xz-5.2.4.high_sierra.bottle.tar.gz%22&response-content-type=application%2Fgzip&requestInfo=U2FsdGVkX1_jC30VEe-JfIvTEkzFKGEUMKHmsq0I5G29_4ffc3RJ_MuGeQstSz2n6KI5208rE4qaIS8U2h2DxYyTDmJsTbd5-CA_wR-BvRT85HBceSAGrAFWd-nnOs9juwYnETxPrzILYjjrB3EKZw&response-X-Checksum-Sha1=32dc0b28e61f32b40c20e2993418aa8cb6e746d5&response-X-Checksum-Sha2=e7be50f4ee00e35887f3957263334eb3baba59e8c061919060f9259351be6880
🍺  /usr/local/Cellar/xz/5.2.4: 92 files, 1MB
==> `brew cleanup` has not been run in 30 days, running now...
Removing: /Users/travis/Library/Caches/Homebrew/boost-1.66.0.high_sierra.bottle.tar.gz... (84.6MB)
Removing: /Users/travis/Library/Caches/Homebrew/carthage-0.28.0.high_sierra.bottle.tar.gz... (8.3MB)
---
Pruned 0 symbolic links and 5 directories from /usr/local
==> Installing dependencies for swig: pcre
==> Installing swig dependency: pcre
==> Downloading https://homebrew.bintray.com/bottles/pcre-8.43.high_sierra.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/03/0389911a93a88efd4a69b52dea8ecb872fdb55bcfff45d2f7313be5f79730861?__gda__=exp=1558918025~hmac=ccf9d6a43b39a8f9b0befa7abaea96928dcb3e5aa0b47926229207602367ca7f&response-content-disposition=attachment%3Bfilename%3D%22pcre-8.43.high_sierra.bottle.tar.gz%22&response-content-type=application%2Fgzip&requestInfo=U2FsdGVkX1_W3Y25VLTdw6DIrazhc4EtAYCAqrDizg2Mdbp7A1ID9bjF0QcUCDwDsOho1zKreOsr4ca7Yo-7O6Rdm6Bw0yrmem87N-WE7Ep7sUrzGBmA-VT4cMfY_91rpsD321tqWRJtjhqN-Q7mMw&response-X-Checksum-Sha1=c67d4b99bb245f0ea56b34118dd6325b06a7250c&response-X-Checksum-Sha2=0389911a93a88efd4a69b52dea8ecb872fdb55bcfff45d2f7313be5f79730861
🍺  /usr/local/Cellar/pcre/8.43: 204 files, 5.5MB
==> Installing swig
==> Downloading https://homebrew.bintray.com/bottles/swig-4.0.0.high_sierra.bottle.tar.gz
==> Downloading https://homebrew.bintray.com/bottles/swig-4.0.0.high_sierra.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/ae/aed79cb436b3a0ac5812c4085e3121ffd62866397b8c7eaa06815ed8ec1e22b7?__gda__=exp=1558918028~hmac=0656e328bc774a6ebd242f917ed22b8e94122de213b76b6e3b3c60525e12e1e7&response-content-disposition=attachment%3Bfilename%3D%22swig-4.0.0.high_sierra.bottle.tar.gz%22&response-content-type=application%2Fgzip&requestInfo=U2FsdGVkX189gtGcDNTZCRJ6L3RvapxcLnrRsBdd4aUq7cvFtZDGV3OSz9YU21Xout4QUFGP75kG8QNmJuKiH7TY8_Nx4bqRg2KK87NawDVyvjrU5Md6YBbzpwt5CtKnnyF6zZQtE8AUaSKxpHo4pg&response-X-Checksum-Sha1=a9c428aee4337d91061a69c02d7ae508b627d03f&response-X-Checksum-Sha2=aed79cb436b3a0ac5812c4085e3121ffd62866397b8c7eaa06815ed8ec1e22b7
🍺  /usr/local/Cellar/swig/4.0.0: 722 files, 5.4MB
travis_time:end:337ffe4c:start=1558916933681884000,finish=1558917347297659000,duration=413615775000
travis_fold:end:install
travis_fold:start:before_script.1
---
[00:01:49]    Compiling serde_derive v1.0.81
[00:02:17]    Compiling toml v0.4.10
[00:02:17]    Compiling serde_json v1.0.33
[00:02:22]    Compiling bootstrap v0.0.0 (/Users/travis/build/rust-lang/rust/src/bootstrap)
No output has been received in the last 30m0s, this potentially indicates a stalled build or something wrong with the build itself.
Check the details on how to adjust your build configuration on: https://docs.travis-ci.com/user/common-build-problems/#Build-times-out-because-no-output-was-received
The build has been terminated

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@RalfJung
Copy link
Member

Spurious timeout?

@bors retry

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 27, 2019
Centril added a commit to Centril/rust that referenced this pull request May 27, 2019
…error_reporting_in_check_in_alloc, r=RalfJung

Improve miri error reporting in check_in_alloc

Fixes rust-lang#57128

r? @RalfJung @oli-obk
@bors
Copy link
Contributor

bors commented May 27, 2019

⌛ Testing commit 9e643e6 with merge 1a56ec4...

bors added a commit that referenced this pull request May 27, 2019
…ting_in_check_in_alloc, r=RalfJung

Improve miri error reporting in check_in_alloc

Fixes #57128

r? @RalfJung @oli-obk
@bors
Copy link
Contributor

bors commented May 27, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: RalfJung
Pushing 1a56ec4 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label May 27, 2019
@bors bors merged commit 9e643e6 into rust-lang:master May 27, 2019
@rust-highfive
Copy link
Collaborator

📣 Toolstate changed by #59627!

Tested on commit 1a56ec4.
Direct link to PR: #59627

💔 miri on windows: test-pass → build-fail (cc @oli-obk @RalfJung @eddyb, @rust-lang/infra).
💔 miri on linux: test-pass → build-fail (cc @oli-obk @RalfJung @eddyb, @rust-lang/infra).

rust-highfive added a commit to rust-lang-nursery/rust-toolstate that referenced this pull request May 27, 2019
Tested on commit rust-lang/rust@1a56ec4.
Direct link to PR: <rust-lang/rust#59627>

💔 miri on windows: test-pass → build-fail (cc @oli-obk @RalfJung @eddyb, @rust-lang/infra).
💔 miri on linux: test-pass → build-fail (cc @oli-obk @RalfJung @eddyb, @rust-lang/infra).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve miri's error reporting in check_in_alloc
6 participants