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

Intel MacOS memory leak due to wgpu bug #9035

Open
Aultus-defora opened this issue Jul 4, 2023 · 15 comments
Open

Intel MacOS memory leak due to wgpu bug #9035

Aultus-defora opened this issue Jul 4, 2023 · 15 comments
Labels
A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior O-MacOS Specific to the MacOS (Apple) desktop operating system S-Blocked This cannot move forward until something else changes

Comments

@Aultus-defora
Copy link

Aultus-defora commented Jul 4, 2023

Bevy version

0.10.0 or 0.10.1 or main by simply clonning the repo

[Optional] Relevant system information

MacOS Ventura 13.4.1 on Fusion Drive and Intel Mac

What you did

I run example of fox animation after clonning the repo, and also noticed same problem in a game I'm making, even in older versions using older bevy versions.

What went wrong

The Activity Moniter shows that memory usage growth over time, seemingly indefinitly. I am not even sure if it is a bevy bug or some dependency broke on MacOS specifically, as running earlier versions of bevy did not help to avoid the issue
P. S. after letting fox animation example run for ~30 minutes made consumed 5.1 GB of RAM
P. P. S. WASM build IS NOT affected.

@Aultus-defora Aultus-defora added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels Jul 4, 2023
@Aultus-defora Aultus-defora changed the title MacOS Ventura memory usage growth MacOS Ventura indefinite memory usage growth Jul 4, 2023
@mockersf
Copy link
Member

mockersf commented Jul 4, 2023

on main, on macos 13.3 with a apple m1 max, memory stays between 420 and 435MB over 10 minutes for me

@mockersf mockersf added O-MacOS Specific to the MacOS (Apple) desktop operating system and removed S-Needs-Triage This issue needs to be labelled labels Jul 4, 2023
@Aultus-defora
Copy link
Author

Well I once let my project run and it ate a 1.1G of RAM. I have Fusion Drive and Intel if it makes any difference

@Aultus-defora
Copy link
Author

Tried on macbook with Monterey 12.6.7 and 1.70 rustc abd 0.10 bevt and there is no memory leak. Seems fusion drive intel iMacs in particular are affected

@adals
Copy link

adals commented Jul 5, 2023

this is what i got if that help
my system is mac m1

Screenshot 2023-07-06 at 2 40 06 AM

@Aultus-defora
Copy link
Author

Do you also have Ventura 13.4.1 (22F82) OS version?

@adals
Copy link

adals commented Jul 6, 2023

Do you also have Ventura 13.4.1 (22F82) OS version?

yes same

@Aultus-defora
Copy link
Author

Updating to 13.4.1 (c) didn't help

@Aultus-defora
Copy link
Author

Apparently the camera bundle is causing this. If I wanted to help debug it, what should I do?

@Aultus-defora
Copy link
Author

Aultus-defora commented Sep 25, 2023

So #6417 fixed it for most plantforms but not macs (with some macOS versions?) it seems like
P. S. this issue started after MacOS update so might be entierly different

@Aultus-defora
Copy link
Author

Updating to Sonoma 14.0 did not fix the issue

@Aultus-defora
Copy link
Author

leaks does not actually find this issue. It does not think whatever is growing the memory is an actual leak
diff

@Aultus-defora
Copy link
Author

So while running boids example of wgpu, similar memory growth occurs. Turns out this is not actually a bevy bug after all

@james7132
Copy link
Member

So while running boids example of wgpu, similar memory growth occurs. Turns out this is not actually a bevy bug after all

Is there an associated issue filed on wgpu's end?

@Aultus-defora
Copy link
Author

Aultus-defora commented Mar 10, 2024

Is there an associated issue filed on wgpu's end?

I think there is an issue about 0.18-> 0.19 causing memory leaks; I am not sure if it is the same problem, considering even 0.14 of wgpu DOES have this problem with boids example. v0.13 does not.

@alice-i-cecile
Copy link
Member

alice-i-cecile commented Jun 27, 2024

Reproduced on 0.14.0-rc3, but still only on Intel Mac.

Marking as blocked, since this is fundamentally a wgpu bug.

@alice-i-cecile alice-i-cecile added A-Rendering Drawing game state to the screen S-Blocked This cannot move forward until something else changes labels Jun 27, 2024
@alice-i-cecile alice-i-cecile changed the title MacOS Ventura indefinite memory usage growth Intel MacOS memory leak due to wgpu bug Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior O-MacOS Specific to the MacOS (Apple) desktop operating system S-Blocked This cannot move forward until something else changes
Projects
None yet
Development

No branches or pull requests

5 participants