-
Notifications
You must be signed in to change notification settings - Fork 33
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
Hangs on async benchmarks #11
Comments
thank you for your report, whats your hardware specs? |
I only checked on my laptop so far, a i5-7200U (kaby lake, 2/4 cores). |
which rust version? is it hang on any specific test? |
This is with rust 1.64. |
ok, thanks, currently i can't reproduce it on my PC and laptop. |
Well, this is weird... Do you have intel hardware? I tried it on an EC2 instance and it had the exact same problem, so the issue is probably widespread. Investigating further I noticed that tests that reserve enough capacity for all messages, such as: run_async!("bounded_mpsc(empty)", mpsc::<BenchEmpty>(Some(MESSAGES)));` actually run. In general, increasing the capacity seems to decrease the probability of hanging. Also, the SPSC test sometimes works even with small capacity. EDIT: I see that the |
Yes, there is UB somewhere in code and I'm investigating it, I think there is a problem with our stack borrow rules, I should fix that first, I'm gonna keep you updated to run your tests again then. |
Using stable only. |
Could you please rerun your tests, with the latest benchmark repo and the latest Kanal repo? |
I could only test on my laptop for now, but it seems to work fine with commit #774a05f :-) Likewise on tachyobench, so I plan to merge support for |
Thank you! |
Sorry I write here, I could not find a way to PM you so I hope you won't mind I ask here. I would like to update my own benchmarks for an MPSC channel I wrote, but there is no official release of Kanal that I can benchmark since the |
Thank you for your professionalism, Kanal async is not ready yet, I need to redesign some parts of it, if you like to benchmark the sync version, the master branch is ok. but if you like to run benchmarks for async, I think it will be ready in pre3. |
No problem, I understand! |
kanal
hangs for me 99% of the time in all async benchmarks, both with the official benchmarks and with Tachyobench.I was initially suspecting a problem with async notifications, but since it uses 100% CPU on all threads when hanging, I start to think it might actually be due to the use of spin locks, though I don't know for sure.
The text was updated successfully, but these errors were encountered: