Skip to content

Frequent crashes on cg_clif #14791

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

Closed
bjorn3 opened this issue May 12, 2023 · 10 comments · Fixed by #14801
Closed

Frequent crashes on cg_clif #14791

bjorn3 opened this issue May 12, 2023 · 10 comments · Fixed by #14801
Labels
C-bug Category: bug I-panic

Comments

@bjorn3
Copy link
Member

bjorn3 commented May 12, 2023

https://github.com/bjorn3/rustc_codegen_cranelift/

[ERROR rust_analyzer::main_loop] flycheck 0: File with cargo diagnostic not found in VFS: file not found: /home/gh-bjorn3/.rustup/toolchains/nightly-2023-05-12-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/compiler/rustc_span/src/symbol.rs
[ERROR rust_analyzer::main_loop] flycheck 0: File with cargo diagnostic not found in VFS: file not found: /home/gh-bjorn3/.rustup/toolchains/nightly-2023-05-12-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/compiler/rustc_span/src/symbol.rs
thread 'LspServer' panicked at 'called `Option::unwrap()` on a `None` value', crates/vfs/src/lib.rs:140:38
stack backtrace:
   0: rust_begin_unwind
             at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:579:5
   1: core::panicking::panic_fmt
             at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/panicking.rs:64:14
   2: core::panicking::panic
             at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/panicking.rs:114:5
   3: rust_analyzer::global_state::GlobalState::process_changes
   4: rust_analyzer::main_loop::<impl rust_analyzer::global_state::GlobalState>::handle_event
   5: rust_analyzer::main_loop::<impl rust_analyzer::global_state::GlobalState>::run
   6: rust_analyzer::main_loop::main_loop
   7: rust_analyzer::run_server
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: "SendError(..)"', lib/lsp-server/src/stdio.rs:26:37
stack backtrace:
   0: rust_begin_unwind
             at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:579:5
   1: core::panicking::panic_fmt
             at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/panicking.rs:64:14
   2: core::result::unwrap_failed
             at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/result.rs:1750:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
[Info  - 4:47:08 PM] Connection to server got closed. Server will restart.
thread 'LspServer' panicked at 'called `Option::unwrap()` on a `None` value', crates/vfs/src/lib.rs:140:38
stack backtrace:
   0: rust_begin_unwind
             at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:579:5
   1: core::panicking::panic_fmt
             at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/panicking.rs:64:14
   2: core::panicking::panic
             at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/panicking.rs:114:5
   3: rust_analyzer::global_state::GlobalState::process_changes
   4: rust_analyzer::main_loop::<impl rust_analyzer::global_state::GlobalState>::handle_event
   5: rust_analyzer::main_loop::<impl rust_analyzer::global_state::GlobalState>::run
   6: rust_analyzer::main_loop::main_loop
   7: rust_analyzer::run_server
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: "SendError(..)"', lib/lsp-server/src/stdio.rs:26:37
stack backtrace:
   0: rust_begin_unwind
             at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:579:5
   1: core::panicking::panic_fmt
             at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/panicking.rs:64:14
   2: core::result::unwrap_failed
             at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/result.rs:1750:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
[Error - 4:55:32 PM] Client Rust Analyzer Language Server: connection to server is erroring. Shutting down server.
[Error - 4:55:32 PM] Connection to server got closed. Server will not be restarted.
[Error - 4:55:32 PM] Stopping server failed
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 4:55:32 PM] Stopping server failed
  Message: Pending response rejected since connection got disposed
  Code: -32097 

rust-analyzer version: rust-analyzer version: 0.3.1506-standalone (833d530 2023-05-07)

rustc version: rustc 1.71.0-nightly (2a8221dbd 2023-05-11)

relevant settings: N/A

@bjorn3 bjorn3 added the C-bug Category: bug label May 12, 2023
@Veykril
Copy link
Member

Veykril commented May 12, 2023

Just to clarify, the crashes happen while working in the project without fiddling with files via git or anything?

@bjorn3
Copy link
Member Author

bjorn3 commented May 12, 2023

I don't fiddle with the main git repo other than committing files. There is a git repo in a subdirectory which does get frequently have it's state reset followed by removing a set of rust files outside of any cargo package and a tiny change to a Cargo.toml file (enabling a single feature which doesn't change the set of pulled in deps). I also don't open any files inside of this subdirectory.

@bjorn3
Copy link
Member Author

bjorn3 commented May 12, 2023

Looks like it does correlate with removing those rust files although it doesn't happen every time. To be specific it happens while executing https://github.com/bjorn3/rustc_codegen_cranelift/blob/ecbb33a71b38498250bcc81b815331fbfde40736/scripts/test_rustc_tests.sh#L24-L26 I also saw it re-indexing every time that specific part of the shell script runs.

By the way I have been getting "Failed to spawn one or more proc-macro servers." as server status for a bit now without any indication about what the exact error is. Nothing is logged in the server log, nor do I observe any adverse effects.

@Veykril
Copy link
Member

Veykril commented May 12, 2023

By the way I have been getting "Failed to spawn one or more proc-macro servers." as server status for a bit now without any indication about what the exact error is. Nothing is logged in the server log, nor do I observe any adverse effects.

Do you have the RA_LOG var overwritten somehow? You should otherwise see an error log like [ERROR rust_analyzer::reload] Failed to run proc-macro server from path ...

@bjorn3
Copy link
Member Author

bjorn3 commented May 12, 2023

No, I have not afaik.

@bjorn3
Copy link
Member Author

bjorn3 commented May 14, 2023

Looks like it is fixed now, thanks!

@bjorn3
Copy link
Member Author

bjorn3 commented May 14, 2023

Just saw it again.

@Veykril
Copy link
Member

Veykril commented May 14, 2023

same backtrace? ...

@Veykril Veykril reopened this May 15, 2023
@bjorn3
Copy link
Member Author

bjorn3 commented May 15, 2023

I thought I was running the pre-release version, but it seems I was running stable, which of course didn't have the fix yet. I'm now running the pre-release version. If it shows up again I will re-open this issue.

@bjorn3 bjorn3 closed this as completed May 15, 2023
@lnicola
Copy link
Member

lnicola commented May 15, 2023

By the way, the pre-release versions are no longer updated since Friday, which means you still don't have the fix (unless you're downloading it from GitHub or building from source).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug I-panic
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants