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

[Bug]: Whisky app takes 100% CPU the entire time it's running #1010

Open
1 task done
jfortmann opened this issue Jun 6, 2024 · 5 comments · May be fixed by #1305
Open
1 task done

[Bug]: Whisky app takes 100% CPU the entire time it's running #1010

jfortmann opened this issue Jun 6, 2024 · 5 comments · May be fixed by #1305

Comments

@jfortmann
Copy link

Description

On my system the app is taking 100% CPU the entire time it's running. It seems that it's busy looping reading a pipe with logs. See thread Thread_272264 in the attached sample. Quitting Whisky severs the pipe connection and makes it use 0% CPU.
Whisky_2024-06-06_091300_CLMc.sample.txt

Steps to reproduce

Launch Steam from the app.

Expected behaviour

Expected not to use 100% CPU

Logs

Not applicable

What version of Whisky are you using?

2.3.2

What version of macOS are you using?

Sonoma (macOS 14)

Issue Language

  • Yes my issue is written in English
@jfortmann jfortmann added the bug label Jun 6, 2024
@plyght
Copy link

plyght commented Jun 6, 2024

Try opening Whisky and:
File > Kill All Bottles
or press Shift + Command + K

@jfortmann
Copy link
Author

That stops the CPU usage (presumably closes the other end of the pipe) but of course also closes all running apps.

@IsaacMarovitz
Copy link
Member

That stops the CPU usage (presumably closes the other end of the pipe) but of course also closes all running apps.

Whisky reads from stdout and stderr of the child Wine processes for writing to logs. It's probable that's what's causing the excess CPU usage you're seeing here. I doubt it's actually using CPU and probably just doing the equivalent of spin waiting on a thread.

NSPipe is always kind of jank and seems to break whenever I touch it so I try to avoid messing with logging it I can.

@gbaraldi
Copy link

gbaraldi commented Jun 19, 2024

According to the energy usage meter it is using actual cpu cycles. More precisely it seems we loop in. AvailableData should block but I supposed it doesn't block on pipes because they are open? Because the profile just shows we are doing a bunch of fstat and readsyscalls. The other option of course is if wine is just pumping a bunch of data (which wouldn't surprise me)
x.ref https://developer.apple.com/forums/thread/690310 for a different implementation of this from an apple dev (this I just found while looking through stuff)

image

@KOT-OPET
Copy link

Can confirm this 100% load is real, judging solely by the laptop temperature. Whenever I open Steam through Whisky and leave the latter in the background, my mba gets hotter. I see the load in the activity monitor, too.

The workaround there is to close Whisky after Steam has loaded. Whisky doesn't kill Wine processes when quitted, so everything works flawlessly.

I have latest Sonoma and Whisky versions.

@IsaacMarovitz IsaacMarovitz removed the bug label Oct 1, 2024
@ethanaobrien ethanaobrien linked a pull request Feb 2, 2025 that will close this issue
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.

5 participants