Posted 06 March 2012 - 11:15 PM
Today I found out my Linux box was being raped hard by memory errors from every application on the box that spawns extra threads. Mainly my MC Servers. What ended up happening is ComputerCraft had failed and capped ou the max amount of threads open by the OS None Default Settings that I had already quadrupled.
So how do you repeat this? Simple, Move 200 blocks away from spawn mainly because spawn area does not unload chunks or at least in SMP I'm unsure about SSP. Setup 10 computers and leave the area and come back many many times. You will make your computer cry. So what is actually happening? The LUA engine I guess would be an okay term to use is not shutting down period. It stays open and rather then even using the ones that are already open it goes back and opens new ones over and over.
I'm no programmer but I did a small thread dump of many examples. I suggest you check out the last one to give you an idea of 10 reloggins on a SMP Server that is Vanilla just using MLMP/Forge/CC AND NOTHING ELSE!
6 Thread Dumps:
1) fresh login
http://godcraft.com/x/ccdump1.txt
2) 10 pc's placed and turned on
http://godcraft.com/x/ccdump2.txt
3) logged out waited 60 seconds and dump
http://godcraft.com/x/ccdump3.txt
4) logged in again and 77 live threads.
http://godcraft.com/x/ccdump4.txt
5) 5 relogins 225 live threads while not logged in.
http://godcraft.com/x/ccdump5.txt
6) 10 relogins 375 live threads OMFG!
http://godcraft.com/x/ccdump6.txt
My suggestion would be to consider halting any new updates for ComputerCraft until this problem gets resolved, since this is actually something that can be very dangerous for server owners and even the hardcore SSP players.
So how do you repeat this? Simple, Move 200 blocks away from spawn mainly because spawn area does not unload chunks or at least in SMP I'm unsure about SSP. Setup 10 computers and leave the area and come back many many times. You will make your computer cry. So what is actually happening? The LUA engine I guess would be an okay term to use is not shutting down period. It stays open and rather then even using the ones that are already open it goes back and opens new ones over and over.
I'm no programmer but I did a small thread dump of many examples. I suggest you check out the last one to give you an idea of 10 reloggins on a SMP Server that is Vanilla just using MLMP/Forge/CC AND NOTHING ELSE!
6 Thread Dumps:
1) fresh login
http://godcraft.com/x/ccdump1.txt
2) 10 pc's placed and turned on
http://godcraft.com/x/ccdump2.txt
3) logged out waited 60 seconds and dump
http://godcraft.com/x/ccdump3.txt
4) logged in again and 77 live threads.
http://godcraft.com/x/ccdump4.txt
5) 5 relogins 225 live threads while not logged in.
http://godcraft.com/x/ccdump5.txt
6) 10 relogins 375 live threads OMFG!
http://godcraft.com/x/ccdump6.txt
My suggestion would be to consider halting any new updates for ComputerCraft until this problem gets resolved, since this is actually something that can be very dangerous for server owners and even the hardcore SSP players.