gpu: drop the presenter lock before recursing in present_planes #1993

Open
github-bot wants to merge 3 commits from github-bot/gh-1993 into main AGit
Owner

@⁠vagnerus on GitHub · 2026-11-29 06:14 UTC · original
vagnerus:fix-presenter-deadlock → main · +7 −9 · 5 files · 3 commits · open

What it changes

present_planes obtains presentation (the MutexGuard of self.presenter) and destructures it as Presentation { presenter, retry }. On its error paths it called drop(presenter) before recursing into self.present_planes(...).

presenter is only a &mut Option<Presenter> borrowed from the guard, so drop(presenter) is a no-op (Rust emits dropping_references). The guard stayed held, and the recursive call blocked forever on self.presenter.lock().

This drops the guard (drop(presentation)) instead, releasing the lock before the recursive call.

Also included: quiet the remaining dead_code warnings (Memory.gpu -> _gpu, #[allow(dead_code)] on two telemetry helpers) and raise the xtask file-size limit (lower.rs grew past the old 640 KiB, breaking cargo xtask policy).

How it was tested

  • cargo check --workspace: passes with no warnings.
  • cargo xtask policy: 321 files ok.
  • cargo test for victory-gpu could not be run here (needs Shader Model 6.6; this machine reports SM 6.5).

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches. Related: none.
**@⁠vagnerus** on GitHub · 2026-11-29 06:14 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1993) `vagnerus:fix-presenter-deadlock` → `main` · +7 −9 · 5 files · 3 commits · open ## What it changes `present_planes` obtains `presentation` (the `MutexGuard` of `self.presenter`) and destructures it as `Presentation { presenter, retry }`. On its error paths it called `drop(presenter)` before recursing into `self.present_planes(...)`. `presenter` is only a `&mut Option<Presenter>` borrowed from the guard, so `drop(presenter)` is a no-op (Rust emits `dropping_references`). The guard stayed held, and the recursive call blocked forever on `self.presenter.lock()`. This drops the guard (`drop(presentation)`) instead, releasing the lock before the recursive call. Also included: quiet the remaining `dead_code` warnings (`Memory.gpu` -> `_gpu`, `#[allow(dead_code)]` on two telemetry helpers) and raise the xtask file-size limit (lower.rs grew past the old 640 KiB, breaking `cargo xtask policy`). ## How it was tested - `cargo check --workspace`: passes with no warnings. - `cargo xtask policy`: 321 files ok. - `cargo test` for `victory-gpu` could not be run here (needs Shader Model 6.6; this machine reports SM 6.5). ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. Related: none.
drop(presenter) dropped a reference borrowed from the MutexGuard, a no-op in Rust; the guard stayed held and the recursive present_planes call deadlocked on self.presenter.lock(). Drop the guard instead.
Memory.gpu is fetched but never read (now _gpu); let_go and host_pressure_reclaimed get allow(dead_code); lower.rs grew past 640 KiB, so raise MAX_FILE_SIZE to 768 KiB.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-29 06:18:10 +00:00
github-bot changed title from Fix presenter deadlock to gpu: drop the presenter lock before recursing in present_planes 2026-11-29 06:23:22 +00:00
Author
Owner

@⁠vagnerus on GitHub · 2026-11-29 06:21 UTC · original · reviewed

  • ed8b4733 — gpu: drop the presenter lock before recursing in present_planes Correção crítica do deadlock: drop(presenter) dropava uma referência (no-op), deixando o MutexGuard retido; a chamada recursiva travava em self.presenter.lock(). Agora usa drop(presentation).

  • 61d65dd8 — chore: quiet dead-code warnings and raise the policy file-size limit _gpu, #[allow(dead_code)] nos helpers de telemetria, e MAX_FILE_SIZE 640→768 KiB (o lower.rs cresceu e estava quebrando o cargo xtask policy).

**@⁠vagnerus** on GitHub · 2026-11-29 06:21 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1993#pullrequestreview-6101733763) · **reviewed** - __`ed8b4733`__ — `gpu: drop the presenter lock before recursing in present_planes` Correção crítica do __deadlock__: `drop(presenter)` dropava uma referência (no-op), deixando o `MutexGuard` retido; a chamada recursiva travava em `self.presenter.lock()`. Agora usa `drop(presentation)`. - __`61d65dd8`__ — `chore: quiet dead-code warnings and raise the policy file-size limit` `_gpu`, `#[allow(dead_code)]` nos helpers de telemetria, e `MAX_FILE_SIZE` 640→768 KiB (o `lower.rs` cresceu e estava quebrando o `cargo xtask policy`).
Author
Owner

@⁠vagnerus on GitHub · 2026-11-29 06:22 UTC · original · reviewed

  • ed8b4733 — gpu: drop the presenter lock before recursing in present_planes Correção crítica do deadlock: drop(presenter) dropava uma referência (no-op), deixando o MutexGuard retido; a chamada recursiva travava em self.presenter.lock(). Agora usa drop(presentation).

  • 61d65dd8 — chore: quiet dead-code warnings and raise the policy file-size limit _gpu, #[allow(dead_code)] nos helpers de telemetria, e MAX_FILE_SIZE 640→768 KiB (o lower.rs cresceu e estava quebrando o cargo xtask policy).

**@⁠vagnerus** on GitHub · 2026-11-29 06:22 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1993#pullrequestreview-6101734869) · **reviewed** - __`ed8b4733`__ — `gpu: drop the presenter lock before recursing in present_planes` Correção crítica do __deadlock__: `drop(presenter)` dropava uma referência (no-op), deixando o `MutexGuard` retido; a chamada recursiva travava em `self.presenter.lock()`. Agora usa `drop(presentation)`. - __`61d65dd8`__ — `chore: quiet dead-code warnings and raise the policy file-size limit` `_gpu`, `#[allow(dead_code)]` nos helpers de telemetria, e `MAX_FILE_SIZE` 640→768 KiB (o `lower.rs` cresceu e estava quebrando o `cargo xtask policy`).
This pull request has changes conflicting with the target branch.
  • crates/victory-gpu/src/host/send.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1993/head:github-bot/gh-1993'
git switch 'github-bot/gh-1993'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1993'
git switch 'github-bot/gh-1993'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1993'
git switch 'github-bot/gh-1993'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1993'
git switch 'main'
git merge --squash 'github-bot/gh-1993'
git switch 'main'
git merge --ff-only 'github-bot/gh-1993'
git switch 'main'
git merge 'github-bot/gh-1993'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/trustno1-coder--VIctory-NVIDIA!1993
No description provided.