Skip to content

[Impeller] Are Metal playgrounds leaking memory? #117339

@bdero

Description

@bdero

I noticed that Metal playgrounds start hanging for me after a couple of minutes and started looking around for clues.

The memory footprint of playgrounds increase linearly with the framerate, but the memory leak instrument fails to locate any leaked resources.

The video below shows the playground's memory footprint expanding at ~110 MBps at 60fps until the app hangs (no idea if the hanging is related or not). When capping the framerate to 30fps, the expansion rate is halfed.

Screen.Recording.2022-12-19.at.12.39.18.PM.mov

I sampled a few different Metal playgrounds and they all seem to exhibit the same behavior/per-frame "leak" rate, including simple playgrounds that don't involve the Entities renderer, like Play/RendererTest.ArrayUniforms/Metal.

Again, I'm not sure if this is an actual leak yet because I don't fully understand the information I'm looking at, and the permanent hang that occurs after a couple of minutes may or may not be at all related. My understanding is that NSObjects are refcounted these days and there shouldn't be any garbage accumulation going on over time.

Had some trouble getting LSAN to work right this morning, but will take another swing later.

FYI @chinmaygarde

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work liste: impellerImpeller rendering backend issues and features requestsengineflutter/engine related. See also e: labels.

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions