Skip to content

Conversation

Vecvec
Copy link
Contributor

@Vecvec Vecvec commented Sep 28, 2025

Connections
Fixes #8267

Description
Currently a single event is used across every single thread that waits. However, these events only wake up a single thread per signal, and that thread is never defined. This can cause a thread never to be signaled, causing a 60 second hang in fence waiting. I have also made a separate event per wait_for_present_queue_idle call, however I have no definitive case showing if it could fail so if requested, I can revert it.

Testing
Ran a modified version (due to changes between latest release and now) of the test case in #8267. Because this bug has to do with thread timings, and the specific way windows wakes up threads, I currently have decided to include no test case (but if desired I could put in a test).

Squash or Rebase?
Squash.

Checklist

  • Run cargo fmt.
  • Run cargo clippy --tests.
  • Run cargo xtask test to run tests.
  • If this contains user-facing changes, add a CHANGELOG.md entry.

@cwfitzgerald cwfitzgerald merged commit f1c876c into gfx-rs:trunk Sep 29, 2025
41 checks passed
@cwfitzgerald cwfitzgerald deleted the event-per-wait branch September 29, 2025 15:38
sharmajai pushed a commit to sharmajai/wgpu that referenced this pull request Oct 12, 2025
* create an event per fence wait

* Use seperate event for each `wait_for_present_queue_idle` call.

* changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[DX12] Multiple threads submitting and then waiting can cause 60sec hang

2 participants