Search Issue Tracker

Fixed

Fixed in 2021.3.14f1, 2023.1.0a14

Votes

0

Found in

2021.3.7f1

2023.1.0a4

Issue ID

UUM-11011

Regression

No

[Linux] Memory leak in Play Mode with Profiler window open

--

-

Reproduction Steps:
# Create a new Unity Project
# Add Profiler Tab (Window > Analysis > Profiler)
# Enter Play Mode
# Switch to Profiler Window
# Open a System Monitor program and check memory usage

Expected result: Memory usage does not increase

Actual result: Memory usage increases and the Editor crashes after a few minutes

Notes:
* Reproducible about 50% of the time on Ubuntu 18 and Ubuntu 20

Crash report, after running out of memory:

Obtained 23 stack frames.
#0  0x007fdb7bcde8a0 in funlockfile
#1  0x00558b6c55cf37 in std::basic_streambuf<char, std::char_traits<char> >::xsgetn(char*, long)
#2  0x00558b6c54ee05 in std::basic_filebuf<char, std::char_traits<char> >::xsgetn(char*, long)
#3  0x00558b6ae33d9c in unix::PersistentlyOpenProcFsFile::UpdateContents()
#4  0x00558b6ae34109 in unix::ProcFSCachedReader<unix::SystemMemoryInfo>::Update()
#5  0x00558b6ae340c1 in unix::GetCachedSystemMemoryInfo()
#6  0x00558b69d695a6 in systeminfo::GetPhysicalMemoryMB()
#7  0x00558b698da7f6 in systeminfo::GetPhysicalMemoryUsage()
#8  0x00558b69d69cd9 in systeminfo::GetMemoryPressure()
#9  0x00558b6b479886 in profiling::utils::IsHighMemoryPressure()
#10 0x00558b6b492a13 in ProfilerHistory::ValidateMemoryPressureAndDiscardFramesIfNeeded()
#11 0x00558b6b491dbc in ProfilerHistory::AddFrame(ProfilerFrameData*, int)
#12 0x00558b6b491b3b in ProfilerHistory::AddFrameDataAndTransferOwnership(ProfilerFrameData*, int)
#13 0x00558b6b47ad1e in profiling::ProfilerSession::IntegrateFramesToHistory(unsigned int)
#14 0x00558b6b47aa18 in profiling::ProfilerSession::EditorTick(bool)
#15 0x00558b6ae5db45 in MainMessageIteration(void*)
#16 0x007fdb7cc51285 in g_main_context_dispatch
#17 0x007fdb7cc51650 in g_main_context_dispatch
#18 0x007fdb7cc51962 in g_main_loop_run
#19 0x007fdb7dc58a25 in gtk_main
#20 0x00558b6ae5cd47 in main
#21 0x007fdb7b8fcb97 in __libc_start_main
#22 0x00558b69043029 in _start

  1. Resolution Note (fix version 2023.1.0a14):

  2. Resolution Note (fix version 2021.3.14f1):

    Fixed in: 2021.3.14f1

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.