[Fixed] (4.4.0) Memory leak?

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

(4.4.0) Memory leak?

Postby Kizoky » Tue Jun 09, 2020 4:32 am

in GZDoom 4.3.1 in one of my maps the average RAM usage is around 1400-1700mb

in 4.4.0 however, it increases to 5000mbs

You can find my mod here: https://www.moddb.com/mods/postal-share-the-doom/downloads/share-the-doom-may-25-2020-tech-demo
or from here: https://github.com/Kizoky/share-the-doom/archive/master.zip

Reproduce:
- go to world1
- game has to be unpaused
- check in task manager as the memory usage increases overtime

Extra info:
- I use Vulkan
- I maxed out every settings (bloom, FXAA, etc..)
User avatar
Kizoky
I smell like gravity
 
Joined: 14 Nov 2011
Location: Around weirdos, I'm the biggest weirdo among them
Discord: Kizoky#0375
Operating System: Windows 10/8.1/8/201x 64-bit
Graphics Processor: nVidia with Vulkan support

Re: (4.4.0) Memory leak?

Postby drfrag » Tue Jun 09, 2020 5:14 am

Something similar happened with PB 3.0 but i thought it was a mod bug. But for that one the problem was reported to appear in 4.3.3, could you check with that version? I only have 4 GB of ram.
For PB 3 inferno city on a recent devbuild i wrote:
drfrag wrote:Here memory consumption rises up to 2 GB several times and then goes down to 700 MB, and once to as low as 200 MB. That's okay but when i tried to quit and usage was still relatively low it skyrocketed and freezed the machine for 15 minutes. It was so badly frozen that the task manager didn't even update (it showed around 1.4 GB as last value). I clicked on the window several times and luckily the dialogue to terminate the process appeared and i managed to kill it but only after the screen went black and the desktop came back again.
User avatar
drfrag
Os voy a romper a pedazos!
Vintage GZDoom Developer
 
Joined: 23 Apr 2004
Location: Spain
Discord: drfrag#3555
Github ID: drfrag666

Re: (4.4.0) Memory leak?

Postby Kizoky » Tue Jun 09, 2020 5:19 am

drfrag wrote:Something similar happened with PB 3.0 but i thought it was a mod bug. But for that one the problem was reported to appear in 4.3.3, could you check with that version? I only have 4 GB of ram.
For PB 3 inferno city on a recent devbuild i wrote:
drfrag wrote:Here memory consumption rises up to 2 GB several times and then goes down to 700 MB, and once to as low as 200 MB. That's okay but when i tried to quit and usage was still relatively low it skyrocketed and freezed the machine for 15 minutes. It was so badly frozen that the task manager didn't even update (it showed around 1.4 GB as last value). I clicked on the window several times and luckily the dialogue to terminate the process appeared and i managed to kill it but only after the screen went black and the desktop came back again.


nope, I tested with 4.3.3 and the problem that I encountered in 4.4.0 doesn't appear there
User avatar
Kizoky
I smell like gravity
 
Joined: 14 Nov 2011
Location: Around weirdos, I'm the biggest weirdo among them
Discord: Kizoky#0375
Operating System: Windows 10/8.1/8/201x 64-bit
Graphics Processor: nVidia with Vulkan support

Re: (4.4.0) Memory leak?

Postby drfrag » Tue Jun 09, 2020 5:45 am

It might be unrelated and that PB one could indeed be a mod bug. One thing i've noticed is that now GZDoom takes more ram than LZDoom, at least since 4.3.
User avatar
drfrag
Os voy a romper a pedazos!
Vintage GZDoom Developer
 
Joined: 23 Apr 2004
Location: Spain
Discord: drfrag#3555
Github ID: drfrag666

Re: (4.4.0) Memory leak?

Postby _mental_ » Tue Jun 09, 2020 7:08 am

The problem is with garbage collector. M_Malloc() no longer adds requested size to GC::AllocBytes, so GC doesn't run when needed. With the recent backend unification, I'm not quite sure where this variable should to be adjusted.
_mental_
 
 
 
Joined: 07 Aug 2011

Re: (4.4.0) Memory leak?

Postby Graf Zahl » Tue Jun 09, 2020 7:17 am

Put it back in there. This looks like during the file sync process the wrong code was chosen at one time.
This still begs the question: Does it make sense to measure all allocations, not just the ones related to GC'd objects? I never fully understood how this was supposed to work.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: (4.4.0) Memory leak?

Postby _mental_ » Tue Jun 09, 2020 7:55 am

Fixed.

Regarding allocated memory measurement, IMHO the idea is to include everything in order to work within limited memory footprint.
Embedded system (mobile, console, anything else without virtual memory) can benefit from this approach. But this is only a guess.
_mental_
 
 
 
Joined: 07 Aug 2011

Re: (4.4.0) Memory leak?

Postby drfrag » Tue Jun 09, 2020 8:34 am

drfrag wrote:looks like there's a memory leak in the garbage collector

So in the end it was a bug, that was what i suspected first but then i thought it was a mod bug.
User avatar
drfrag
Os voy a romper a pedazos!
Vintage GZDoom Developer
 
Joined: 23 Apr 2004
Location: Spain
Discord: drfrag#3555
Github ID: drfrag666


Return to Closed Bugs

Who is online

Users browsing this forum: No registered users and 0 guests