VirtualBox causing deep recursive "add_events_to_tap" calls in macOS's "WindowServer"/"SkyLight"?
Posted: 21. Jul 2018, 00:56
I suspect that VirtualBox might be causing some unexpected behavior in the macOS "WindowServer" ("SkyLight"?) process.
I've noticed this most recently with macOS 10.13.5, and VirtualBox 5.2.16 r123759 (Qt5.6.3).
VirtualBox is being used like this:
- There are typically two or three VirtualBox VMs running, started using the VirtualBox GUI front end.
- These VMs are running various Linux distros.
- They continually perform automated testing of some GUI software (their screen contents are frequently changing).
- These Linux VMs will be left running for several days at a time.
This is just based on casual observation at this point, but after the VMs have been running for about a day or more, the macOS WindowServer process appears to exhibit higher-than-expected CPU usage.
The WindowServer process CPU usage, as shown by macOS "Activity Monitor", seems to be consistently under 10% when VirtualBox isn't running. But after the VMs have been running for some time, WindowServer process CPU usage above 20% seems more common.
Out of curiosity, I used "Activity Monitor" to sample the WindowServer process. (Select the "WindowServer" process in the "Activity Monitor" process list, click on the gear-icon dropdown in the toolbar, and click "Sample Process").
I noticed that there were sections of the displayed call graph where "add_events_to_tap (in SkyLight)" appears to be being called recursively many times.
I've attached an excerpt (20180720-excerpt-virtualbox-running.txt.zip) of the call graph sampling output while the VMs are running. It shows over 1400 calls to "add_events_to_tap" for that particular sampling.
Although I don't see a direct link to VirtualBox in the sampling output, I've noticed that after saving/stopping the running VMs and then quitting VirtualBox, and then re-sampling the WindowServer process repeatedly, the sections showing the recursive "add_events_to_tap" are gone.
I've attached another excerpt (20180720-excerpt-virtualbox-just-exited.txt.zip) of the call graph sampling output, taken minutes after the earlier one, just after stopping the VMs and quitting VirtualBox. It doesn't appear to show the deep "add_events_to_tap" behavior any longer.
Unfortunately, I can't do too much debugging on this particular macOS system, and have limited access to other macOS systems.
Can anyone else with long-running VMs on macOS reproduce this possible issue?
Thanks!
I've noticed this most recently with macOS 10.13.5, and VirtualBox 5.2.16 r123759 (Qt5.6.3).
VirtualBox is being used like this:
- There are typically two or three VirtualBox VMs running, started using the VirtualBox GUI front end.
- These VMs are running various Linux distros.
- They continually perform automated testing of some GUI software (their screen contents are frequently changing).
- These Linux VMs will be left running for several days at a time.
This is just based on casual observation at this point, but after the VMs have been running for about a day or more, the macOS WindowServer process appears to exhibit higher-than-expected CPU usage.
The WindowServer process CPU usage, as shown by macOS "Activity Monitor", seems to be consistently under 10% when VirtualBox isn't running. But after the VMs have been running for some time, WindowServer process CPU usage above 20% seems more common.
Out of curiosity, I used "Activity Monitor" to sample the WindowServer process. (Select the "WindowServer" process in the "Activity Monitor" process list, click on the gear-icon dropdown in the toolbar, and click "Sample Process").
I noticed that there were sections of the displayed call graph where "add_events_to_tap (in SkyLight)" appears to be being called recursively many times.
I've attached an excerpt (20180720-excerpt-virtualbox-running.txt.zip) of the call graph sampling output while the VMs are running. It shows over 1400 calls to "add_events_to_tap" for that particular sampling.
Although I don't see a direct link to VirtualBox in the sampling output, I've noticed that after saving/stopping the running VMs and then quitting VirtualBox, and then re-sampling the WindowServer process repeatedly, the sections showing the recursive "add_events_to_tap" are gone.
I've attached another excerpt (20180720-excerpt-virtualbox-just-exited.txt.zip) of the call graph sampling output, taken minutes after the earlier one, just after stopping the VMs and quitting VirtualBox. It doesn't appear to show the deep "add_events_to_tap" behavior any longer.
Unfortunately, I can't do too much debugging on this particular macOS system, and have limited access to other macOS systems.
Can anyone else with long-running VMs on macOS reproduce this possible issue?
Thanks!