Closed BoredSathvik closed 2 years ago
Can't reproduce, can you test using a pre-release version from here?
Or does rust-analyzer analysis-stats .
crash with the same error? See https://rust-analyzer.github.io/manual.html#vs-code for the path to the executable.
I tried it in pre release v0.3.969 and it is still the same, it gives error as server exited
and
output for rust analyzer language server as
thread 'main' has overflowed its stack
[ERROR rust_analyzer::reload] proc macro server crashed: failed to write request: The pipe is being closed. (os error 232)
[ERROR rust_analyzer::reload] proc macro server crashed: failed to write request: The pipe is being closed. (os error 232)
tried running rust-analyzer analysis-stats .
gave me the same result
Database loaded: 127.31s (metadata 6.19s; build 120.25s)
crates: 1, mods: 1, decls: 1, fns: 1
Item Collection: 16.00s
0/1 0% processing: main
thread 'main' has overflowed its stack
exprs: 1, ??ty: 0 (0%), ?ty: 0 (0%), !ty: 0
Inference: 6.64s
Total: 22.64s
Strange, can anyone else reproduce this?
@BoredSathvik are you on Windows? Maybe we simply use too much stack.
Could you run rust-analyzer analysis-stats .
in a debugger and get a backtrace for the location the stack overflow happens?
@BoredSathvik are you on Windows? Maybe we simply use too much stack.
yes
Could you run
rust-analyzer analysis-stats .
in a debugger and get a backtrace for the location the stack overflow happens?
can i use windbg?
can i use windbg?
Yes. I am not a windows user though, so I don't know what command to use to get a backtrace.
# Call Site
00 ntdll!NtTerminateProcess
01 ntdll!RtlExitUserProcess
02 KERNEL32!ExitProcessImplementation
03 ucrtbase!exit_or_terminate_process
04 ucrtbase!common_exit
05 rust_analyzer!__scrt_common_main_seh
06 KERNEL32!BaseThreadInitThunk
07 ntdll!RtlUserThreadStart
will this work?
It looks like that is after the stack has unwound. I have no clue how to get a backtrace before unwinding the stack though.
It looks like that is after the stack has unwound. I have no clue how to get a backtrace before unwinding the stack though.
oh, do i just copy stuff right after it panics?
00 rust_analyzer!ZN8indexmap3map4core25IndexMapCore$LT$K$C$V$GT$11insert_full17h0d17b14a568160b7E
01 rust_analyzer!ZN5salsa7runtime11local_state10LocalState17report_query_read17h1cad625ca301c948E
02 rust_analyzer!ZN106_$LT$salsa..derived..DerivedStorage$LT$Q$C$MP$GT$$u20$as$u20$salsa..plumbing..QueryStorageOps$LT$Q$GT$$GT$9try_fetch17ha667aa8a704db4f6E
03 rust_analyzer!ZN5salsa19QueryTable$LT$Q$GT$3get17h9a96c18e8fed29afE
04 rust_analyzer!ZN47_$LT$DB$u20$as$u20$hir_def..db..DefDatabase$GT$14file_item_tree17h165c1c466e125a84E
05 rust_analyzer!ZN97_$LT$salsa..input..InputStorage$LT$Q$GT$$u20$as$u20$salsa..plumbing..QueryStorageOps$LT$Q$GT$$GT$9try_fetch17hf34238ea3820613eE
06 rust_analyzer!ZN7hir_def4attr14AttrsWithOwner11attrs_query17h49e141fa54082ffaE
07 rust_analyzer!ZN5salsa7runtime7Runtime28execute_query_implementation17h432f468cca285bf5E
08 rust_analyzer!ZN5salsa7derived4slot18Slot$LT$Q$C$MP$GT$4read17hf1a8ab1e21010024E
09 rust_analyzer!ZN5salsa7derived4slot18Slot$LT$Q$C$MP$GT$4read17h98310b5014030d87E
0a rust_analyzer!ZN106_$LT$salsa..derived..DerivedStorage$LT$Q$C$MP$GT$$u20$as$u20$salsa..plumbing..QueryStorageOps$LT$Q$GT$$GT$9try_fetch17hc6d71bc66d83c888E
0b rust_analyzer!ZN5salsa19QueryTable$LT$Q$GT$3get17h96599808f4d956daE
0c rust_analyzer!ZN47_$LT$DB$u20$as$u20$hir_def..db..DefDatabase$GT$5attrs17hcdade9de6d51bfcfE
0d rust_analyzer!ZN7hir_def9lang_item9LangItems17collect_lang_item17h4cd8179efc75ad34E
0e rust_analyzer!ZN7hir_def9lang_item9LangItems22crate_lang_items_query17hae10b293d3c5711bE
0f rust_analyzer!ZN5salsa7runtime7Runtime28execute_query_implementation17h97257a7f4317c067E
10 rust_analyzer!ZN5salsa7derived4slot18Slot$LT$Q$C$MP$GT$4read17hf1a8ab1e21010024E
11 rust_analyzer!ZN5salsa7derived4slot18Slot$LT$Q$C$MP$GT$4read17he59487140b5a507aE
12 rust_analyzer!ZN106_$LT$salsa..derived..DerivedStorage$LT$Q$C$MP$GT$$u20$as$u20$salsa..plumbing..QueryStorageOps$LT$Q$GT$$GT$9try_fetch17h00f126746a50f6fdE
13 rust_analyzer!ZN5salsa19QueryTable$LT$Q$GT$3get17h51c0b9fec21e2374E
14 rust_analyzer!ZN47_$LT$DB$u20$as$u20$hir_def..db..DefDatabase$GT$16crate_lang_items17h59ae32f9bf8e6de9E
15 rust_analyzer!ZN7hir_def9lang_item9LangItems15lang_item_query17h0fbe68c0162178dfE
16 rust_analyzer!ZN5salsa7runtime7Runtime28execute_query_implementation17h277a9654a536e815E
17 rust_analyzer!ZN5salsa7derived4slot18Slot$LT$Q$C$MP$GT$4read17hf1a8ab1e21010024E
18 rust_analyzer!ZN5salsa7derived4slot18Slot$LT$Q$C$MP$GT$4read17he45dc30d027c68c3E
19 rust_analyzer!ZN106_$LT$salsa..derived..DerivedStorage$LT$Q$C$MP$GT$$u20$as$u20$salsa..plumbing..QueryStorageOps$LT$Q$GT$$GT$9try_fetch17h38c7fd532d5e12d0E
1a rust_analyzer!ZN5salsa19QueryTable$LT$Q$GT$3get17ha2359d55823a8b9fE
1b rust_analyzer!ZN47_$LT$DB$u20$as$u20$hir_def..db..DefDatabase$GT$9lang_item17h487e02c2ac66b53cE
1c rust_analyzer!ZN7hir_def9lang_item9LangItems15lang_item_query17h0fbe68c0162178dfE
1d rust_analyzer!ZN5salsa7runtime7Runtime28execute_query_implementation17h277a9654a536e815E
1e rust_analyzer!ZN5salsa7derived4slot18Slot$LT$Q$C$MP$GT$4read17hf1a8ab1e21010024E
1f rust_analyzer!ZN5salsa7derived4slot18Slot$LT$Q$C$MP$GT$4read17he45dc30d027c68c3E
20 rust_analyzer!ZN106_$LT$salsa..derived..DerivedStorage$LT$Q$C$MP$GT$$u20$as$u20$salsa..plumbing..QueryStorageOps$LT$Q$GT$$GT$9try_fetch17h38c7fd532d5e12d0E
21 rust_analyzer!ZN5salsa19QueryTable$LT$Q$GT$3get17ha2359d55823a8b9fE
22 rust_analyzer!ZN47_$LT$DB$u20$as$u20$hir_def..db..DefDatabase$GT$9lang_item17h487e02c2ac66b53cE
23 rust_analyzer!ZN7hir_def9lang_item9LangItems15lang_item_query17h0fbe68c0162178dfE
24 rust_analyzer!ZN5salsa7runtime7Runtime28execute_query_implementation17h277a9654a536e815E
25 rust_analyzer!ZN5salsa7derived4slot18Slot$LT$Q$C$MP$GT$4read17hf1a8ab1e21010024E
26 rust_analyzer!ZN5salsa7derived4slot18Slot$LT$Q$C$MP$GT$4read17he45dc30d027c68c3E
27 rust_analyzer!ZN106_$LT$salsa..derived..DerivedStorage$LT$Q$C$MP$GT$$u20$as$u20$salsa..plumbing..QueryStorageOps$LT$Q$GT$$GT$9try_fetch17h38c7fd532d5e12d0E
28 rust_analyzer!ZN5salsa19QueryTable$LT$Q$GT$3get17ha2359d55823a8b9fE
29 rust_analyzer!ZN47_$LT$DB$u20$as$u20$hir_def..db..DefDatabase$GT$9lang_item17h487e02c2ac66b53cE
2a rust_analyzer!ZN7hir_def9lang_item9LangItems15lang_item_query17h0fbe68c0162178dfE
2b rust_analyzer!ZN5salsa7runtime7Runtime28execute_query_implementation17h277a9654a536e815E
2c rust_analyzer!ZN5salsa7derived4slot18Slot$LT$Q$C$MP$GT$4read17hf1a8ab1e21010024E
2d rust_analyzer!ZN5salsa7derived4slot18Slot$LT$Q$C$MP$GT$4read17he45dc30d027c68c3E
2e rust_analyzer!ZN106_$LT$salsa..derived..DerivedStorage$LT$Q$C$MP$GT$$u20$as$u20$salsa..plumbing..QueryStorageOps$LT$Q$GT$$GT$9try_fetch17h38c7fd532d5e12d0E
2f rust_analyzer!ZN5salsa19QueryTable$LT$Q$GT$3get17ha2359d55823a8b9fE
30 rust_analyzer!ZN47_$LT$DB$u20$as$u20$hir_def..db..DefDatabase$GT$9lang_item17h487e02c2ac66b53cE
31 rust_analyzer!ZN7hir_def9lang_item9LangItems15lang_item_query17h0fbe68c0162178dfE
32 rust_analyzer!ZN5salsa7runtime7Runtime28execute_query_implementation17h277a9654a536e815E
33 rust_analyzer!ZN5salsa7derived4slot18Slot$LT$Q$C$MP$GT$4read17hf1a8ab1e21010024E
34 rust_analyzer!ZN5salsa7derived4slot18Slot$LT$Q$C$MP$GT$4read17he45dc30d027c68c3E
35 rust_analyzer!ZN106_$LT$salsa..derived..DerivedStorage$LT$Q$C$MP$GT$$u20$as$u20$salsa..plumbing..QueryStorageOps$LT$Q$GT$$GT$9try_fetch17h38c7fd532d5e12d0E
36 rust_analyzer!ZN5salsa19QueryTable$LT$Q$GT$3get17ha2359d55823a8b9fE
37 rust_analyzer!ZN47_$LT$DB$u20$as$u20$hir_def..db..DefDatabase$GT$9lang_item17h487e02c2ac66b53cE
38 rust_analyzer!ZN6hir_ty5lower23trait_environment_query17hc629d633e5ca9a27E
39 rust_analyzer!ZN5salsa7runtime7Runtime28execute_query_implementation17h48423079aecf9d7aE
3a rust_analyzer!ZN5salsa7derived4slot18Slot$LT$Q$C$MP$GT$4read17hfc8cf1c7368bd2f3E
3b rust_analyzer!ZN5salsa7derived4slot18Slot$LT$Q$C$MP$GT$4read17hb86c00b51ed471b8E
3c rust_analyzer!ZN5salsa19QueryTable$LT$Q$GT$3get17h0f2b1e05f96c6e39E
3d rust_analyzer!ZN46_$LT$DB$u20$as$u20$hir_ty..db..HirDatabase$GT$17trait_environment17h0a67508e292ff629E
3e rust_analyzer!ZN6hir_ty5infer11infer_query17h3c616dec4163d1c1E
3f rust_analyzer!ZN5salsa7runtime7Runtime28execute_query_implementation17hdc462eb98ed47770E
40 rust_analyzer!ZN5salsa7derived4slot18Slot$LT$Q$C$MP$GT$4read17hfc8cf1c7368bd2f3E
41 rust_analyzer!ZN5salsa7derived4slot18Slot$LT$Q$C$MP$GT$4read17h994a3e3fae2b0386E
42 rust_analyzer!ZN5salsa19QueryTable$LT$Q$GT$3get17ha3dc277b3842af39E
43 rust_analyzer!ZN46_$LT$DB$u20$as$u20$hir_ty..db..HirDatabase$GT$11infer_query17hf8bbe3a11669f979E
44 rust_analyzer!ZN6hir_ty2db10infer_wait17h7ca7c2c413b683b3E
45 rust_analyzer!ZN13rust_analyzer3cli14analysis_stats58_$LT$impl$u20$rust_analyzer..cli..flags..AnalysisStats$GT$3run17h9e573f09d8fd35cdE
46 rust_analyzer!ZN4core3ptr70drop_in_place$LT$tracing_subscriber..filter..directive..ParseError$GT$17h6f8d237fa1afb57cE.llvm.10051581588487343680
47 rust_analyzer!ZN3std10sys_common9backtrace28__rust_begin_short_backtrace17h72958d03da7b3d0cE
48 rust_analyzer!ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17ha2e09256cc88be57E.llvm.15949137620119686375
49 rust_analyzer!core::ops::function::impls::impl$2::call_once
4a rust_analyzer!std::panicking::try::do_call
4b rust_analyzer!std::panicking::try
4c rust_analyzer!std::panic::catch_unwind
4d rust_analyzer!std::rt::lang_start_internal::closure$2
4e rust_analyzer!std::panicking::try::do_call
4f rust_analyzer!std::panicking::try
50 rust_analyzer!std::panic::catch_unwind
51 rust_analyzer!std::rt::lang_start_internal
52 rust_analyzer!main
53 rust_analyzer!invoke_main
54 rust_analyzer!__scrt_common_main_seh
55 KERNEL32!BaseThreadInitThunk
56 ntdll!RtlUserThreadStart
I can't find a way to add pdb file to make it readable😔
56 stack frames shouldn't be anywhere near enough to cause a stack overflow. Weird.
56 stack frames shouldn't be anywhere near enough to cause a stack overflow. Weird.
maybe there were more but got poped after the overflow bc i breaked this like few seconds after the overflow
I'm having the same problem, but with https://github.com/Tamschi/asteracea-website/tree/39a655cc469c8af505855ba696a6ced60667a611.
The GUI component macros create large nested expressions with a number of closures. The Rust compiler handles it fine, but it seems to be a bit too much for r-a.
I'm having the same problem, but with https://github.com/Tamschi/asteracea-website/tree/39a655cc469c8af505855ba696a6ced60667a611.
The GUI component macros create large nested expressions with a number of closures. The Rust compiler handles it fine, but it seems to be a bit too much for r-a.
Sorry, I should provide a bit more information.
In my case it's not crashing in the console, just in Code (Windows).
Rust Analyzer Client gives me Extension version: 0.3.987
in its log (and also the same server version), and this is the configuration:
https://github.com/rust-lang/rust-analyzer/pull/12058 increases the stack size on Windows to match the default on Linux (for both the LSP server and the proc-macro process). It would be great if you could test this once that is included in a release.
I'm getting this issue again. Using the latest rust, r-a, and compiling bevy
.
@CGMossa #12600
Steps to reproduce:
add this to main()
it should now give output
thread 'main' has overflowed its stack
rust-analyzer version: 5fae65dd2 2022-03-07 stable,
rustc version: rustc 1.59.0 (9d1b2106e 2022-02-23)