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

Re-implement leak check in terms of universes #58592

Merged
merged 7 commits into from
Feb 22, 2019

Conversation

nikomatsakis
Copy link
Contributor

@nikomatsakis nikomatsakis commented Feb 20, 2019

This PR temporarily restores the leak-check, but implemented in terms of universes. This is not because the leak check behavior was necessarily correct, but because (a) we may want to have a transition period and because (b) we want to have more breathing room to work through the full implications of handling higher-ranked types correctly. Note that this PR builds atop #58056.

Fixes #58451
Fixes #46989
Fixes #57639

r? @aturon
cc @arielb1, @lqd

Temporary note: I've not finished running ./x.py test locally -- I'm confident a lot of error messages in tests will need updating. I sort of expect them to revert to the older, (imo) less good error messages, which is mildly unfortunate. There might be a way to preserve the new error messages, not sure.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 20, 2019
@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:362df60e:start=1550663127255856788,finish=1550663129465543049,duration=2209686261
$ 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
Setting environment variables from .travis.yml
$ export IMAGE=x86_64-gnu-llvm-6.0
---

[00:04:10] travis_fold:start:tidy
travis_time:start:tidy
tidy check
[00:04:11] tidy error: /checkout/src/librustc/infer/mod.rs:968: line longer than 100 chars
[00:04:12] some tidy checks failed
[00:04:12] 
[00:04:12] 
[00:04:12] 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:04:12] 
[00:04:12] 
[00:04:12] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
[00:04:12] Build completed unsuccessfully in 0:00:45
[00:04:12] Build completed unsuccessfully in 0:00:45
[00:04:12] make: *** [tidy] Error 1
[00:04:12] Makefile:68: recipe for target 'tidy' failed
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:2cec4ad8
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Wed Feb 20 11:49:53 UTC 2019
---
travis_time:end:15196653:start=1550663393681474415,finish=1550663393685718651,duration=4244236
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:19e3adfa
$ 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:1de0386f
travis_time:start:1de0386f
$ 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:03da50bf
$ 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)

Copy link
Member

@aturon aturon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed the new commits here and they LGTM, modulo a sanity check re: the role of snapshots.

tcx: TyCtxt<'_, '_, 'tcx>,
overly_polymorphic: bool,
placeholder_map: &PlaceholderMap<'tcx>,
_snapshot: &CombinedSnapshot<'_, 'tcx>,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to confirm: this parameter is basically acting as a static check that we're in the scope of a snapshot?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirm, I should perhaps write that more explicitly as a comment.

@nikomatsakis
Copy link
Contributor Author

@bors try

@bors
Copy link
Contributor

bors commented Feb 20, 2019

⌛ Trying commit f156ac2 with merge c3b2220...

bors added a commit that referenced this pull request Feb 20, 2019
[WIP] Re-implement leak check in terms of universes

This PR temporarily restores the leak-check, but implemented in terms of universes. This is not because the leak check behavior was necessarily **correct**, but because (a) we may want to have a transition period and because (b) we want to have more breathing room to work through the full implications of handling higher-ranked types correctly. Note that this PR builds atop #58056.

Fixes #58451
Fixes #46989
Fixes #57639

r? @aturon
cc @arielb1, @lqd

~~Temporary note: I've not finished running `./x.py test` locally -- I'm confident a lot of error messages in tests will need updating. I sort of expect them to revert to the older, (imo) less good error messages, which is mildly unfortunate. There might be a way to preserve the new error messages, not sure.~~
@Mark-Simulacrum Mark-Simulacrum added I-nominated beta-nominated Nominated for backporting to the compiler in the beta channel. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Feb 20, 2019
@Mark-Simulacrum
Copy link
Member

Nominating for compiler team approval for beta backport because it fixes several regressions.

@nikomatsakis nikomatsakis changed the title [WIP] Re-implement leak check in terms of universes Re-implement leak check in terms of universes Feb 20, 2019
@bors
Copy link
Contributor

bors commented Feb 20, 2019

☀️ Test successful - checks-travis
State: approved= try=True

@Mark-Simulacrum
Copy link
Member

@rust-timer build c3b2220

@rust-timer
Copy link
Collaborator

Success: Queued c3b2220 with parent f66e469, comparison URL.

@Mark-Simulacrum
Copy link
Member

