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

driver::op::submit_with() panic #145

Closed
ollie-etl opened this issue Oct 24, 2022 · 1 comment · Fixed by #146
Closed

driver::op::submit_with() panic #145

ollie-etl opened this issue Oct 24, 2022 · 1 comment · Fixed by #146

Comments

@ollie-etl
Copy link
Contributor

Pr #144 can trigger This panic.

It can be reliably triggered if:

  • The concurrency factor submitting operations is greater than the submission queue size.
  • .setup_sqpoll() is specified on the ring builder

I speculate this can occur under other conditions, but the above is an easy way to fill the submission queue without draining it (i.e, if the ring poll thread is not scheduled whilst simultaneously having loads of things adding entries)

ollie-etl pushed a commit to ollie-etl/tokio-uring that referenced this issue Oct 24, 2022
Noah-Kennedy pushed a commit that referenced this issue Oct 24, 2022
Fixes #145. A data race was observed in Pr #144, where with high concurrency in user-space, and single threaded sqpoll in the ring, we could trigger a panic when submitting an entry to the queue

The speculation is that the submission queue is full, but no ops have yet been executed and placed in completion queue by the ring. The submit call therefore submits the queue, but doesn't free any sqe's .

The fix, which is not very elegant, does busy-polling on full.

Co-authored-by: ollie-etl <Oliver Bunting@etlsystems.com>
@FrankReh
Copy link
Collaborator

FrankReh commented Oct 25, 2022

  • .setup_sqpoll() is specified on the ring builder

Oh, you are already running with sqpoll. Very interesting. I haven't tried that and have no idea what problems you may be running into there. Well I guess with the commit from yesterday it's working for you. I wonder if you have something trying to call tick periodically to try and keep up with the kernel's results or if tick is only being called when the thread is about to park itself?

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 a pull request may close this issue.

2 participants