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

Don't panic on GPU hang #14974

Merged
merged 1 commit into from
Jul 22, 2024
Merged

Don't panic on GPU hang #14974

merged 1 commit into from
Jul 22, 2024

Conversation

ConradIrwin
Copy link
Member

Fixes: #12766
Fixes: #14022

Release Notes:

  • linux: Fix panic when GPU is temporarily unavailable.

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Jul 22, 2024
@ConradIrwin ConradIrwin merged commit a955968 into main Jul 22, 2024
9 checks passed
@ConradIrwin ConradIrwin deleted the gpu-hung branch July 22, 2024 18:21
CharlesChen0823 pushed a commit to CharlesChen0823/zed that referenced this pull request Jul 29, 2024
Fixes: zed-industries#12766
Fixes: zed-industries#14022

Release Notes:

- linux: Fix panic when GPU is temporarily unavailable.
@Vanuan
Copy link

Vanuan commented Jan 21, 2025

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;
Copy link

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) {}
Copy link

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?

@ConradIrwin
Copy link
Member Author

@Vanuan
What are the problems you are experiencing?

Happy to work with you on solutions, but comments on old PR's probably won't drive change.

@Vanuan
Copy link

Vanuan commented Jan 21, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed The user has signed the Contributor License Agreement
Projects
None yet
2 participants