Reproduction steps:
1. Open the attached “BugRepro” project
2. Open the “Assets/Scene.unity” scene
3. Enter the Play Mode
4. Wait for at least 10 minutes
Actual results: Used memory keeps growing until Unity Editor crashes when using incremental GC
Expected results: Unity Editor does not crash
Reproduced with: 2021.3.38f1, 2022.3.29f1, 6000.0.2f1
Reproduced on: Ubuntu 22.04, Ubuntu 24.04
Not reproduced on: Windows 10 Pro
First lines of the stack trace:
#0 0x0070d6ffe42520 in (Unknown)
#1 0x0070d6ffe969fc in pthread_kill
#2 0x0070d6ffe42476 in pthread_kill
#3 0x0070d6ffe287f3 in raise
#4 0x0070d552a6d37e in raise
#5 0x0070d552a6d2d6 in abort
#6 0x0070d552a6f03c in abort
#7 0x0070d552a6f236 in GC_merge_unmapped
#8 0x0070d552a70cdb in GC_merge_unmapped
#9 0x0070d552a6b091 in GC_unmap_old
#10 0x0070d552a71616 in GC_unmap_old
#11 0x0070d552a755ca in GC_finish_collection
Notes:
- before the crash “mmap(PROT_NONE) failed” error appears in the logs
- on Windows, RAM usage does not get higher than 8GB with 64 GB RAM available