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

After a stream is created ev/sleep takes 100% CPU. #1321

Closed
bitcompost opened this issue Oct 28, 2023 · 4 comments
Closed

After a stream is created ev/sleep takes 100% CPU. #1321

bitcompost opened this issue Oct 28, 2023 · 4 comments
Labels
bug This is not expected behavior, and needs fixing

Comments

@bitcompost
Copy link

Steps to reproduce:

Janet 1.32.1-meson linux/aarch64/gcc - '(doc)' for help
repl:1:> (net/connect "1.1.1.1" "80")
<core/stream 0xAAAACB3E0010>
repl:2:> (ev/sleep 42)

@bakpakin
Copy link
Member

Cannot reproduce on linux/x64. Is this for some reason only arm? Also would be interested in your linux kernel version.

@bakpakin bakpakin added the bug This is not expected behavior, and needs fixing label Oct 28, 2023
@bitcompost
Copy link
Author

I can reproduce it on x64. Kernel 6.2.0-35-generic #35~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Oct 6 10:23:26 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

@bitcompost
Copy link
Author

Did some more testing. It only hapens with the meson build.

@bakpakin
Copy link
Member

Ok, looks like the meson build by default is using the poll event loop instead of the epoll event loop, so the bug is with the poll event loop.

With meson, you can fix this for now using

meson setup build -Depoll=true

when configuring the project (and get more efficient as well).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This is not expected behavior, and needs fixing
Projects
None yet
Development

No branches or pull requests

2 participants