Regression Bug: Xcode 10.x has a memory leak with console messages
Originator: | sam.krishna | ||
Number: | rdar://46675860 | Date Originated: | 2018-12-12 |
Status: | OPEN | Resolved: | |
Product: | Xcode | Product Version: | 10.1 |
Classification: | Memory/Crash | Reproducible: | ALWAYS |
Summary: Xcode 10.x fails to sweep console messages over an extended period of time, thereby allowing a memory leak that allows Xcode's memory footprint to balloon until it either (a) crashes or (b) causes a system failure. This occurs with any application that has a high frequency of logging messages over an extended period of time. This bug is a regression because it is not present in Xcode 9.4.x and before. Steps to Reproduce: 1. Download and decompress ConsoleMemoryLeak.zip 2. Open project in Xcode 10.x (tested build is 10B61) 3. Open Activity Monitor and switch to "Memory" tab 4. In Activity Monitor, filter for "Xcode" 5. Build and run ConsoleMemoryLeak.app Expected Results: I expect Xcode to "memory sweep" the console messages around the 1-2 GB memory range for its own footprint. I have included a screen grab of Activity Monitory running Xcode 9.4.1 (9F2000) as an "expected outcome" image result. Actual Results: Instead, I watch Xcode's memory footprint grow in an asymptotic linear fashion to many gigabytes of memory. It appears to not sweep its console message memory cache, therefore causing it to grow in an unconstrained fashion. If left alone, should cause either an app or system crash of some kind within 15-30 minutes. I have included a screengrab and sysdiagnose dump of Activity Monitor running 10B61 as an "actual outcome" image result. Version/Build: Xcode 10B61 Configuration: macOS Mojave 10.14.2 Sample Project link: https://goo.gl/cCQu4j
Comments
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!