Skip to content
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

thread 'Worker' panicked #18777

Open
pfwang80s opened this issue Dec 28, 2024 · 8 comments
Open

thread 'Worker' panicked #18777

pfwang80s opened this issue Dec 28, 2024 · 8 comments
Labels
C-bug Category: bug I-panic S-unactionable Issue requires feedback, design decisions or is blocked on other work

Comments

@pfwang80s
Copy link

version: 0.3.2228

2024-12-28T23:08:12.029781324+08:00 ERROR Position LineCol { line: 55, col: 13 } column exceeds line length 11, clamping it
2024-12-28T23:08:12.029840077+08:00 ERROR Position LineCol { line: 55, col: 13 } column exceeds line length 11, clamping it
2024-12-28T23:09:11.04839502+08:00 ERROR Position LineCol { line: 89, col: 18 } column exceeds line length 1, clamping it
2024-12-28T23:09:11.048452108+08:00 ERROR Position LineCol { line: 89, col: 18 } column exceeds line length 1, clamping it
2024-12-28T23:09:11.048460884+08:00 ERROR Position LineCol { line: 120, col: 18 } column exceeds line length 1, clamping it
2024-12-28T23:09:11.048468112+08:00 ERROR Position LineCol { line: 120, col: 18 } column exceeds line length 1, clamping it
2024-12-28T23:09:11.048475134+08:00 ERROR Position LineCol { line: 131, col: 24 } column exceeds line length 1, clamping it
2024-12-28T23:09:11.048482934+08:00 ERROR Position LineCol { line: 131, col: 24 } column exceeds line length 1, clamping it
2024-12-28T23:09:11.048491434+08:00 ERROR Position LineCol { line: 141, col: 24 } column exceeds line length 2, clamping it
2024-12-28T23:09:11.048498255+08:00 ERROR Position LineCol { line: 141, col: 24 } column exceeds line length 2, clamping it
2024-12-28T23:09:29.769465964+08:00 ERROR Position LineCol { line: 120, col: 18 } column exceeds line length 1, clamping it
2024-12-28T23:09:29.769498334+08:00 ERROR Position LineCol { line: 120, col: 18 } column exceeds line length 1, clamping it
2024-12-28T23:09:29.769502598+08:00 ERROR Position LineCol { line: 131, col: 24 } column exceeds line length 1, clamping it
2024-12-28T23:09:29.769505802+08:00 ERROR Position LineCol { line: 131, col: 24 } column exceeds line length 1, clamping it
2024-12-28T23:09:29.769509167+08:00 ERROR Position LineCol { line: 141, col: 24 } column exceeds line length 2, clamping it
2024-12-28T23:09:29.769512141+08:00 ERROR Position LineCol { line: 141, col: 24 } column exceeds line length 2, clamping it
2024-12-28T23:11:08.748416828+08:00 ERROR Position LineCol { line: 140, col: 19 } column exceeds line length 10, clamping it
2024-12-28T23:11:08.748492679+08:00 ERROR Position LineCol { line: 140, col: 19 } column exceeds line length 10, clamping it
2024-12-28T23:14:43.440354304+08:00 ERROR Position LineCol { line: 934, col: 30 } column exceeds line length 14, clamping it
2024-12-28T23:14:43.440404285+08:00 ERROR Position LineCol { line: 934, col: 30 } column exceeds line length 14, clamping it
2024-12-28T23:14:50.925405007+08:00 ERROR Position LineCol { line: 934, col: 30 } column exceeds line length 14, clamping it
2024-12-28T23:14:50.925445526+08:00 ERROR Position LineCol { line: 934, col: 30 } column exceeds line length 14, clamping it
Panic context:

version: 0.3.2228-standalone
request: textDocument/diagnostic DocumentDiagnosticParams {
text_document: TextDocumentIdentifier {
uri: Url {
scheme: "file",
cannot_be_a_base: false,
username: "",
password: None,
host: None,
port: None,
path: "/home/user1/txnkv/participant/src/page.rs",
query: None,
fragment: None,
},
},
identifier: None,
previous_result_id: Some(
"rust-analyzer",
),
work_done_progress_params: WorkDoneProgressParams {
work_done_token: None,
},
partial_result_params: PartialResultParams {
partial_result_token: None,
},
}

thread 'Worker' panicked at /github/home/.cargo/registry/src/index.crates.io-6f17d22bba15001f/chalk-ir-0.98.0/src/lib.rs:2238:9:
assertion left == right failed
left: 2
right: 1
stack backtrace:
0: rust_begin_unwind
1: core::panicking::panic_fmt
2: core::panicking::assert_failed_inner
3: core::panicking::assert_failed
4: chalk_ir::Binders::substitute
5: hir_ty::mir::ProjectionElem<V,T>::projected_ty
6: hir_ty::mir::borrowck::moved_out_of_ref::{{closure}}
7: hir_ty::mir::borrowck::borrowck_query::{{closure}}
8: hir_ty::mir::borrowck::borrowck_query
9: ra_salsa::derived_lru::slot::Slot<Q,MP>::execute
10: ra_salsa::derived_lru::slot::Slot<Q,MP>::read
11: <ra_salsa::derived_lru::DerivedStorage<Q,MP> as ra_salsa::plumbing::QueryStorageOps>::fetch
12: ::borrowck
13: hir::DefWithBody::diagnostics
14: hir::Module::diagnostics
15: ide_diagnostics::semantic_diagnostics
16: ide_diagnostics::full_diagnostics
17: ra_salsa::Cancelled::catch
18: ide::Analysis::full_diagnostics
19: rust_analyzer::handlers::request::handle_document_diagnostics
20: core::ops::function::FnOnce::call_once{{vtable.shim}}
note: Some details are omitted, run with RUST_BACKTRACE=full for a verbose backtrace.
[Error - 11:15:44 PM] Request textDocument/diagnostic failed.
Message: request handler panicked: assertion left == right failed
left: 2
right: 1
Code: -32603
[Error - 11:15:44 PM] Document pull failed for text document file:///home/user1/txnkv/participant/src/page.rs
Message: request handler panicked: assertion left == right failed
left: 2
right: 1
Code: -32603
Panic context:

version: 0.3.2228-standalone
request: textDocument/codeAction CodeActionParams {
text_document: TextDocumentIdentifier {
uri: Url {
scheme: "file",
cannot_be_a_base: false,
username: "",
password: None,
host: None,
port: None,
path: "/home/user1/txnkv/participant/src/page.rs",
query: None,
fragment: None,
},
},
range: Range {
start: Position {
line: 930,
character: 41,
},
end: Position {
line: 930,
character: 41,
},
},
context: CodeActionContext {
diagnostics: [],
only: None,
trigger_kind: Some(
Automatic,
),
},
work_done_progress_params: WorkDoneProgressParams {
work_done_token: None,
},
partial_result_params: PartialResultParams {
partial_result_token: None,
},
}

thread 'Worker' panicked at /github/home/.cargo/registry/src/index.crates.io-6f17d22bba15001f/chalk-ir-0.98.0/src/lib.rs:2238:9:
assertion left == right failed
left: 2
right: 1
stack backtrace:
0: rust_begin_unwind
1: core::panicking::panic_fmt
2: core::panicking::assert_failed_inner
3: core::panicking::assert_failed
4: chalk_ir::Binders::substitute
5: hir_ty::mir::ProjectionElem<V,T>::projected_ty
6: hir_ty::mir::borrowck::moved_out_of_ref::{{closure}}
7: hir_ty::mir::borrowck::borrowck_query::{{closure}}
8: hir_ty::mir::borrowck::borrowck_query
9: ra_salsa::derived_lru::slot::Slot<Q,MP>::execute
10: ra_salsa::derived_lru::slot::Slot<Q,MP>::read
11: <ra_salsa::derived_lru::DerivedStorage<Q,MP> as ra_salsa::plumbing::QueryStorageOps>::fetch
12: ::borrowck
13: hir::DefWithBody::diagnostics
14: hir::Module::diagnostics
15: ide_diagnostics::semantic_diagnostics
16: ide_diagnostics::full_diagnostics
17: ra_salsa::Cancelled::catch
18: rust_analyzer::handlers::request::handle_code_action
19: core::ops::function::FnOnce::call_once{{vtable.shim}}
note: Some details are omitted, run with RUST_BACKTRACE=full for a verbose backtrace.
Panic context:

version: 0.3.2228-standalone
request: textDocument/codeAction CodeActionParams {
text_document: TextDocumentIdentifier {
uri: Url {
scheme: "file",
cannot_be_a_base: false,
username: "",
password: None,
host: None,
port: None,
path: "/home/user1/txnkv/participant/src/page.rs",
query: None,
fragment: None,
},
},
range: Range {
start: Position {
line: 930,
character: 41,
},
end: Position {
line: 930,
character: 41,
},
},
context: CodeActionContext {
diagnostics: [
Diagnostic {
range: Range {
start: Position {
line: 930,
character: 41,
},
end: Position {
line: 930,
character: 41,
},
},
severity: Some(
Error,
),
code: Some(
String(
"Click for full compiler diagnostic",
),
),
code_description: Some(
CodeDescription {
href: Url {
scheme: "rust-analyzer-diagnostics-view",
cannot_be_a_base: false,
username: "",
password: None,
host: None,
port: None,
path: "/diagnostic%20message%20%5B0%5D",
query: Some(
"0",
),
fragment: Some(
"file%3A%2F%2F%2Fhome%2Fuser1%2Ftxnkv%2Fparticipant%2Fsrc%2Fpage.rs",
),
},
},
),
source: Some(
"rustc",
),
message: "expected ;, found sibling",
related_information: Some(
[
DiagnosticRelatedInformation {
location: Location {
uri: Url {
scheme: "file",
cannot_be_a_base: false,
username: "",
password: None,
host: None,
port: None,
path: "/home/user1/txnkv/participant/src/page.rs",
query: None,
fragment: None,
},
range: Range {
start: Position {
line: 931,
character: 8,
},
end: Position {
line: 931,
character: 15,
},
},
},
message: "unexpected token",
},
DiagnosticRelatedInformation {
location: Location {
uri: Url {
scheme: "file",
cannot_be_a_base: false,
username: "",
password: None,
host: None,
port: None,
path: "/home/user1/txnkv/participant/src/page.rs",
query: None,
fragment: None,
},
range: Range {
start: Position {
line: 930,
character: 41,
},
end: Position {
line: 930,
character: 41,
},
},
},
message: "add ; here: ;",
},
],
),
tags: None,
data: Some(
Object {
"rendered": String("\u{1b}[0m\u{1b}[1m\u{1b}[38;5;9merror\u{1b}[0m\u{1b}[0m\u{1b}[1m: expected ;, found sibling\u{1b}[0m\n\u{1b}[0m \u{1b}[0m\u{1b}[0m\u{1b}[1m\u{1b}[38;5;12m--> \u{1b}[0m\u{1b}[0mparticipant/src/page.rs:931:42\u{1b}[0m\n\u{1b}[0m \u{1b}[0m\u{1b}[0m\u{1b}[1m\u{1b}[38;5;12m|\u{1b}[0m\n\u{1b}[0m\u{1b}[1m\u{1b}[38;5;12m931\u{1b}[0m\u{1b}[0m \u{1b}[0m\u{1b}[0m\u{1b}[1m\u{1b}[38;5;12m|\u{1b}[0m\u{1b}[0m \u{1b}[0m\u{1b}[0m let sibling_frame = sibling.frame\u{1b}[0m\n\u{1b}[0m \u{1b}[0m\u{1b}[0m\u{1b}[1m\u{1b}[38;5;12m|\u{1b}[0m\u{1b}[0m \u{1b}[0m\u{1b}[0m\u{1b}[1m\u{1b}[38;5;9m^\u{1b}[0m\u{1b}[0m \u{1b}[0m\u{1b}[0m\u{1b}[1m\u{1b}[38;5;9mhelp: add ; here\u{1b}[0m\n\u{1b}[0m\u{1b}[1m\u{1b}[38;5;12m932\u{1b}[0m\u{1b}[0m \u{1b}[0m\u{1b}[0m\u{1b}[1m\u{1b}[38;5;12m|\u{1b}[0m\u{1b}[0m \u{1b}[0m\u{1b}[0m sibling.set_last_seq(xlog.push(\u{1b}[0m\n\u{1b}[0m \u{1b}[0m\u{1b}[0m\u{1b}[1m\u{1b}[38;5;12m|\u{1b}[0m\u{1b}[0m \u{1b}[0m\u{1b}[0m\u{1b}[1m\u{1b}[38;5;12m-------\u{1b}[0m\u{1b}[0m \u{1b}[0m\u{1b}[0m\u{1b}[1m\u{1b}[38;5;12munexpected token\u{1b}[0m\n\n"),
},
),
},
Diagnostic {
range: Range {
start: Position {
line: 930,
character: 41,
},
end: Position {
line: 930,
character: 41,
},
},
severity: Some(
Hint,
),
code: None,
code_description: None,
source: Some(
"rustc",
),
message: "add ; here: ;",
related_information: Some(
[
DiagnosticRelatedInformation {
location: Location {
uri: Url {
scheme: "file",
cannot_be_a_base: false,
username: "",
password: None,
host: None,
port: None,
path: "/home/user1/txnkv/participant/src/page.rs",
query: None,
fragment: None,
},
range: Range {
start: Position {
line: 930,
character: 41,
},
end: Position {
line: 930,
character: 41,
},
},
},
message: "original diagnostic",
},
],
),
tags: None,
data: None,
},
],
only: None,
trigger_kind: Some(
Automatic,
),
},
work_done_progress_params: WorkDoneProgressParams {
work_done_token: None,
},
partial_result_params: PartialResultParams {
partial_result_token: None,
},
}

thread 'Worker' panicked at /github/home/.cargo/registry/src/index.crates.io-6f17d22bba15001f/chalk-ir-0.98.0/src/lib.rs:2238:9:
assertion left == right failed
left: 2
right: 1
stack backtrace:
0: rust_begin_unwind
1: core::panicking::panic_fmt
2: core::panicking::assert_failed_inner
3: core::panicking::assert_failed
4: chalk_ir::Binders::substitute
5: hir_ty::mir::ProjectionElem<V,T>::projected_ty
6: hir_ty::mir::borrowck::moved_out_of_ref::{{closure}}
7: hir_ty::mir::borrowck::borrowck_query::{{closure}}
8: hir_ty::mir::borrowck::borrowck_query
9: ra_salsa::derived_lru::slot::Slot<Q,MP>::execute
10: ra_salsa::derived_lru::slot::Slot<Q,MP>::read
11: <ra_salsa::derived_lru::DerivedStorage<Q,MP> as ra_salsa::plumbing::QueryStorageOps>::fetch
12: ::borrowck
13: hir::DefWithBody::diagnostics
14: hir::Module::diagnostics
15: ide_diagnostics::semantic_diagnostics
16: ide_diagnostics::full_diagnostics
17: ra_salsa::Cancelled::catch
18: rust_analyzer::handlers::request::handle_code_action
19: core::ops::function::FnOnce::call_once{{vtable.shim}}
note: Some details are omitted, run with RUST_BACKTRACE=full for a verbose backtrace.

@pfwang80s pfwang80s added the C-bug Category: bug label Dec 28, 2024
@Veykril
Copy link
Member

Veykril commented Dec 28, 2024

That will need a reproducer for us to be actionable

@Veykril Veykril added S-unactionable Issue requires feedback, design decisions or is blocked on other work I-panic labels Dec 28, 2024
@tylers-epilog
Copy link

Not sure how to get reproducer either, but I'm also getting this error. Will report back if I can figure out how to reproduce it.

I noticed that the error squiggles aren't updated on save because (I think) cargo check isn't being run even though the check-on-save setting is set to true. This behavior seems related to this bug.

@ChayimFriedman2
Copy link
Contributor

I noticed that the error squiggles aren't updated on save because (I think) cargo check isn't being run even though the check-on-save setting is set to true. This behavior seems related to this bug.

This isn't related, this is #18854, and it already has a fix: #18858.

@tylers-epilog
Copy link

Well that's a relief! Thanks for the heads up! Looking forward to that fix being pushed.

@hak8or
Copy link

hak8or commented Jan 16, 2025

For anyone else coming here because they saw the error in vscode when auto completion was failing, after doing a git bissect on this project between when it worked last for me via 2024-12-16 and when it stopped working via 2024-12-23, I got 02d47f3 as the commit which introduced this behavior for me.

I do see #18834 and #18888 and #18889 attempted to resolve some of the "regressions" from that commit (which was introduced via #18723).

I did try the latest release of 2025-01-13 but still saw the failing case. I also tried master which is 903bc81 as of now, but still no dice. I was hoping if I might be able to "just" revert the commit in question atop master, but the conflict resolution is above my skills with rust and familiarity with this codebase. I have been trying to get a minimal reproducible example but haven't been able to be lucky with what I extract from my proprietary codebase to reproduce this.

Hopefully this helps anyone else who might be getting hit by this.

@ChayimFriedman2
Copy link
Contributor

@hak8or Do you have a reproduction?

@hak8or
Copy link

hak8or commented Jan 18, 2025

@hak8or Do you have a reproduction?

I have continued to attempt to get a minimal reproducible example since I posted a few days, but have sadly failed in my attempts. I cannot share the codebase I am seeing this in because it's proprietary. I will continue to attempt to check new releases if I see any changes, and making a small reproducible.

Would you want me to shift this to a new issue, or keep it here as is?

@ChayimFriedman2
Copy link
Contributor

When you'll have a reproduction, I think a new issue should be preferred, since this one doesn't have a reproduction.

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 S-unactionable Issue requires feedback, design decisions or is blocked on other work
Projects
None yet
Development

No branches or pull requests

5 participants