Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory Leak on Boids Example on Intel Mac #6936

Open
Aultus-defora opened this issue Jan 17, 2025 · 7 comments
Open

Memory Leak on Boids Example on Intel Mac #6936

Aultus-defora opened this issue Jan 17, 2025 · 7 comments
Labels
api: metal Issues with Metal area: correctness We're behaving incorrectly help required We need community help to make this happen. type: bug Something isn't working

Comments

@Aultus-defora
Copy link

Aultus-defora commented Jan 17, 2025

Description
Starting from MacOS Ventura, my Fusion Drive MacOS machine using wgpu and apps using it accumulate memory over time.

Repro steps
Turn on a MacOS machine that uses Fusion Drive. With wgpu v23 branch cargo run --bin wgpu-examples boids --release

Expected vs observed behavior
I hoped bugfix in ddff69b would prevent this issue from still happening. It seems to be the same as #5394 was, except it got fixed for many other settups in that commit.

Extra materials
1 Minutes of running the boids example on release:

Image

after running it for roughly 5 minutes:

Image 10 minutes: Image

Platform
iMac with Fusion Drive 1T, MacOS Sequoia 15.2, 8 GB of memory
CPU: 3 GHz 6-core Intel Core i5
GPU: Radeon Pro 560X 4 GB

@cwfitzgerald cwfitzgerald added type: bug Something isn't working area: correctness We're behaving incorrectly api: metal Issues with Metal labels Jan 17, 2025
@cwfitzgerald
Copy link
Member

I'll give this a shot on my M1 to see if it's a generic issue probably next week

@jimblandy
Copy link
Member

For Firefox's sake, let's call this a P1, unless we can't reproduce, in which case we'll mark it P2.

@cwfitzgerald
Copy link
Member

cwfitzgerald commented Jan 21, 2025

Cannot reproduce on an M1. Boids does not function at all on MVK (and in fact freezes my machine when powering a window), but runs fine on metal, without any kind of leak, no matter what I tried. debug/release, minimizing, etc.

I'm not sure what exact models have fusion drives, but it seems to be an intel based model. Maybe this is different.

Dropping to P2

@cwfitzgerald cwfitzgerald added the help required We need community help to make this happen. label Jan 21, 2025
@cwfitzgerald
Copy link
Member

@Aultus-defora can you tell your machines cpu/gpu spec?

@Aultus-defora
Copy link
Author

Aultus-defora commented Jan 22, 2025

CPU: 3 GHz 6-core Intel Core i5
GPU: Radeon Pro 560X 4 GB

@Aultus-defora
Copy link
Author

For the record, Firefox does not have this problem on my machine. Using WASM build of bevy, which is where I found this bug to begin with, also does not inherit this memory leak.

@cwfitzgerald cwfitzgerald changed the title Memory leak on boids example iMac Fusion Drive Memory Leak on Boids Example on Intel Mac Jan 22, 2025
@cwfitzgerald
Copy link
Member

Alright, we can't reproduce it, so we'll need some help investigating this. If you can run the examples through apple's memory profiler within Instruments? It's hard to find a guide, but https://developer.apple.com/documentation/xcode/gathering-information-about-memory-use#Profile-your-app-using-the-Allocations-instrument may help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: metal Issues with Metal area: correctness We're behaving incorrectly help required We need community help to make this happen. type: bug Something isn't working
Projects
Status: Todo
Development

No branches or pull requests

3 participants