@craterbot run start=master#f66e4697ae286985ddefc53c3a047614568458bb end=try#c3b22200e6f5b70eb1f99ae6944d989ae17a458a mode=check-only p=5

@craterbot
Copy link
Collaborator

👌 Experiment pr-58592 created and queued.
🔍 You can check out the queue and this experiment's details.

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot craterbot added S-waiting-on-crater Status: Waiting on a crater run to be completed. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 20, 2019
@craterbot
Copy link
Collaborator

🚧 Experiment pr-58592 is now running on agent aws-1.

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@pnkfelix
Copy link
Member

hey @nikomatsakis do you know off-hand if this will also address #57464 ?

@rust-timer
Copy link
Collaborator

Finished benchmarking try commit c3b2220

@nikomatsakis
Copy link
Contributor Author

@pnkfelix it does not appear to fix that test case

@bors
Copy link
Contributor

bors commented Feb 21, 2019

⌛ Testing commit 33d3598 with merge 204212e528e170b563444616a989730d686b4513...

@bors
Copy link
Contributor

bors commented Feb 21, 2019

⌛ Testing commit 33d3598 with merge 8a1d0de...

bors added a commit that referenced this pull request Feb 21, 2019
Re-implement leak check in terms of universes

This PR temporarily restores the leak-check, but implemented in terms of universes. This is not because the leak check behavior was necessarily **correct**, but because (a) we may want to have a transition period and because (b) we want to have more breathing room to work through the full implications of handling higher-ranked types correctly. Note that this PR builds atop #58056.

Fixes #58451
Fixes #46989
Fixes #57639

r? @aturon
cc @arielb1, @lqd

~~Temporary note: I've not finished running `./x.py test` locally -- I'm confident a lot of error messages in tests will need updating. I sort of expect them to revert to the older, (imo) less good error messages, which is mildly unfortunate. There might be a way to preserve the new error messages, not sure.~~
@bors
Copy link
Contributor

bors commented Feb 22, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: aturon
Pushing 8a1d0de to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Feb 22, 2019
@bors bors merged commit 33d3598 into rust-lang:master Feb 22, 2019
@craterbot
Copy link
Collaborator

🎉 Experiment pr-58592 is completed!
📊 2 regressed and 2 fixed (50551 total)
📰 Open the full report.

⚠️ If you notice any spurious failure please add them to the blacklist!
ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot craterbot 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 Feb 22, 2019
@Centril
Copy link
Contributor

Centril commented Feb 22, 2019

Regression tree:

  • google-testing1-cli-1.0.8+20181011:

[INFO] [stderr] Error response from daemon: endpoint with name confident_tesla already exists in network none

  • tokei-8.0.1

[INFO] [stderr] Error response from daemon: endpoint with name confident_tesla already exists in network none

Both spurious. We have no actual reported regressions 🎉

@pnkfelix
Copy link
Member

We discussed this beta-nomination in the compiler team meeting yesterday, as part of the checkin with the WG-traits working group.

The executive summary is: We think the risk/reward here is in favor of approving the beta backport; but since this only landed in nightly so recently (notably, after the meeting where we were discussing it), we need to keep our eye out for problems.

Here is how @aturon summarized things (and a lot of meeting participants agreed with this synopsis):

i think we should:

  • land in nightly
  • land beta backport
  • start crater run on beta

basically get as much info about the impact as we can, ASAP. if any of these reveal problems, then we can delay the release

therefore, marking as beta-accepted.

@pnkfelix pnkfelix added beta-accepted Accepted for backporting to the compiler in the beta channel. and removed I-nominated labels Feb 22, 2019
bors added a commit that referenced this pull request Feb 22, 2019
[BETA] Universe leak check

Backport of #58592 and #58056 to beta.
@Mark-Simulacrum Mark-Simulacrum mentioned this pull request Feb 22, 2019
@pietroalbini pietroalbini removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Feb 22, 2019
bors added a commit that referenced this pull request Feb 23, 2019
dtolnay added a commit to dtolnay/rust-quiz that referenced this pull request Feb 23, 2019
The breaking change was reverted in rust-lang/rust#58592.

This reverts commit 6fd0e82.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta-accepted Accepted for backporting to the compiler in the beta channel. merged-by-bors This PR was explicitly merged by bors. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants