rust-lang / vscode-rust

Rust extension for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=rust-lang.rust
Other
1.39k stars 167 forks source link

Mac M1 Freeze and restart once install rust extension and cargo build #893

Open ragnarok87 opened 3 years ago

ragnarok87 commented 3 years ago

Hi All, My MacBook Pro M1 keeps freezing and restarting once I install the rust extension in vs-code initiate the cargo build and the CPU hits 92%. Please give me any suggestion to run rust. Below is the system report from mac after the crash.

Os: Mac Big Sur 11.2.1 Chip: Apple M1 Vs code version : Version: 1.54.1 Extension Rust: 0.7.8 Rust-nightly: rustc 1.49.0-nightly (ffa2e7ae8 2020-10-24)

Panicked task 0xfffffe1680908000: 596 pages, 2 threads: pid 910: rustc
Panicked thread: 0xfffffe1674828658, backtrace: 0xfffffe304b3078b0, tid: 18871
          lr: 0xfffffe0018d05fd0  fp: 0xfffffe304b307920
          lr: 0xfffffe0018d05d9c  fp: 0xfffffe304b307990
          lr: 0xfffffe0018e27f0c  fp: 0xfffffe304b3079b0
          lr: 0xfffffe0018e198b8  fp: 0xfffffe304b307a60
          lr: 0xfffffe0018cbf7e8  fp: 0xfffffe304b307a70
          lr: 0xfffffe0018d05a2c  fp: 0xfffffe304b307e00
          lr: 0xfffffe0018d05a2c  fp: 0xfffffe304b307e70
          lr: 0xfffffe00194a06a0  fp: 0xfffffe304b307e90
          lr: 0xfffffe001bb29e58  fp: 0xfffffe304b307ec0
          lr: 0xfffffe001bb29634  fp: 0xfffffe304b307f00
          lr: 0xfffffe001a08d5d0  fp: 0xfffffe304b307f20
          lr: 0xfffffe0019e12808  fp: 0xfffffe304b307fb0
          lr: 0xfffffe00193fd694  fp: 0xfffffe304b307fc0
          lr: 0xfffffe0018e1c1bc  fp: 0xfffffe304b307fe0
          lr: 0xfffffe0018cbf85c  fp: 0xfffffe304b307ff0
          lr: 0xfffffe0018db95e0  fp: 0xfffffe302212b760
          lr: 0xfffffe0018db95e0  fp: 0xfffffe302212b870
          lr: 0xfffffe0018da139c  fp: 0xfffffe302212ba10
          lr: 0xfffffe0018d91984  fp: 0xfffffe302212bd10
          lr: 0xfffffe0018e1a1d0  fp: 0xfffffe302212be40
          lr: 0xfffffe0018e19804  fp: 0xfffffe302212bef0
          lr: 0xfffffe0018cbf7e8  fp: 0xfffffe302212bf00
      Kernel Extensions in backtrace:
         com.apple.driver.AppleInterruptController(1.0d1)[B5629E50-71D8-3336-9FEB-315F74FD0954]@0xfffffe0019e10000->0xfffffe0019e13fff
            dependency: com.apple.driver.AppleARMPlatform(1.0.2)[53D29C42-BCB1-384D-BE79-DAB9ED503C6C]@0xfffffe00195f8000->0xfffffe0019643fff
         com.apple.driver.watchdog(1.0)[03F48A25-3538-340A-B474-4374C1BB349B]@0xfffffe001bb28000->0xfffffe001bb2bfff
         com.apple.driver.AppleS5L8960XWatchDogTimer(1.0)[5390F79D-79C7-36D9-91A6-71E7A28C9661]@0xfffffe001a08c000->0xfffffe001a08ffff
            dependency: com.apple.driver.AppleARMPlatform(1.0.2)[53D29C42-BCB1-384D-BE79-DAB9ED503C6C]@0xfffffe00195f8000->0xfffffe0019643fff
            dependency: com.apple.driver.watchdog(1)[03F48A25-3538-340A-B474-4374C1BB349B]@0xfffffe001bb28000->0xfffffe001bb2bfff
            dependency: com.apple.iokit.IOReportFamily(47)[9ADDDDA4-EEC2-3CD1-9B10-6755522844FB]@0xfffffe001b108000->0xfffffe001b10bfff
lnicola commented 3 years ago

Does it also crash when you run cargo build from the terminal?

Anyway, that's a MacOS kernel bug or hardware issue, I don't think there's much Rust can do here. You might be able to use rust-analyzer with "cargo check" and proc macros disabled, but what good does that to if you can't build your project?

ragnarok87 commented 3 years ago

@lnicola Yes,when i run cargo build in terminal, Vs code start getting stuck and suddenly M1 cpu will reach to 80 to 92% then keep restarting.

lnicola commented 3 years ago

What if you close Code and run cargo clean, then build?

I don't know why it should affect Code. Do you have build scripts or a weird project structure that might cause RLS to start looking at thousands of files?

ragnarok87 commented 3 years ago

Actually i did as you mentioned above and even i tried uninstalling rust, vs code and all extension and reinstalling everything, does not change still the same.

lnicola commented 3 years ago

Really, Rust shouldn't be able to crash your OS like that. It's either a kernel bug or a hardware problem.

ragnarok87 commented 3 years ago

@lnicola thank you for replay. I ll check maybe hardware or OS big Sur problem.