Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

RLS Crashing #381

Closed
xogeny opened this issue Jun 26, 2017 · 9 comments
Closed

RLS Crashing #381

xogeny opened this issue Jun 26, 2017 · 9 comments

Comments

@xogeny
Copy link

xogeny commented Jun 26, 2017

I'm currently running rustc 1.20.0-nightly (fc9ccfdbe 2017-06-25). I've run all of the following commands:

$ rustup install nightly
$ rustup default nightly
$ rustup component add rls
$ rustup component add rust-analysis
$ rustup component add rust-src

While running the vscode extension by @KalitaAlexey, I see RLS: Analysis Started followed by RLS: Analysis finished followed by RLS: Crashed.

In the output window I see:

thread '<unnamed>' panicked at 'could not run cargo: CargoError(Internal(Msg("failed to stat `/Users/mtiller/Source/my_proj/target/rls/debug/.fingerprint/rust-fmu-6371c09f679c0ce2/dep-bin-rust_fmu-6371c09f679c0ce2`")), State { next_error: Some(Error { repr: Os { code: 2, message: "No such file or directory" } }), backtrace: Some(stack backtrace:
   0:        0x10a26b2ae - backtrace::backtrace::trace::h50dae19105635900
   1:        0x10a26b44c - backtrace::capture::Backtrace::new::h29841072e5e6e49b
   2:        0x10a26a62d - error_chain::make_backtrace::hcffe27b0755719f7
   3:        0x10a1ad49e - cargo::ops::cargo_rustc::fingerprint::Fingerprint::update_local::ha46d83db51567a2d
   4:        0x10a1b5fd0 - _$LT$F$u20$as$u20$cargo..ops..cargo_rustc..job..FnBox$LT$A$C$$u20$R$GT$$GT$::call_box::h08ed6a3606a529e4
   5:        0x10a1b7345 - _$LT$F$u20$as$u20$cargo..ops..cargo_rustc..job..FnBox$LT$A$C$$u20$R$GT$$GT$::call_box::h9475d96ef80031bf
   6:        0x10a1c3c6e - cargo::ops::cargo_rustc::job_queue::JobQueue::run::_$u7b$$u7b$closure$u7d$$u7d$::h2d10942c5424dabd
   7:        0x10a089673 - _$LT$F$u20$as$u20$crossbeam..FnBox$GT$::call_box::hac838a5c59ecefc8
   8:        0x10a08bd9f - std::panicking::try::do_call::h683e73cdf03313f2
   9:        0x1102d5b5c - __rust_maybe_catch_panic
  10:        0x10a0cda8f - _$LT$F$u20$as$u20$alloc..boxed..FnBox$LT$A$GT$$GT$::call_box::h48add3badff46f6a
  11:        0x1102cf6fb - std::sys::imp::thread::Thread::new::thread_start::he5c82b73fbbeead1
  12:     0x7fffa7cfc93a - _pthread_body
  13:     0x7fffa7cfc886 - _pthread_start) })', src/libcore/result.rs:860
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
stack backtrace:
   0: std::sys::imp::backtrace::tracing::imp::unwind_backtrace
   1: std::panicking::default_hook::{{closure}}
   2: std::panicking::default_hook
   3: std::panicking::rust_panic_with_hook
   4: std::panicking::begin_panic
   5: std::panicking::begin_panic_fmt
   6: rust_begin_unwind
   7: core::panicking::panic_fmt
   8: core::result::unwrap_failed
Missing change, aborting. Found 2, expected Some(4)
[Error - 3:26:24 PM] Connection to server got closed. Server will not be restarted.

I've tried removing my target directory completely and rerunning vscode. I still get the same error. BTW, the error message is correct, the file /Users/mtiller/Source/my_proj/target/rls/debug/.fingerprint/rust-fmu-6371c09f679c0ce2/dep-bin-rust_fmu-6371c09f679c0ce2 does not exist. That seems to bring everything crashing down.

Frankly, given all the unique semantics of Rust, I find it nearly impossible to work with it without good IDE support. I simply don't (yet) use it regularly enough to keep all this stuff in my head. This is basically stopping me dead in my tracks. 😢

Any ideas?

@sophiajt
Copy link

The version in rustup right now is currently broken, waiting on the fix mentioned in #378 to land and make its way to rustup

@sophiajt
Copy link

According to @nrc, if you build the rls from source, you can avoid waiting until rustup gets the new version

@xogeny
Copy link
Author

xogeny commented Jun 26, 2017

According to #378, the fix was put in master 2 days ago. So shouldn't the nightly already have it?

@sophiajt
Copy link

There's the manual step of syncing the repo rustup uses with the rls repo. I'm not sure if that step has happened yet (unfortunately both @nrc and myself just traveled half way across the world in the last day). Hopefully it'll go in soon.

@xogeny
Copy link
Author

xogeny commented Jun 26, 2017

Is there a simple way to downgrade vs. build from source. I don't need bleeding edge. It is just that rls isn't in stable. Do we know at what point the nightly broke?

@sophiajt
Copy link

Here's the PR: rust-lang/rust#42911

Yes, you should be able to use the rls from a few days ago. Rustup can install other nightly versions. Eg. Instead of nightly install nightly-2017-06-23 or an earlier date (I can't remember the exact date it broke)

@sophiajt
Copy link

(You may also need to tweak the vscode plugin, I don't remember)

@Xanewok
Copy link
Member

Xanewok commented Jun 26, 2017

Change queue sometimes causing the Missing change, aborting. was commited 8 days ago (577ba2c), so anything before that might be a safe bet (I'm not sure which version of RLS rustup includes before that, though), but since it's alpha it may come with different problems of its own (like #330) 😛

@nrc
Copy link
Member

nrc commented Jun 27, 2017

As others have said, this is fixed on master and landing in nightly 'soon' (rust-lang/rust#42911)

@nrc nrc closed this as completed Jun 27, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants