-
Notifications
You must be signed in to change notification settings - Fork 84
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
[kqueue] hits unreachable code with high completion loads #122
Comments
As an extra note. Did a quick test on a linux machine. Everything seems to work without hiccup on linux. |
Thanks for the report! I will check this out soon. |
One other added note, I realized that this is probably the same as: #105 |
Ok, I'm not sure the best solution yet, but I think I found the core issue. If Lines 540 to 541 in b8d1d93
This break can happen when there are still changes left from here: Lines 523 to 527 in b8d1d93
If there are any changes left, they are never passed to kevent to clear things up. So those extra changes either need to be delayed to the next call to |
Note, a minimal changes that works around the bug (but obviously leads to waiting) is: if (wait == 0 and changes == 0) break; |
Can you try #115 ? |
No, #115 is not enough to fix my issue above. I have #115 along with a few other kqueue changes here and still haven't fully fixed the issues I am hitting with kqueue and high concurrency: main...bhansconnect:libxev:main#diff-caa3f8691afca2b16eaf30614ff2616aa0d6cb38bbe2750f39e7669e4902ff81 |
I totally might be using the library incorrectly. I am just starting out working with it and trying to set it up to function as an http server. Right now I just have the basics hardcoded. If I benchmark it with
wrk
and a high number of connections (512) I end up seeing:error(libxev_kqueue): invalid state in submission queue state=backend.kqueue.Completion.State.active
and an eventual crash with the following stacktrace:I don't think this is the same as #111, but I might be wrong.
Any general advise would be greatly appreciated (even if the advice is that libxev is not ready and I should really switch to something else). I'm not trying to build anything production ready, just working on a prototype of a coroutine based webserver to use with roc (which is a new programming language).
The full repo at the current state is here: https://github.com/bhansconnect/roc-coro-webserver/tree/9b07612a95d1b937b0b8e7ec90a14c1a310f5b2b/platform
Here is a slightly reduced version of the main file that is leading to the errors:
Thanks for creating libxev and any help. Initial perf tests of this libxev are looking really good.
The text was updated successfully, but these errors were encountered: