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

100% CPU usage on Linux after #261 #264

Closed
xfalcox opened this issue Dec 15, 2021 · 3 comments · Fixed by #265
Closed

100% CPU usage on Linux after #261 #264

xfalcox opened this issue Dec 15, 2021 · 3 comments · Fixed by #265

Comments

@xfalcox
Copy link

xfalcox commented Dec 15, 2021

Built my tauri app on many different commits of the tao next brach, and managed to pinpoint the 100% CPU coming from #261

strace shows

poll([{fd=3, events=POLLIN}, {fd=7, events=POLLIN}, {fd=11, events=POLLIN}, {fd=23, events=POLLIN}, {fd=26, events=POLLIN}], 5, 0) = 0 (Timeout)
poll([{fd=3, events=POLLIN}, {fd=7, events=POLLIN}, {fd=11, events=POLLIN}, {fd=23, events=POLLIN}, {fd=26, events=POLLIN}], 5, 0) = 0 (Timeout)
poll([{fd=3, events=POLLIN}, {fd=7, events=POLLIN}, {fd=11, events=POLLIN}, {fd=23, events=POLLIN}, {fd=26, events=POLLIN}], 5, 0) = 0 (Timeout)
poll([{fd=3, events=POLLIN}, {fd=7, events=POLLIN}, {fd=11, events=POLLIN}, {fd=23, events=POLLIN}, {fd=26, events=POLLIN}], 5, 0) = 0 (Timeout)
poll([{fd=3, events=POLLIN}, {fd=7, events=POLLIN}, {fd=11, events=POLLIN}, {fd=23, events=POLLIN}, {fd=26, events=POLLIN}], 5, 0) = 0 (Timeout)
poll([{fd=3, events=POLLIN}, {fd=7, events=POLLIN}, {fd=11, events=POLLIN}, {fd=23, events=POLLIN}, {fd=26, events=POLLIN}], 5, 0) = 0 (Timeout)
poll([{fd=3, events=POLLIN}, {fd=7, events=POLLIN}, {fd=11, events=POLLIN}, {fd=23, events=POLLIN}, {fd=26, events=POLLIN}], 5, 0) = 0 (Timeout)
@wusyong
Copy link
Member

wusyong commented Dec 15, 2021

Looks like it's caused by try_recv loop. I'll try to use glib's channel instead.

@wusyong wusyong mentioned this issue Dec 15, 2021
12 tasks
@wusyong
Copy link
Member

wusyong commented Dec 15, 2021

@xfalcox If you are close to upstream tao next branch, could test if this works.
I tested examples in tao, and those who use Wait control flow should calm down now.

@xfalcox
Copy link
Author

xfalcox commented Dec 15, 2021

Can confirm the #265 fixed it! Thanks @wusyong !

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