-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Compiler panic: unexpected unsized tail: TyProjection(ProjectionTy { substs: Slice([chrono::Utc]), ... #48336
Comments
triage: P-high First priority is clearly to see if we can reproduce the problem. I'll try to figure that out. |
I have tried a little bit to reduce a smaller code example. But as soon as I touch any code and recompile the error usually goes away. |
We are hoping it's not related to #47381 -- this came up in the @rust-lang/compiler meeting. I think it was meant as a joke, but now it seems eminently plausible. =) |
Reassigning to self to attempt to reproduce (and reduce etc). |
Progress report (or lack thereof): I've made two reproduction attempts atop OS X, both based largely on the provided travis log. The main difference I noted was that I had to omit the Atop stable rustc 1.24.0 (4d90ac3 2018-02-12): no ICE observed from Atop nightly rustc 1.25.0-nightly (3ec5a99 2018-02-14): no ICE observed from I'll try with my Linux box next. |
On my Linux (Fedora) system, tried two different base commits with one fixed version of rustc: rustc 1.25.0-nightly (27a046e 2018-02-18), commit 08f6eb436f03ba0c68d2a1e460e6ca42048124d6: no ICE observed from rustc 1.25.0-nightly (27a046e 2018-02-18), commit 33a2edadad1c3b5fe7ea667f6b7ad4dd97c69ec3: no ICE observed from |
I should probably provide an update as well. When I reported this our CI hit the bug in like 20-50% of the builds. This number has gone down and now AppVeyor + Travis CI almost never hit the bug. However, the bug is not gone. Because I get it now and then in my local environment. But not very often. So very hard to reproduce. |
@faern when you say the error is happening "randomly", did you mean it seems to come and go as you make changes to the code or check out different commits, but reproduces consistently with a fixed code base and compiler version? Or did you mean that it sometimes fails to reproduce even when you leave the code base and compiler version fixed? (In other words, is this one of those bugs that appears to depend on the phase of the moon?) |
@rust-lang/compiler Based on my own failure to reproduce and the update from @faern on the reduced frequency of the bug cropping up, I am tempted to either close the ticket outright (as "cannot reproduce") or at least reduce the priority to P-medium. |
@pnkfelix It comes and go on the same compiler version, yes. Once I get the bug I get it no matter how many times I re-run |
@pnkfelix Next time I hit the error I will re-compile with EDIT: How do you recommend I use |
Maybe a problem with incremental. |
Maybe. Or something in crate metadata. |
I've managed to reproduce this using some recent commits in the same mullvadvpn-app repository. The following steps seem to reproduce it (tested twice):
|
Well, I tried to follow @jvff's instructions, but apparently the commit 6090dc0 and the branch fix-openvpn-plugin-path are no longer available from the mullvad repository. 😢 |
Okay, I have now reproduced the bug atop (Interestingly, I had to explicit name the Next step: make sure it reproduces under a local build of |
ping @pnkfelix from @rust-lang/compiler -- were you able to make progress reproducing with local build / rr ? |
Yes I have reproduced on a local build, but not with the latest master, the reproduction required backtracking to the same commit that was used on the nightly I wrote above (i.e. 2789b06). This might be a sign that this bug has been fixed. But given the transient nature of the bug, I am hesitant to draw that conclusion without at least bisecting to the commit where the bug disappears. I have not actually attempted that, however, because I wanted to investigate more directly atop the local build. (Which I started doing, but failed to learn much of use beyond what is already in the provided ICE message and stack trace...) Anyway, there are a couple different paths that I could see trying going down to dissect this:
Of the options above, 3 is the one that is perhaps easiest for anyone to try their hand at (assuming they are familiar with
|
I decided as a background task to go ahead and try bisecting. Huge caveat: I did not take my own advice, in that I have not yet double-checked that the commit series looks like "bug; bug; ...; bug; working; working; ... working"
Anyway, here's what the bisection looked like (with some edits to avoid having markdown create tracking links on presumably irrelevant PRs). (Keep in mind that "bad" in this context means "with this build of the compiler, the bug did not arise.)
So, was this bug "fixed" by #48710 ...? Or is that just an incidental change that hides the symptom and papers over the actual bug...? Not sure yet. |
After discussion at compiler team meeting, closing under hypothesis that #48710 "fixed" this by removing the inferred_obligations, which were sometimes incorrectly dropped rather than proven (and which @nikomatsakis says could indeed lead to ICE's like this.) |
Just after upgrading to stable Rust 1.24, and the nightly released at approximately the same time we started experiencing compiler crashes on both Windows, Linux and macOS on both Travis/Appveyor and locally.
error: internal compiler error: librustc_trans/context.rs:446: unexpected unsized tail: TyProjection(ProjectionTy { substs: Slice([chrono::Utc]), item_def_id: DefId(13/0:83 ~ chrono[e167]::offset[0]::TimeZone[0]::Offset[0]) })
I tried this code:
I sadly don't have a minimized example triggering the bug. Because the error is happening randomly, and most often on the CI and is thus hard to reproduce. But it happens on more than one feature branch of this workspace repository: https://github.com/mullvad/mullvadvpn-app. It has for example been observed on commit
33a2edadad1c3b5fe7ea667f6b7ad4dd97c69ec3
.EDIT: Just corrected the repo url. It was wrong :P
Meta
rustc --version --verbose
:But the same thing has happened on 1.24 stable as well.
Backtrace:
Below is from my local run on Linux. Here, a similar error can be seen for macOS on Travis: https://travis-ci.org/mullvad/mullvadvpn-app/jobs/343143393#L311
The text was updated successfully, but these errors were encountered: