-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Don't panic on GPU hang #14974
Don't panic on GPU hang #14974
Conversation
Fixes: zed-industries#12766 Fixes: zed-industries#14022 Release Notes: - linux: Fix panic when GPU is temporarily unavailable.
This actually doesn't solve the issue. Now, instead of crashing, Zed just freezes |
@@ -18,7 +18,7 @@ use blade_graphics as gpu; | |||
use blade_util::{BufferBelt, BufferBeltDescriptor}; | |||
use std::{mem, sync::Arc}; | |||
|
|||
const MAX_FRAME_TIME_MS: u32 = 1000; | |||
const MAX_FRAME_TIME_MS: u32 = 10000; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Genius 🫤
@@ -412,7 +412,8 @@ impl BladeRenderer { | |||
fn wait_for_gpu(&mut self) { | |||
if let Some(last_sp) = self.last_sync_point.take() { | |||
if !self.gpu.wait_for(&last_sp, MAX_FRAME_TIME_MS) { | |||
panic!("GPU hung"); | |||
log::error!("GPU hung"); | |||
while !self.gpu.wait_for(&last_sp, MAX_FRAME_TIME_MS) {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not even a delay before rechecking?
@Vanuan Happy to work with you on solutions, but comments on old PR's probably won't drive change. |
Zed UI freezes after suspend/resume. The only log I see is "GPU hung". I've tried razing issues in blade and Zed, tried proposing a path to the solution but it leads nowhere. I'd be happy to send a crash log, but Zed doesn't crash thanks to your fix. It seems to happy to resume operations just not rendering anything. The only remedy I have is kill zed-editor and restart. If Zed provided at least that, I'd be happy. |
Fixes: #12766
Fixes: #14022
Release Notes: