VirtualBox

Opened 5 years ago

Last modified 5 years ago

#19042 new defect

DispatchQueue thread taking up close to 100% CPU

Reported by: wullerdewust Owned by:
Component: GUI Version: VirtualBox 6.0.14
Keywords: Cc:
Guest type: Windows Host type: Mac OS X

Description

With Windows 10 guest in fullscreen mode, I was typing in a guest text field when the guest seemed to freeze. Checking on the Mac OSX host side, VirtualBox was using almost 200% on 2-cpu host (guest is only using 1 CPU). Using the Mac spindump command, I got a dump that showed the DispatchQueue taking up almost all the time, apparently doing Qt updates.

I tried to saved the state of the guest, but VirtualBox crashed. After rebooting the guest, I was able to reproduce the same freeze.

Attachments (3)

VirtualBoxVM_77890.spindump.txt (140.3 KB ) - added by wullerdewust 5 years ago.
vm-info.txt (5.4 KB ) - added by wullerdewust 5 years ago.
guest-screenshot.png (42.6 KB ) - added by wullerdewust 5 years ago.
Guest screenshot at the time of the freeze

Download all attachments as: .zip

Change History (11)

by wullerdewust, 5 years ago

by wullerdewust, 5 years ago

Attachment: vm-info.txt added

by wullerdewust, 5 years ago

Attachment: guest-screenshot.png added

Guest screenshot at the time of the freeze

comment:1 by wullerdewust, 5 years ago

I was able to get a screenshot using VBoxManage controlvm VM screenshotpng from the command-line. Canceling the Windows Security windows returns the GUI to normal. It seems to be 100% reproducible.

comment:2 by wullerdewust, 5 years ago

According to "VBoxManage metrics collect" and EMT thread in spindump, the guest seems to be using 80% of guest CPU and half of host CPU for some reason.

comment:3 by gombara, 5 years ago

Just curious if this is reproducible while entering text at "any" text field on the Guest or just a particular one.

comment:4 by wullerdewust, 5 years ago

Just curious if this is reproducible while entering text at "any" text field on the Guest or just a particular one.

So far, just the PIN text field.

But after I paused the Windows search indexer, the guest CPU % went down and the freeze problem went away. So there seems to be a problem with the GUI freezing when the guest CPU is high on MacOS. Maybe it's a thread scheduling problem.

comment:5 by gombara, 5 years ago

indexer? well if you are using an indexer on a Window machine you are asking for hangs. good luck with that.

comment:6 by wullerdewust, 5 years ago

Yes, it's the built-in Windows search indexer. If I set the guest CPU execution cap to 50%, the freezing is much less. Tomorrow I'll try without the indexer but with high guest CPU from another source, to rule out file I/O.

comment:7 by gombara, 5 years ago

The DispatchQueue thingy you mentioned is a part of graphics driver. You can try disabling 3D. But just like you found out, it is not the source of the problem.

comment:8 by wullerdewust, 5 years ago

The problem is definitely worse with 3D enabled + Guest Additions experimental 3D support. Even with 3D disabled, there is still a problem, probably because 6.0.14 Guest Additions can't be installed without the 3D support (the checkbox is greyed out).

On the guest side, I can see that GPU usage goes way up when that Windows security window is open, even though there is very little happening on the screen. I suspect that Windows is using the GPU for computation and not graphics. I also suspect that the VirtualBox 3D support is partly asynchronous and that the guest GPU usage effects other host threads. If the host can't keep up with GPU requests, maybe there could be an execution % cap on the GPU like there is on the CPU, or even better, dynamic throttling.

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use