-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New weekly build crashs reproducily #4053
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
Comments
Probably duplicate of #4050. Edit: Panic message is different. |
Yeah, that's a different one. The backtrace isn't very helpful though. |
I know that the backtrace isn't that helpful. I will trying to get another one. Is there any way to get a complete backtrace without rebuilding the binary manually? |
I suggest enabling @matklad I recall you mentioning that the release binaries are stripped, but I can't find that in the workflows. What would you say about enabling debug info for nightly builds? |
That's in
Yes :) |
if !nightly {
run!("strip ./target/x86_64-unknown-linux-musl/release/rust-analyzer")?;
} Oh, right. @weiznich maybe you could try the nightly version? |
Using the latest nightly build prints the following backtrace:
|
Ah, so that wasn't a Deja vu :) |
So another crash related to binders in (Also, wow, those where clauses...) |
I'm seeing this too:
|
I think we need more people trying out the nightlies, or to check analysis-stats on nightlies on more projects 😬 |
What's the easiest way for me to run stable/weekly RA in vs-code, but run also run nightly "analysis-stats" if i notice problems? Is this just a matter of cloning the latest RA source, building, and then |
Yeah, either |
+1 to this I'd really like to see the nightly CI job gate the release on a succesful run against some representative projects. |
A helpful first step would be to find a specific less-than-huge project which causes the currently weekly to die. I think setting up the actual CI process would be on me, but I'd love to have one project to start with :) |
Actually, Hm, actually, why re-invent the wheel? We should just re-use https://github.com/rust-lang/rustc-perf/tree/master/collector/benchmarks |
That's where @edwin0cheng's page gets its test cases from, IIRC 😄 |
The only problem so far it seems like we don't crash on those crates (though it looks like we are doing something exponential in servo's crates) =/ We do crash on diesel at the moment though. |
Another, more time-consuming, but probably better option, is to learn to run |
Oh, that's indeed an interesting idea 🤔 I always had plans to someday test the type inference on rustc's test suite, but only once we're mostly complete. But just checking that it doesn't crash would be possible right now, of course... |
Wait, no, we do in fact crash with this error on https://github.com/rust-lang/rustc-perf/tree/master/collector/benchmarks/hyper-2, which might be better (or worse) than diesel. |
Did a first stab at the idea at #4104 At the moment, it does just a single-file analysis, without stdlib. it only found a couple of problems with macro expansion :( |
Small guide to minimizing the reproducer for such a crash, in case someone is interested:
In the end I ended up with: trait BoxedDsl<DB> {
type Output;
fn internal_into_boxed(self) -> Self::Output;
}
struct SelectStatement<From, Select, Distinct, Where, Order, LimitOffset, GroupBy, Locking> {
order: Order,
}
trait QueryFragment<DB: Backend> {}
trait Into<T> { fn into(self) -> T; }
impl<F, S, D, W, O, LOf, DB> BoxedDsl<DB>
for SelectStatement<F, S, D, W, O, LOf, G>
where
O: Into<dyn QueryFragment<DB>>,
{
type Output = XXX;
fn internal_into_boxed(self) -> Self::Output {
self.order.into();
}
} and copied that to a test, where it indeed still crashed. With that, finding and fixing the bug was just a matter of some print debugging 😉 |
We need to shift in when we're substituting inside a binder. This should fix rust-lang#4053 (it doesn't fix the occasional overflow that also occurs on the Diesel codebase though).
4106: Fix wrong substitution code r=matklad a=flodiebold We need to shift in when we're substituting inside a binder. This should fix #4053 (it doesn't fix the occasional overflow that also occurs on the Diesel codebase though). Co-authored-by: Florian Diebold <[email protected]>
Uh oh!
There was an error while loading. Please reload this page.
I've doing some work on diesel. Pointing with the cursor to this line reproducibly crashes rust-analyzer with the attached backtrace.
Version: rust-analyzer 90f8378
OS: Ubuntu 20.04
IDE: Emacs
The text was updated successfully, but these errors were encountered: