WindowServer memory leak

Looks like this problem is coming back in High Sierra.


I have a late 2013 MacBook Pro Retina, freshly installed High Sierra after resetting SMC, PRAM, at most 6 apps open at the same time, after 16 hours, this WindowServer process is taking almost 1GB RAM! Notice how much has been compressed. Several days ago, I have been using the High Sierra GM for about a week without rebooting/logging out, and I noticed this WindowServer process took 8GB RAM!


User uploaded file

MacBook Pro with Retina display, OS X El Capitan (10.11)

Posted on Sep 27, 2017 8:50 AM

Reply
Question marked as Top-ranking reply

Posted on Oct 3, 2017 10:25 AM

Well, looks like the current consensus of the bug is that for retina display with Intel graphics card, if the resolution is set to the "scaled max", you will get the WindowServer memory leak. Other resolutions seem to be fine.


On my late 2013 rMBP 13'', setting the display to "scaled max (1680x1050)" will instantly create the memory leak. Other "scaled settings", currently at 1440x900, WindowServer stays around 100MB for 24 hours now.

53 replies
Question marked as Top-ranking reply

Oct 3, 2017 10:25 AM in response to Morgon-

Well, looks like the current consensus of the bug is that for retina display with Intel graphics card, if the resolution is set to the "scaled max", you will get the WindowServer memory leak. Other resolutions seem to be fine.


On my late 2013 rMBP 13'', setting the display to "scaled max (1680x1050)" will instantly create the memory leak. Other "scaled settings", currently at 1440x900, WindowServer stays around 100MB for 24 hours now.

Oct 2, 2017 11:58 AM in response to CongGao

This seems to work! I tested it for a bit and the default setting and the second highest setting for Scaled Resolution seems to not have a memory leak. Only when putting it to the highest "More Space" option on my 2013 13inch rMBP does windowserver memory leak. But switching to the default resolution doesn't "release" memory if you had it on "More Space" prior, it just doesn't leak more. I hope Apple fixes it soon.


Awesome work, CongGao!

Sep 27, 2017 9:44 AM in response to welsonsun

8GB seems over the top, but 1GB is perfectly ok.

In my limited testing, I see no indication of memory leak. The memory usage goes up and down as applications are launched and quit, and windows are created and destroyed.

If there is a memory leak, it is likely not in WindowServer itself, but in one or more applications - WindowServer, as the name indicates, *serves* other processes when they request the creation or deletion of windows.

If an application does not properly dispose of windows once they are closed, it may have a memory leak that causes what you experience.


I suggest you make a note of the applications that are running to try and figure out if this problem happens consistently with one application.

Oct 3, 2017 10:30 AM in response to welsonsun

Well, looks like the current consensus of the bug is that for retina display with Intel graphics card, if the resolution is set to the "scaled max", you will get the WindowServer memory leak. Other resolutions seem to be fine.

No, in my case it happens with the "middle" scaled option (doubled 1680x1050), so the 10.13.1 finding is definitely a good sign.

Sep 28, 2017 3:17 AM in response to welsonsun

welsonsun wrote:


There are tons of:


Sep 27 17:10:20 welsons-mbp com.apple.xpc.launchd[1] (com.apple.preference.displays.MirrorDisplays): Service only ran for 0 seconds. Pushing respawn out by 10 seconds.


In my system.log.


Something is crashing all the time?

So it seems.


Do you have an external display? Which one?

Do you have some third party program to handle extra resolutions of the display?


Do the crashes also occur if running with just the MBP display?

Sep 28, 2017 10:11 AM in response to welsonsun

Same issue here after updating. WindowServer process just keep on hogging memory with time without ever releasing it until it's forcefully restarted (logout or reboot).

I have no external monitor, and while I use a scaled resolution I can reproduce it with the regular one.


Here's an EtreCheck's report, in case it could be useful:


EtreCheck version: 3.4.5 (455)

Report generated 2017-09-28 18:53:11

Download EtreCheck from https://etrecheck.com

Runtime: 2:01

Performance: Excellent


Click the [Lookup] links for more information from Apple Support Communities.

Click the [Details] links for more information about that line.


Problem: No problem - just checking


Hardware Information: ⓘ

MacBook Pro (Retina, 15-inch, Mid 2015)

[Technical Specifications] - [User Guide] - [Warranty & Service]

MacBook Pro - model: MacBookPro11,5

1 2,5 GHz Intel Core i7 (i7-4870HQ) CPU: 4-core

16 GB RAM Not upgradeable

BANK 0/DIMM0

8 GB DDR3 1600 MHz ok

BANK 1/DIMM0

8 GB DDR3 1600 MHz ok

Handoff/Airdrop2: supported

Wireless: en0: 802.11 a/b/g/n/ac

Battery: Health = Normal - Cycle count = 446

iCloud Quota: 4.62 GB available


Video Information: ⓘ

AMD Radeon R9 M370X - VRAM: 2 GB

Intel Iris Pro - VRAM: 1536 MB

Color LCD 3360 x 2100


Disk Information: ⓘ

APPLE SSD SM0512G disk0: (500,28 GB) (Solid State - TRIM: Yes)

[Show SMART report]

EFI (disk0s1 - MS-DOS FAT32) <not mounted> [EFI]: 210 MB

(disk0s2) <not mounted> [APFS Container]: 500.07 GB


USB Information: ⓘ

USB30Bus

Apple Inc. Apple Internal Keyboard / Trackpad

Broadcom Corp. Bluetooth USB Host Controller


Thunderbolt Information: ⓘ

Apple Inc. thunderbolt_bus


Virtual disks: ⓘ

Macintosh HD (disk1s1 - APFS) / [Startup]: 500.07 GB (340.46 GB free)

Physical disk: disk0s2 500.07 GB (340.46 GB free)

(disk1s2) <not mounted> [Preboot]: 500.07 GB

Physical disk: disk0s2 500.07 GB

(disk1s3) <not mounted> [Recovery]: 500.07 GB

Physical disk: disk0s2 500.07 GB

(disk1s4) /private/var/vm [VM]: 500.07 GB

Physical disk: disk0s2 500.07 GB


System Software: ⓘ

macOS High Sierra 10.13 (17A365) - Time since boot: about 17 hours


Configuration files: ⓘ

/etc/hosts - Count: 15


Gatekeeper: ⓘ

Mac App Store and identified developers


System Launch Agents: ⓘ

[not loaded] 9 Apple tasks

[loaded] 167 Apple tasks

[running] 112 Apple tasks


System Launch Daemons: ⓘ

[not loaded] 37 Apple tasks

[loaded] 183 Apple tasks

[running] 109 Apple tasks


Launch Agents: ⓘ

[not loaded] com.adobe.AAM.Updater-1.0.plist (Adobe Systems, Inc. - installed 2016-12-25) [Lookup]

[running] com.bjango.istatmenus.agent.plist (Bjango Pty Ltd - installed 2017-09-27) [Lookup]

[running] com.bjango.istatmenus.status.plist (Bjango Pty Ltd - installed 2017-09-27) [Lookup]

[loaded] com.oracle.java.Java-Updater.plist (? 9c0d8d87 72ac4dde - installed 2017-08-03) [Lookup]

[loaded] org.macosforge.xquartz.startx.plist (Apple Inc. - XQuartz - installed 2016-10-26) [Lookup]


Launch Daemons: ⓘ

[loaded] com.adobe.ARMDC.Communicator.plist (Adobe Systems, Inc. - installed 2017-01-10) [Lookup]

[loaded] com.adobe.ARMDC.SMJobBlessHelper.plist (Adobe Systems, Inc. - installed 2017-01-10) [Lookup]

[running] com.adobe.adobeupdatedaemon.plist (Adobe Systems, Inc. - installed 2016-12-25) [Lookup]

[running] com.adobe.agsservice.plist (Adobe Systems, Inc. - installed 2017-05-29) [Lookup]

[loaded] com.adobe.fpsaud.plist (? 2afb3af7 4898e928 - installed 2017-08-29) [Lookup]

[not loaded] com.apple.installer.cleanupinstaller.plist (? 1963bf56 0 - installed 2017-09-25)

[loaded] com.barebones.authd.plist (Bare Bones Software, Inc. - installed 2016-04-03) [Lookup]

[running] com.bjango.istatmenus.daemon.plist (Bjango Pty Ltd - installed 2017-09-27) [Lookup]

[loaded] com.bjango.istatmenus.installerhelper.plist (Bjango Pty Ltd - installed 2017-09-27) [Lookup]

[loaded] com.microsoft.autoupdate.helper.plist (Microsoft Corporation - installed 2017-09-13) [Lookup]

[loaded] com.oracle.java.Helper-Tool.plist (Shell Script e3fefdd2 - installed 2017-07-22) [Lookup]

[running] com.tclementdev.timemachineeditor.scheduler.plist (Thomas CLEMENT - installed 2017-09-20) [Lookup]

[loaded] org.macosforge.xquartz.privileged_startx.plist (Apple Inc. - XQuartz - installed 2016-10-26) [Lookup]


User Launch Agents: ⓘ

[not loaded] com.adobe.AAM.Updater-1.0.plist (Adobe Systems, Inc. - installed 2016-12-25) [Lookup]

[loaded] com.dropbox.DropboxMacUpdate.agent.plist (Dropbox, Inc. - installed 2017-08-10) [Lookup]

[loaded] com.google.keystone.agent.plist (Google, Inc. - installed 2017-07-10) [Lookup]


User Login Items: ⓘ

ClipMenu Application

(/Applications/ClipMenu.app)

Backup ans Sync Application

(/Applications/Cloud/Backup and Sync.app)

Cinch Application

(/Applications/Cinch.app)

gfxCardStatus Application

(/Applications/gfxCardStatus.app)

Dropbox Application

(/Applications/Cloud/Dropbox.app)


Internet Plug-ins: ⓘ

AdobeAAMDetect: 3.0.0.0 (installed 2016-12-25) [Lookup]

FlashPlayer-10.6: 27.0.0.130 (installed 2017-09-12) [Lookup]

QuickTime Plugin: 7.7.3 (installed 2017-09-21)

AdobePDFViewerNPAPI: 15.010.20060 (installed 2016-02-26) [Lookup]

AdobePDFViewer: 15.010.20060 (installed 2016-02-26) [Lookup]

Flash Player: 27.0.0.130 (installed 2017-09-12) [Lookup]

VLC Plugin: 2.2.7 (installed 2017-08-14) [Lookup]

JavaAppletPlugin: Java 8 Update 144 build 01 (installed 2017-08-03) Check version


Safari Extensions: ⓘ

[enabled] uBlock Origin - Chris Aljoudi/Raymond Hill - https://www.github.com/el1t/uBlock-Safari (installed 2017-08-09)

[enabled] Search Alias - Damian Carrillo - http://damiancarrillo.com/blog/search-alias-a-safari-extension/ (installed 2016-12-21)

[enabled] Safarikai - James Chen - http://ashchan.github.io/safarikai/ (installed 2017-08-09)

[enabled] Tampermonkey - Jan Biniok - http://tampermonkey.net (installed 2017-08-09)


3rd Party Preference Panes: ⓘ

RCDefaultApp (installed 2009-09-20) [Lookup]

Flash Player (installed 2017-08-29) [Lookup]

FUSE (installed 2017-09-21) [Lookup]

Java (installed 2017-08-03) [Lookup]


Time Machine: ⓘ

Mobile backups: OFF

Auto backup: NO - Auto backup turned off

Volumes being backed up:

Macintosh HD: Disk size: 500.07 GB Disk used: 159.61 GB

Destinations:

Data [Network]

Total size: 3.00 TB

Total number of backups: 55

Oldest backup: 30/03/16, 03:54

Last backup: 27/09/17, 23:44

Size of backup disk: Excellent

Backup size 3.00 TB > (Disk size 500.07 GB X 3)

Top Processes by CPU: ⓘ

25% plugin-container

25% firefox

17% WindowServer

6% kernel_task

3% hidd


Top Processes by Memory: ⓘ

3.13 GB WindowServer

1.52 GB firefox

1.40 GB kernel_task

627 MB plugin-container

533 MB plugin-container


Top Processes by Network Use: ⓘ

Input Output Process name

836 KB 915 KB firefox

1 MB 43 KB Mail

1 MB 126 KB mDNSResponder

374 KB 507 KB Dropbox

245 KB 185 KB Transmission


Top Processes by Energy Use: ⓘ

19.34 firefox

16.10 plugin-container

6.92 WindowServer

2.58 plugin-container


Virtual Memory Information: ⓘ

2.38 GB Available RAM

482 MB Free RAM

13.62 GB Used RAM

1.91 GB Cached files

228 MB Swap Used


Software installs: ⓘ

TimeMachineEditor: (installed 2017-09-03)

FUSE for macOS: (installed 2017-09-03)

Microsoft OneNote: 15.38 (installed 2017-09-08)

Adobe Flash Player: (installed 2017-09-12)


Install information may not be complete.


Diagnostics Information: ⓘ

2017-09-27 22:37:12 WindowServer Crash [Open]

Cause: StartTime:2017-09-27 20:40:26

GPU:IG&AMD

MetalDevice for accelerator(0x3827): 0x7fde7fc3eb78 (MTLDevice: 0x7fde8189a600)

MetalDevice for accelerator(0x5307): 0x7fde7fd19f68 (MTLDevice: 0x7fde81888000)

IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/IGPU@2/AppleIntelFramebu ffer@0

abort() called

terminating with uncaught exception of type std::__1::system_error: mutex lock failed: Invalid argument

2017-09-27 20:40:36 corespotlightd Crash [Open]

Cause: [0x700002dd3000] Finalizing journal 0x7fdd40a00ed0 0x108dc5000 100000

Initializing

2017-09-26 12:37:10 installd High CPU use [Open] [Details]

2017-09-26 10:53:27 iStatMenusDaemon Crash [Open]

Cause: *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderArray initWithObjects:count:]: attempt to insert nil object from objects[0]'

abort() called

terminating with uncaught exception of type NSException

Oct 12, 2017 7:46 AM in response to welsonsun

Hopefully 10.13.1 will fix things as I'm having the same issue.


On my system (2012 MacBook Pro Retina 8Gb) it gets to the point where the mouse starts to glitch and the whole system freezes. Safari is one of the main culprits, though many other apps do it as well. For my case, I used an external monitor (4K Dell with the macbook cover down) as well as trying scaled and un-scaled resolutions without having an external monitor present.


Using the 4K monitor, the issue takes about 4-6 hours to reach a "critical" state, where the whole system freezes until windowserver is restarted. Using a "more space" scaled resolution, it takes roughy 12-18 hours and using the default resolution requires a daily or every-other-day restart. So it's clear that the issue worsens with resolution increase, but all tested resolutions do show the issue, at least in my case.


I've seen the issue from day 2 after installing High Sierra and tried safe-mode boots, SMC and PRAM resets and even re-installed the whole OS to make sure it wasn't an in-proper install or 3rd party software.

Sep 28, 2017 7:54 AM in response to Luis Sequeira1

Yeah, I was thinking about that too. So I disconnected from my Dell U2408, and there is no longer this spurious message. So that's definitely some bug when external monitors are connected.


Although I am not sure if this (crashing with external display) is directly related to the WindowServer memory issue. Normally I always work with external monitors connected, will keep an eye when there is a full day I don't have an external monitor connected.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

WindowServer memory leak

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.