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

RTIO Workqueue - Race condition leads to dead-lock in high-demand applications #84384

Open
ubieda opened this issue Jan 22, 2025 · 1 comment · May be fixed by #84322
Open

RTIO Workqueue - Race condition leads to dead-lock in high-demand applications #84384

ubieda opened this issue Jan 22, 2025 · 1 comment · May be fixed by #84322
Assignees
Labels
area: RTIO bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug

Comments

@ubieda
Copy link
Member

ubieda commented Jan 22, 2025

Describe the bug

RTIO Workqueue has a race-condition between grabing work items from the pool and giving them back. This was pointed out by @FlorianWeber1018 where he'd run into a crash due to this service not working for submitting I2C transfer requests when stress-testing.

The underlying problem resides in P4WQ not having a way to notify once the item has been freed, as explained here (#84322 (comment)).

There is a fix submitted (#84322 ), in which a callback is used now to properly free the work item before putting it back in the pool.

Expected behavior

There is no race-condition in pool items ownership.

Impact

Apps using RTIO workqueue service are prone to running into this issue. This can result in a dead-lock or a crash assuming the item submitted is never processed.

@ubieda ubieda added area: RTIO bug The issue is a bug, or the PR is fixing a bug labels Jan 22, 2025
@ubieda ubieda self-assigned this Jan 22, 2025
@ubieda
Copy link
Member Author

ubieda commented Jan 22, 2025

Marking as low as it isn't a regression and its in-tree usage is experimental. Please override if you disagree

@ubieda ubieda added the priority: low Low impact/importance bug label Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: RTIO bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant