Skip to content

The persist_worker could deadlock the parent on panic #1693

@rkuris

Description

@rkuris

Because there's a number of panic points in the code, the aborted signal also should be set by a drop guard ensuring that the flag is set even on unwind so that no threads deadlock due to a panic in the worker thread.

The semaphore is acquired before checking if the worker channel is broken, so the semaphore can cause a deadlock if the worker exits, even without panicking.

Originally posted by @demosdemon in #1685 (comment)

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions