Skip to content

[core] Deadlock between Device::temp_suspected and CommandBuffer::data #5647

@jimblandy

Description

@jimblandy

Two threads can deadlock as follows:

  • The first thread calls Global::command_encoder_drop, which locks CommandBuffer::data while calling Device::untrack, which then locks Device::temp_suspected.
  • The second thread calls Queue::submit, which locks Device::temp_suspected and then CommandBuffer::data.

The lock around temp_suspected should never need to be held for a long time. This is just a simple allocation reuse.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions