Skip to content

Memory Usage (Clears Database) panicks #10444

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
Tracked by #11387 ...
MolotovCherry opened this issue Oct 3, 2021 · 3 comments
Closed
Tracked by #11387 ...

Memory Usage (Clears Database) panicks #10444

MolotovCherry opened this issue Oct 3, 2021 · 3 comments
Labels
Broken Window Bugs / technical debt to be addressed immediately C-bug Category: bug

Comments

@MolotovCherry
Copy link

MolotovCherry commented Oct 3, 2021

Not much to say here,

Running the latest nightly (as of this date), ran the "Memory Usage (Clears Database)" command, and it panicked. Interestingly enough, I ran the "Status" command after this one, and the same error causes it to panick evey time (In fact, as soon as I click "Go to Output" it panicks again endlessly). I think it fails on any command now.

In the end, the only thing that made RA usable again was Restarting the server.

I grabbed the version of RA for you. rust-analyzer 60c544912 2021-10-03 nightly

thread '<unnamed>' panicked at 'no value set for FileSourceRootQuery(FileId(107))', C:\Users\runneradmin\.cargo\registry\src\gb.xjqchip.workers.dev-1ecc6299db9ec823\salsa-0.17.0-pre.1\src\input.rs:106:32
stack backtrace:
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
[Error - 8:32:29 AM] Request textDocument/codeLens failed.
  Message: server panicked: no value set for FileSourceRootQuery(FileId(107))
  Code: -32603

So, I decided to run the Memory Usage command again after it restarted, just to see what happens. It crashed again, same as before. Looks reproducible

thread '<unnamed>' panicked at 'no value set for FileSourceRootQuery(FileId(1))', C:\Users\runneradmin\.cargo\registry\src\gb.xjqchip.workers.dev-1ecc6299db9ec823\salsa-0.17.0-pre.1\src\input.rs:106:32
stack backtrace:
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
[Error - 8:39:54 AM] Request textDocument/codeLens failed.
  Message: server panicked: no value set for FileSourceRootQuery(FileId(1))
  Code: -32603 
@lnicola
Copy link
Member

lnicola commented Oct 10, 2021

See #9168, but now everything seems to break after running "Memory Usage", which I don't think it used to do at the time.

@lnicola lnicola added C-bug Category: bug Broken Window Bugs / technical debt to be addressed immediately labels Oct 10, 2021
@jonas-schievink
Copy link
Contributor

This is sort of expected behavior, since we want to include memory usage of database inputs in the memory usage calculation. You can fix it by typing something.

Perhaps we should mark developer-only commands somehow, or hide them from normal users if that's possible?

@Veykril
Copy link
Member

Veykril commented Nov 7, 2022

The command is now marked as a debug command, we also offer a server restart command which allows to "fix" the server again. Fixing this properly isn't really too easy, but also not worth the effort I think.

@Veykril Veykril closed this as completed Nov 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Broken Window Bugs / technical debt to be addressed immediately C-bug Category: bug
Projects
None yet
Development

No branches or pull requests

4 participants