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

Ring loosing entries? #114

Open
tinywombat765 opened this issue Oct 11, 2021 · 1 comment
Open

Ring loosing entries? #114

tinywombat765 opened this issue Oct 11, 2021 · 1 comment

Comments

@tinywombat765
Copy link
Contributor

I'm building a high level abstraction around io_uring. I've been testing it and when I submit entries from multiple threads it seems to occasionally loose entries. From inspecting the SQ they seem to be taken by the kernel with no issue. I'm not overflowing the SQ or CQ. The entry just never shows up in the CQ. I have the SQ in a mutex so multiple threads overwriting the entries. The entries lost are always write, idk if that's significant.

Here's the test I'm running that triggers the issue:
https://git.sr.ht/~zethra/smol-uring/tree/uring-refactor/item/src/lib.rs#L89

And here's my code that actually does the submission:
https://git.sr.ht/~zethra/smol-uring/tree/uring-refactor/item/src/lib.rs#L89

If you have any idea why this is happening, I'd appreciate input.

@tinywombat765
Copy link
Contributor Author

tinywombat765 commented Oct 11, 2021

Well as it goes, 2 seconds after I post this issue I see the obvious thing I'm doing wrong. All of threads were opening an writing to the same file. Now it is weird that when they are all trying to write to the same file entries seem to get lost.

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

No branches or pull requests

1 participant