MacOS Intel memory leak #14054
Labels
A-Rendering
Drawing game state to the screen
A-Windowing
Platform-agnostic interface layer to run your app in
C-Bug
An unexpected or incorrect behavior
O-MacOS
Specific to the MacOS (Apple) desktop operating system
S-Needs-Investigation
This issue requires detective work to figure out what's going wrong
Bevy version
0.14.0-rc.3
Relevant system information
SystemInfo { os: "MacOS 13.6.7 ", kernel: "22.6.0", cpu: "Intel(R) Core(TM) i5-8500 CPU @ 3.00GHz", core_count: "6", memory: "40.0 GiB" }
AdapterInfo { name: "AMD Radeon Pro 570X", vendor: 0, device: 0, device_type: DiscreteGpu, driver: "", driver_info: "", backend: Metal }
What you did
git clone https://github.com/bevyengine/bevy.git
cd bevy
git checkout v0.14.0-rc.3
cargo run --example 3d_scene
What went wrong
The example runs as expected. Use the following command:
ps au | awk 'NR>1 {$5=int($5/1024)"M";}{ print;}' | grep 3d_scene | grep -v grep
The vsz field grows at a rate of up to 10MB/second. I would expect the memory allocation to not change very much since Bevy is just rendering a simple scene.
Additional information
This issue was first noticed using the server example from https://github.com/pcwalton/bevy/tree/brp which is the equivalent to running the 3d_scene example plus the new RemotePlugin server. The issue also occurred in an example that loaded the same scene but did not run the server. 3d_scene was selected for the reproduction because it is closest to the actual examples that created a noticeable issue. The indication there was a problem came from a macOS popup that indicated that both client and server examples had grown to 160GB each and the OS was out of RAM completely.
This just appeared in the terminal that spawned the 3d_scene example:
2024-06-27 13:15:36.779 3d_scene[79794:2365453] IMKClient Stall detected, please Report your user scenario attaching a spindump (or sysdiagnose) that captures the problem - (imkxpc_bundleIdentifierWithReply:) block performed very slowly (2.25 secs).
The text was updated successfully, but these errors were encountered: