This is why I stopped playing minetest

lkjoel
Member
 
Posts: 778
Joined: Wed Feb 29, 2012 19:27

This is why I stopped playing minetest

by lkjoel » Sun Jul 01, 2012 15:27

I now am trying to fix minetest, but this is one of the reasons why I stopped:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
==12107== LEAK SUMMARY:
==12107==    definitely lost: 96,200 bytes in 518 blocks
==12107==    indirectly lost: 1,522,455 bytes in 3,565 blocks
==12107==      possibly lost: 33,554,512 bytes in 3 blocks
==12107==    still reachable: 46,068 bytes in 422 blocks
==12107==         suppressed: 0 bytes in 0 blocks
==12107== Reachable blocks (those to which a pointer was found) are not shown.
==12107== To see them, rerun with: --leak-check=full --show-reachable=yes
==12107==
==12107== For counts of detected and suppressed errors, rerun with: -v
==12107== Use --track-origins=yes to see where uninitialised values come from
==12107== ERROR SUMMARY: 10000065 errors from 800 contexts (suppressed: 1614459 from 49)

This means that each time you run minetest, you lose ~35MB of RAM (until you reboot)!
I'll try to fix some of these issues though
My mods: The Nether | Doctor Who (WIP)

I have quit minetest ... again. I am heavily unimpressed by both the game and the community.
 

cosarara97
Member
 
Posts: 180
Joined: Tue Nov 01, 2011 18:53

by cosarara97 » Sun Jul 01, 2012 21:56

Mine is different, although I don't know what does it mean, although it looks worse to me :/ (just ran in valgrind)
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
==31278== LEAK SUMMARY:
==31278==    definitely lost: 193,454 bytes in 1,385 blocks
==31278==    indirectly lost: 15,908,560 bytes in 10,764 blocks
==31278==      possibly lost: 35,712,096 bytes in 7 blocks
==31278==    still reachable: 74,115 bytes in 547 blocks
==31278==         suppressed: 0 bytes in 0 blocks
==31278== Rerun with --leak-check=full to see details of leaked memory
==31278==
==31278== For counts of detected and suppressed errors, rerun with: -v
==31278== Use --track-origins=yes to see where uninitialised values come from
==31278== ERROR SUMMARY: 111525 errors from 56 contexts (suppressed: 2 from 2)

Well, hope you can fix it.
:D
 

lkjoel
Member
 
Posts: 778
Joined: Wed Feb 29, 2012 19:27

by lkjoel » Sun Jul 01, 2012 22:11

Yeah, that's way worse (50MB). I'll try my best
My mods: The Nether | Doctor Who (WIP)

I have quit minetest ... again. I am heavily unimpressed by both the game and the community.
 

cy
Member
 
Posts: 31
Joined: Sun Jun 24, 2012 17:25

by cy » Mon Jul 02, 2012 02:17

If you're running Linux, it puts processes into completely abstract address spaces. that means it's impossible for a program to acquire memory that Linux cannot then go mark as usable again after that process has died. All memory acquisition is recorded and accounted for by the kernel. The only operating system really known for actually leaking memory that remained unclaimable after the process was stopped was Win95 or earlier (not counting WinNT).

It's true that minetest client has a lot of leaks though. Many probably Irrlicht bugs. The end result is it starts eating your RAM if you exit to Menu (and not to OS) too many times. Then you kill the process and all that RAM is free. I just exit to OS every time since the time it takes to start up the menu is practically zero. Never had any problems.

To reiterate, code to prevent memory leaks 100% already exists for every program. Code to free unused memory without restarting the process is technically redundant.
My PGP key is 61EF 2214 3FC8 1C13 0406 B327 CECE ED18 4398 7815
 

cy
Member
 
Posts: 31
Joined: Sun Jun 24, 2012 17:25

by cy » Mon Jul 02, 2012 02:18

Seriously Joel your treehouse is amazing. :/ Don't leave us!
My PGP key is 61EF 2214 3FC8 1C13 0406 B327 CECE ED18 4398 7815
 

User avatar
Melkor
Member
 
Posts: 285
Joined: Sat Sep 24, 2011 01:03

by Melkor » Mon Jul 02, 2012 02:50

lkjoel wrote:I now am trying to fix minetest, but this is one of the reasons why I stopped:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
...

This means that each time you run minetest, you lose ~35MB of RAM (until you reboot)!
I'll try to fix some of these issues though


good to know this!
is complicated when you're a noob trying to do mods, log in and out all the time of minetest
thanks!
 

lkjoel
Member
 
Posts: 778
Joined: Wed Feb 29, 2012 19:27

by lkjoel » Mon Jul 02, 2012 16:58

I'm not leaving persay, but I'm rather gonna try to fix as many leaks as possible (to the irrlicht limit, of course), so I won't be playing for a while.
My mods: The Nether | Doctor Who (WIP)

I have quit minetest ... again. I am heavily unimpressed by both the game and the community.
 

qznc
Member
 
Posts: 55
Joined: Tue Jul 03, 2012 09:02

by qznc » Tue Jul 03, 2012 09:08

lkjoel wrote:This means that each time you run minetest, you lose ~35MB of RAM (until you reboot)!


Sorry, but "until you reboot" is not correct. RAM is freed when an application exits.

RAM is request by an application from the operating system. So the OS knows what RAM is used by which app. Additionally, the OS knows which apps are running and when they exit. Hence, the OS can easily free the RAM an application got as soon as the app exits. It is not even a costly operation.

The problem with memory leaks are long running applications. For example, if a minetest server leaks memory it might grow over the days/months. At some point the physical RAM is exhausted and the OS will start swapping, which means everything becomes slow. If swap does not suffice anymore, the OS can only kill processes to free memory. Probably, the minetest server will simply be killed.

Is there any leak in the server code? It should not require Irrlicht.
 

lkjoel
Member
 
Posts: 778
Joined: Wed Feb 29, 2012 19:27

by lkjoel » Tue Jul 03, 2012 17:09

qznc wrote:
lkjoel wrote:This means that each time you run minetest, you lose ~35MB of RAM (until you reboot)!


Sorry, but "until you reboot" is not correct. RAM is freed when an application exits.

RAM is request by an application from the operating system. So the OS knows what RAM is used by which app. Additionally, the OS knows which apps are running and when they exit. Hence, the OS can easily free the RAM an application got as soon as the app exits. It is not even a costly operation.

The problem with memory leaks are long running applications. For example, if a minetest server leaks memory it might grow over the days/months. At some point the physical RAM is exhausted and the OS will start swapping, which means everything becomes slow. If swap does not suffice anymore, the OS can only kill processes to free memory. Probably, the minetest server will simply be killed.

Is there any leak in the server code? It should not require Irrlicht.

That is the problem. It doesn't free when the app exists. The app must free the RAM by itself, because the system cannot do that.
Memory leaks mean that the application actually allocates memory somewhere, but then it doesn't free it. The OS has NO WAY OF KNOWING if that part of the memory is used or not, therefore it just exists there without anyone using it.

I'm sorry, you just don't know how computers work.
My mods: The Nether | Doctor Who (WIP)

I have quit minetest ... again. I am heavily unimpressed by both the game and the community.
 

qznc
Member
 
Posts: 55
Joined: Tue Jul 03, 2012 09:02

by qznc » Tue Jul 03, 2012 19:07

lkjoel wrote:That is the problem. It doesn't free when the app exists. The app must free the RAM by itself, because the system cannot do that.
Memory leaks mean that the application actually allocates memory somewhere, but then it doesn't free it. The OS has NO WAY OF KNOWING if that part of the memory is used or not, therefore it just exists there without anyone using it.

I'm sorry, you just don't know how computers work.


That is an interesting OS you are using there. Every Desktop OS I know uses virtual memory to sandbox applications. Is minetest running on something other than Windows, OS X, iOS, Linux, BSD, DOS, Android, Solaris? Please help, I want to learn computers.
 

lkjoel
Member
 
Posts: 778
Joined: Wed Feb 29, 2012 19:27

by lkjoel » Tue Jul 03, 2012 19:53

Memory leak in wikipedia: "A memory leak, in computer science (or leakage, in this context), occurs when a computer program consumes memory but is unable to release it back to the operating system.". You get that now?
My mods: The Nether | Doctor Who (WIP)

I have quit minetest ... again. I am heavily unimpressed by both the game and the community.
 

cosarara97
Member
 
Posts: 180
Joined: Tue Nov 01, 2011 18:53

by cosarara97 » Tue Jul 03, 2012 21:08

lkjoel wrote:Memory leak in wikipedia: "A memory leak, in computer science (or leakage, in this context), occurs when a computer program consumes memory but is unable to release it back to the operating system.". You get that now?

qznc is right... The OS gives every program a space in the memory, and when it finishes, all that memory gets free. It doesn't matter if the program lost it's track it while it was running, that's what virtual memory is about.
You know, if I lost 50 MBs of RAM every time I ran minetest, I would have no ram now, because it's been arround 2 weeks since i rebooted this PC, and I open and close minetest lots of times when I install mods. I have 2 GBs of ram, and if what you think were true, I could run MT just ~40 times before running out of RAM.
Memory leaks make memory unavaiable to the system while the program is running, but not after it's closed.
Just open and close MT 40 times in a netbook and see :)
Oh, yes, and from Memory leak in wikipedia (just some paragraphs below): "Memory leaks may not be serious or even detectable by normal means. In modern operating systems, normal memory used by an application is released when the application terminates."

But I'd, of course, be very happy if you fixed all those memory leaks :)
Last edited by cosarara97 on Tue Jul 03, 2012 21:08, edited 1 time in total.
:D
 

lkjoel
Member
 
Posts: 778
Joined: Wed Feb 29, 2012 19:27

by lkjoel » Tue Jul 03, 2012 21:32

Well, ok, but for some reason the system DOES slow down after a couple times of minetest were instanced (Ubuntu 12.10, 8GB RAM, 64-bit AMD A6). So there are a few things that do get lost after a couple of times (for example, I think that objects that are not freed are left hanging, as it is given to a random stop of the memory, no association to the program, except for the pointer).
My mods: The Nether | Doctor Who (WIP)

I have quit minetest ... again. I am heavily unimpressed by both the game and the community.
 

glomie
Member
 
Posts: 141
Joined: Sun Aug 07, 2011 19:41

by glomie » Thu Jul 05, 2012 22:54

lkjoel wrote:Well, ok, but for some reason the system DOES slow down after a couple times of minetest were instanced (Ubuntu 12.10, 8GB RAM, 64-bit AMD A6). So there are a few things that do get lost after a couple of times (for example, I think that objects that are not freed are left hanging, as it is given to a random stop of the memory, no association to the program, except for the pointer).

Or a leak/bug in nvidia/catalyst driver as usual...
Sorry for my bad english...
 

lkjoel
Member
 
Posts: 778
Joined: Wed Feb 29, 2012 19:27

by lkjoel » Fri Jul 06, 2012 02:04

Uh, I don't use that
My mods: The Nether | Doctor Who (WIP)

I have quit minetest ... again. I am heavily unimpressed by both the game and the community.
 

User avatar
mauvebic
Member
 
Posts: 1550
Joined: Fri Jan 27, 2012 11:32

by mauvebic » Fri Jul 06, 2012 11:24

glomie wrote:Or a leak/bug in nvidia/catalyst driver as usual...


Dont blame ATI/NVIDIA. I know its the popular thing for linux devs to blame everything but themselves, but even when they have the source code they cant get it right. Been using linux for 8 years now, and i've never had a smooth wifi experience. Apart from which the linux gurus seem to change their minds every year, not long ago i was told ATI was shit and i should buy NVIDIA, i did. When i started having problems with NVIDIA drivers suddenly NVIDIA was the bad guy and ATI was suddenly better. So i stop listening to these (clueless) people a long time ago. Failing that, they tell you its free and you should pay them if you want them to fix their own shit code. Which is pretty much how linux support companies make their living.
Last edited by mauvebic on Fri Jul 06, 2012 11:25, edited 1 time in total.
"Fuck the hat." - Paulie Gualtieri
 


Return to Minetest General

Who is online

Users browsing this forum: No registered users and 15 guests

cron