WindowServer Becomes Stuck with High Memory and Many Windows Open

Originator:alexceleste
Number:rdar://35015486 Date Originated:16 October 2017
Status:Duplicate/34714347 Resolved:No
Product:macOS Product Version:10.13/17A405
Classification:Graphics & Imaging Reproducible:Always
 
Summary:
When a large number of windows are open WindowServer can get stuck, and in so doing cause you to need to force-restart the Mac to get it usable again. When the Mac gets in this state the cursor moves around, but nothing else is responsive to the usual user interaction, at least as far as you can tell by looking at the display(s). To more safely resolve this you can first SSH to the Mac and use the shutdown command to let the Mac shut down properly. But still even this is not evident on the display, which will still show what was on screen when it froze, though now the mouse will be gone. To complete the shut down you need to hold the power button until the screen goes black. From there you can boot up the Mac like normal. The attached sysdiagnose is from after the screen froze but before I issued the shutdown command. When examining this sysdiagnose you will notice that top lists WindowServer as stuck.

Steps to Reproduce:
Get many windows on screen, if across a few different Spaces, usually after a day or more of uptime. I’ve almost always had this happen when multiple Safari windows are open, and sometimes just after going to close one of them. Having Chrome open as well, and then closing it, has been another case where this has occurred. The point is, there is no clear set of steps to reproduce, just that you need to get enough going that WindowServer gets stuck, which I think is also occurring after excessive memory usage.

Expected Results:
The GUI of macOS to not freeze.

Actual Results:
The GUI of macOS freezes.

Version/Build:
10.13/17A405

Configuration:
iMac14,3, Intel Core i7 3.1 GHz, 16 GB RAM, NVIDIA GeForce GT 750M, 1 GB VRAM

Comments

It is worth noting that while "sudo killall -HUP WindowServer” will kill WindowServer and then allow me to log back in under normal circumstances, during these freezes I can issue that command and nothing appears to happen, that is, the screen remains frozen rather than placing me back at the login screen (as far as I can tell by looking at what is on the display of my iMac).

By alexceleste at Oct. 17, 2017, 6:28 p.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!