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

-Z ast-json ICEs on Windows #15846

Closed
sinistersnare opened this issue Jul 21, 2014 · 11 comments
Closed

-Z ast-json ICEs on Windows #15846

sinistersnare opened this issue Jul 21, 2014 · 11 comments
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ O-windows Operating system: Windows

Comments

@sinistersnare
Copy link
Contributor

hey, i tried running this code with the -Z ast-json flag and the following is output:

$ RUST_BACKTRACE=1 rustc graphspell.rs -Z ast-json
error: internal compiler error: unexpected failure
note: the compiler hit an unexpected failure path. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugr
eport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
task 'rustc' failed at 'called `Result::unwrap()` on an `Err` value: OS Error 8:
 Not enough storage is available to process this command.
', C:\bot\slave\nightly-win\build\src\libcore\result.rs:548

stack backtrace:
   1: 0x6a181f84
   2: 0x61f88a1c
   3: 0x61f8866d
   4: 0x61f8849e
   5: 0x61fd2658
   6: 0x7130b59c
   7: 0x7170c5c4
   8: 0x717b6613
   9: 0x717b3b0d
  10: 0x717c603e
  11: 0x717c5f5c
  12: 0x70c33cf8
  13: 0x61f882c5
  14: 0x61f85d9a
  15: 0x70c33b97
  16: 0x61f87e1f
  17: 0x77099ef2

Running on rust from a few days ago:

$ rustc --version
rustc 0.12.0-pre-nightly (f50e4ee559c0e6253e9d46a8e6763e25f7b90d90 2014-07-18 00
:01:22 +0000)

this is on git bash, on windows 7 64bit. Need any other information?

@huonw huonw added the I-ICE label Jul 21, 2014
@schmee
Copy link
Contributor

schmee commented Jul 21, 2014

Huh, this happened to me in #14940, but it should have been fixed in #14945. Looks like it's the same problem. cc @alexcrichton

@alexcrichton
Copy link
Member

@sinistersnare, can you try running this test and see what happens?

@sinistersnare
Copy link
Contributor Author

Yup, still got an ICE with -Z ast-json

Here is the output

$ RUST_BACKTRACE=1 rustc test.rs -Z ast-json
error: internal compiler error: unexpected failure
note: the compiler hit an unexpected failure path. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugr
eport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
task 'rustc' failed at 'called `Result::unwrap()` on an `Err` value: OS Error 8:
 Not enough storage is available to process this command.
', C:\bot\slave\nightly-win\build\src\libcore\result.rs:548

stack backtrace:
   1: 0x6a181f84
   2: 0x61f88a1c
   3: 0x61f8866d
   4: 0x61f8849e
   5: 0x61fd2658
   6: 0x7130b59c
   7: 0x7170c5c4
   8: 0x717b6613
   9: 0x717b3b0d
  10: 0x717c603e
  11: 0x717c5f5c
  12: 0x70c33cf8
  13: 0x61f882c5
  14: 0x61f85d9a
  15: 0x70c33b97
  16: 0x61f87e1f
  17: 0x77099ef2

(if you want me to use gdb, please tell me which commands to use)

@alexcrichton
Copy link
Member

Ah I meant if you could run the test itself (omit -Z json)

@sinistersnare
Copy link
Contributor Author

Ah yeah, forgot to say, the test passes...

@alexcrichton
Copy link
Member

Can you get a backtrace in gdb?

@sinistersnare
Copy link
Contributor Author

if i type gdb test (I named the test file test.rs) and then (gdb) run it executes the program, (gdb) bt says there is no stack to output....?

Can i get a backtrace for a non-crashing program?

@sinistersnare
Copy link
Contributor Author

Davis@XION ~/desktop
$ gdb test
GNU gdb (GDB) 7.6.1
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "mingw32".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from c:\Users\Davis\desktop\test.exe...done.
(gdb) run
Starting program: c:\Users\Davis\desktop/test.exe
[New Thread 3444.0x9ae0]
[New Thread 3444.0xedc]
[New Thread 3444.0x4c2c]
[Inferior 1 (process 3444) exited normally]
(gdb) backtrace
No stack.
(gdb)

@alexcrichton
Copy link
Member

Oh I'm curious about the backtrace with rustc itself (when using -Z ast-json). You'll want to type b rust_fail before running code to set a breakpoint on the failure function.

@sinistersnare
Copy link
Contributor Author

Got it!

Breakpoint 1, 0x61f882d0 in rust_fail () from c:\Rust\bin\rustrt-4e7c5e5c.dll
(gdb) bt
#0  0x61f882d0 in rust_fail () from c:\Rust\bin\rustrt-4e7c5e5c.dll
#1  0x61f88b61 in unwind::begin_unwind_inner::h010e59c18491af9ckJd ()
   from c:\Rust\bin\rustrt-4e7c5e5c.dll
#2  0x61f8866d in unwind::begin_unwind_fmt::hef720eb2a21d4618NGd ()
   from c:\Rust\bin\rustrt-4e7c5e5c.dll
#3  0x61f8849e in rust_begin_unwind () from c:\Rust\bin\rustrt-4e7c5e5c.dll
#4  0x61fd2658 in failure::begin_unwind::h952689cf05f74959Gsj ()
   from c:\Rust\bin\rustrt-4e7c5e5c.dll
#5  0x7130b59c in _fu8323___ZN6result23Result$LT$T$C$$x20E$GT$6unwrap15__STATIC_
FMTSTR20ha52c8aa3d1f66f95aEmE () from c:\Rust\bin\rustc-4e7c5e5c.dll
#6  0x7170c5c4 in _fu6362___ZN9LOG_LEVEL20ha26882c95fe69b47diaE ()
   from c:\Rust\bin\rustc-4e7c5e5c.dll
#7  0x717b6613 in _fu10225___ZN4cell32RefMut$LT$$x27b$C$$x20T$GT$.Drop4drop15__S
TATIC_FMTSTR20h79632b2a8020ae00K1iE () from c:\Rust\bin\rustc-4e7c5e5c.dll
#8  0x717b3b0d in driver::main_args::closure.$x22closure$x22$LP$134984$RP$ ()
   from c:\Rust\bin\rustc-4e7c5e5c.dll
#9  0x717c603e in task::TaskBuilder$LT$S$GT$::try_future::closure.$x22closure$x2
2$LP$136133$RP$ () from c:\Rust\bin\rustc-4e7c5e5c.dll
#10 0x717c5f5c in task::TaskBuilder$LT$S$GT$::spawn_internal::closure.$x22closur
e$x22$LP$136110$RP$ () from c:\Rust\bin\rustc-4e7c5e5c.dll
#11 0x70c33cf8 in task::spawn_opts::closure.$x22closure$x22$LP$8578$RP$ ()
   from c:\Rust\bin\native-4e7c5e5c.dll
#12 0x61f882c5 in unwind::try::try_fn::h20ffd20407168fa56zd ()
   from c:\Rust\bin\rustrt-4e7c5e5c.dll
#13 0x61fe7cf6 in rust_try () from c:\Rust\bin\rustrt-4e7c5e5c.dll
#14 0x61f86007 in unwind::try::hbad0e19adbb1bee3Jxd ()
   from c:\Rust\bin\rustrt-4e7c5e5c.dll
#15 0x61f85d9a in task::Task::run::h612833bf1f74f9919Xc ()
   from c:\Rust\bin\rustrt-4e7c5e5c.dll
#16 0x70c33b97 in task::spawn_opts::closure.$x22closure$x22$LP$8524$RP$ ()
   from c:\Rust\bin\native-4e7c5e5c.dll
#17 0x61f87e1f in thread::thread_start::h13b93ba6c58b755cHkd ()
   from c:\Rust\bin\rustrt-4e7c5e5c.dll
#18 0x764d33aa in KERNEL32!BaseThreadInitThunk ()
   from C:\Windows\syswow64\kernel32.dll
#19 0x77099ef2 in ntdll!RtlInitializeExceptionChain ()
   from C:\Windows\system32\ntdll.dll
#20 0x77099ec5 in ntdll!RtlInitializeExceptionChain ()
   from C:\Windows\system32\ntdll.dll
#21 0x00000000 in ?? ()
(gdb)

@sinistersnare
Copy link
Contributor Author

I no longer get this error, so I will close this :)

bors added a commit to rust-lang-ci/rust that referenced this issue Nov 27, 2023
… r=Veykril

editor/code: add option to suppress error notifications

Fixes rust-lang/rust-analyzer#14193

- Added the `rust-analyzer.showRequestFailedErrorNotification` configuration option, which defaults to `true`
- If `rust-analyzer.showRequestFailedErrorNotification` is set to `true`, the current behavior is preserved.
- If `rust-analyzer.showRequestFailedErrorNotification` is set to `false`, no error toasts will be displayed for any of the failed requests caused by panics in r-a. This _only_ applies to events that are triggered "implicitly", such as `textDocument/hover`.

To test this, you can manually introduce a panic in one of the language server LSP handlers for non-command events. I added an explicit `panic!()` in the `textDocument/hover` event handler:

#### `rust-analyzer.showRequestFailedErrorNotification` set to `true` (default)

[2023-11-07 17-17-48.webm](https://github.com/rust-lang/rust-analyzer/assets/1665677/d0408ab8-79d1-42cf-a4e7-94e99d9783ec)

#### `rust-analyzer.showRequestFailedErrorNotification` set to `false`

[2023-11-07 17-16-49.webm](https://github.com/rust-lang/rust-analyzer/assets/1665677/0496d8d0-fb53-4bc6-a279-1a47f412dbdb)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ O-windows Operating system: Windows
Projects
None yet
Development

No branches or pull requests

5 participants