ID:1737321
 
BYOND Version:507
Operating System:Linux
Web Browser:Chrome 37.0.2062.120
Applies to:Dream Daemon
Status: Open

Issue hasn't been assigned a status value.
Descriptive Problem Summary:
For some odd reason whenever my servers are on a BETA version they just go haywire after a while. There's no bottlenecking or anything that is being experienced. However, when I perform top and/or htop I can see that some games are capping out on their CPU. The server controller (master) hits 99% and stays there. Sometimes the childs also hit their CPU caps, whatever it is allocated to be. Why it does this, I have no clue. However, it only happens to BETA. Well, scratch that. It's been happening to Stable recently as well. But, it happens 80% less on Stable. Stable is... literally stable. Like it should be. But, BETA has it's issues with staying up for a long time.


Numbered Steps to Reproduce Problem:
Leave a game up for days without shutting it down. It may happen after an hour of uptime.

Does the problem occur:
Every time? Or how often? Once or more every 3 days. It does not last 3 days without doing it.
In other games? Yes. Multiple games are hosted on the same server box and they will do it occasionally as well.
On other computers? Yes, I've had other server boxes on the BETA version do this as well. My Server #1 was on BETA but had to be removed since a lot of games were just out of the blue capping out the CPU. I instead designated an individual server for the Web Client version.

When does the problem NOT occur?
When running a stable version. Note, this has been occuring before 507 as well. As long as it's beta, it's unstable.

Workarounds:
Run a stable version or just shutdown and start up the game again. A reboot doesn't fix it.

---

Next time the problem occurs, since I literally just reset the DreamDaemon for the problem instance, I will take a screenshot and run a SIGUSR2 and SIGSEGV since it needs to be shutdown anyways. I'll paste those in a second post for this thread.
We'll definitely need more specific info on this. I don't see any reason the beta should be less stable than 506, since 507 has seen a number of significant fixes. However this is obviously not an issue for all games, and is likely specific to SS13 or even a particular branch of it.


Backtrace for BYOND 507.1267 on Linux:
Generated at Sat Dec 13 21:04:27 2014

DreamDaemon [0x8048000, 0x0], [0x8048000, 0x804bb44]
libbyond.so 0x2f9a70, 0x2f9b12
[0xb777a000, 0xb777a600], [0xb777a000, 0xb777a600]
libbyond.so 0x2f9a70, 0x2f9b12
libbyond.so [0xb7271000, 0x0], 0x22d1d9
libbyond.so [0xb7271000, 0x0], 0x1f3a13
libbyond.so [0xb7271000, 0x0], 0x1f42cf
libbyond.so [0xb7271000, 0x0], 0x246a77
libbyond.so [0xb7271000, 0x0], 0x2c5c09
libbyond.so [0xb7271000, 0x0], 0x2c67f5
libbyond.so 0x2c8470, 0x2c87fb
libbyond.so 0x2c8930, 0x2c8b3d
DreamDaemon [0x8048000, 0x0], [0x8048000, 0x804aef4]
libc.so.6 0x16d80, 0x16e66 (__libc_start_main)
DreamDaemon [0x8048000, 0x0], [0x8048000, 0x804a781]

Recent proc calls:
/proc/displayServers
/proc/getServer_CPU
/proc/getCPU_Usage
/proc/displayServers
/proc/getServer_CPU
/proc/getCPU_Usage
/proc/displayServers
/proc/getServer_CPU
/proc/getCPU_Usage
/proc/displayServers
/proc/getServer_CPU
/proc/getCPU_Usage
/proc/displayServers
/proc/getServer_CPU
/proc/getCPU_Usage
/mob/Stat

To help the BYOND developers debug this, please send the above trace as part
of a very detailed bug report: http://www.byond.com/members/?command=view_tracker&tracker=1
Haven't experienced this with my SS13 server, uptime around 1-2 weeks on Linux.

I'm assuming Xirre has checked his own code to see if it wasn't his own problem..?
In response to Laser50
Laser50 wrote:
Haven't experienced this with my SS13 server, uptime around 1-2 weeks on Linux.

I'm assuming Xirre has checked his own code to see if it wasn't his own problem..?

I honestly don't feel as if it has anything to do with SS13. I've reviewed several pieces of my code multipel times. The only fancy things in my code are shell() calls, javascript for file management, and datums for information handling. Other than that, it's the same thing everyone else is doing. The basics in BYOND. Ifs, fors, Stat(), etc. :)

Uhm... also, let it be known that it's also games that are freshly made that are effected as well. One known to crash would be Ralf1324's game, Sekia. It does it even on Stable. Beta just makes it happen 10x more frequent.
Well, ignore this and the one above unless you feel they hold some clue to something else. What's going on here is that shell() is calling unzip on the linux system and looking for files of type .sav, .txt, and .log. Which is fine for it to say "caution". What comes after it is what is buggy. The server is in DEBUG mode... Seeing as how there are a lot of "Process XXX dead!" messages, which means the game was shutdown through the server or through the game itself or... it just crashed. This also means that the game was constantly started up with shell() calling DreamDaemon. When that happens, it also calls shell() to limit DreamDaemon's CPU. Then, it goes to getServer_CPU on the new list of servers and that proc calls getCPU_Usage on whatever iteration it is on. It also checks if it exists. Which is what confuses me as to why it would crash.

I'll try to find a bug report for one actually pertaining to this error. It's just so odd because this is recent. The previous high CPU-consumption errors didn't hang the game. It just displayed a high CPU outside of the game while the inside, world.cpu, said it was at 1% or 0% all the time.



caution: filename not matched:  *.sav
caution: filename not matched: *.txt
caution: filename not matched: *.log
Process 9257 dead!
BUG: Crashing due to an illegal operation!

Backtrace for BYOND 507.1267 on Linux:
Generated at Sun Dec 14 19:54:36 2014

DreamDaemon [0x8048000, 0x0], [0x8048000, 0x804bb44]
libbyond.so 0x2f9a70, 0x2f9b12
[0xb77d5000, 0xb77d5600], [0xb77d5000, 0xb77d5600]
libbyond.so 0x2f9a70, 0x2f9b12
libbyond.so [0xb72cc000, 0x0], 0x22d1d9
libbyond.so [0xb72cc000, 0x0], 0x1f3a13
libbyond.so [0xb72cc000, 0x0], 0x1f42cf
libbyond.so [0xb72cc000, 0x0], 0x246a77
libbyond.so [0xb72cc000, 0x0], 0x2c5c09
libbyond.so [0xb72cc000, 0x0], 0x2c67f5
libbyond.so 0x2c8470, 0x2c87fb
libbyond.so 0x2c8930, 0x2c8b3d
DreamDaemon [0x8048000, 0x0], [0x8048000, 0x804aef4]
libc.so.6 0x16d80, 0x16e66 (__libc_start_main)
DreamDaemon [0x8048000, 0x0], [0x8048000, 0x804a781]

Recent proc calls:
/proc/getCPU_Usage
/proc/getServer_CPU
/proc/getCPU_Usage
/proc/getServer_CPU
/proc/getCPU_Usage
/proc/getServer_CPU
/proc/getCPU_Usage
/proc/getServer_CPU
/proc/getServer_CPU
/proc/displayServers
/proc/getServer_CPU
/proc/displayServers
/proc/getServer_CPU
/proc/displayServers
/proc/getServer_CPU
/proc/displayServers

To help the BYOND developers debug this, please send the above trace as part
of a very detailed bug report: http://www.byond.com/members/?command=view_tracker&tracker=1
Doesn't seem like tonight is a good night. These bug reports may not be helpful, but, I wouldn't know that 100% as I've never looked deep in to them. Nor do I think I can.

Here's 3 more culprits on a stable version (I forgot to screenshot one, that's the Shell Server Utility):



Tomeno's server for "Console", by Exadv1
runtime error: type mismatch: "\"extern 0 0 chat \[nick]@" += /list (/list)
proc name: dd list2text (/proc/dd_list2text)
source file: TextHandling.dm,230
usr: Tomeno (/mob)
src: null
call stack:
dd list2text(/list (/list), /list (/list))
dd replacetext("\"extern 0 0 chat \[nick]@\[ch...", "\[chattxt]", /list (/list))
task (/datum/task): parse()
chat.com (/datum/file/normal/executable): execute("ayylmao", null)
the laptop- \'Tomeno\'s\' (/obj/signal/computer/laptop): execute("run", "/sys/registry/chat.comayylma...", "user")
the laptop- \'Tomeno\'s\' (/obj/signal/computer/laptop): execute("run", "/sys/registry/chat.comayylma...", "user")
the laptop- \'Tomeno\'s\' (/obj/signal/computer/laptop): parse string("run /sys/registry/chat.com ayy...", "user")
the laptop- \'Tomeno\'s\' (/obj/signal/computer/laptop): execute("chat", "ayylmao", "user")
the laptop- \'Tomeno\'s\' (/obj/signal/computer/laptop): execute("chat", "ayylmao", "user")
the laptop- \'Tomeno\'s\' (/obj/signal/computer/laptop): parse string("chat ayy lmao", "user")
the laptop- \'Tomeno\'s\' (/obj/signal/computer/laptop): process("chat ayy lmao")
Tomeno (/mob): >("chat ayy lmao")

*************************************
Caught SIGUSR2, printing diagnostics:

Server port: 6660
Server visibility: public
Server reachable by players: yes


Sun Dec 14 20:10:27 2014
Dream Daemon network diagnostics:
Port: 6660
Users:

server mem usage:
Prototypes:
obj: 23168 (161)
mob: 23232 (4)
proc: 348960 (624)
str: 12545791 (3516)
appearance: 12626543 (412)
id array: 344472 (1259)
map: 416084 (100,100,1)
objects:
mobs: 0 (2)
objs: 347256 (2233)
datums: 1137776 (12999)
lists: 531112 (15594)

Backtrace for BYOND 506.1247 on Linux:
Generated at Sun Dec 14 20:10:27 2014

DreamDaemon [0x8048000, 0x0], [0x8048000, 0x804bb14]
[0xb770e000, 0xb770e400], [0xb770e000, 0xb770e405]
[0xb770e000, 0xb770e600], [0xb770e000, 0xb770e600]
[0xb770e000, 0xb770e400], [0xb770e000, 0xb770e405]
libc.so.6 0xd2eb0, 0xd2edd (__select)
libbyond.so 0x28a730, 0x28ab05
DreamDaemon [0x8048000, 0x0], [0x8048000, 0x804aed4]
libc.so.6 0x16d60, 0x16e46 (__libc_start_main)
DreamDaemon [0x8048000, 0x0], [0x8048000, 0x804a771]

Recent proc calls:
/obj/signal/computer/proc/add_to_log
/proc/dd_list2text
/proc/dd_text2list
/proc/dd_replacetext
/proc/dd_text2list
/obj/signal/computer/proc/execute
/proc/dd_list2text
/proc/dd_text2list
/proc/dd_text2list
/obj/signal/computer/proc/parse_string
/datum/task/proc/get_data
/proc/dd_list2text
/proc/dd_text2list
/proc/dd_replacetext
/proc/dd_list2text
/proc/dd_text2list

End of diagnostics.
*************************************

BUG: Crashing due to an illegal operation!
proc name: add to log (/obj/signal/computer/proc/add_to_log)
source file: computer.dm,613
usr: null
src: the computer- \'SIGN\' (/obj/signal/computer)
call stack:
the computer- \'SIGN\' (/obj/signal/computer): add to log("extern (0 0 text TOMEN...")
the computer- \'SIGN\' (/obj/signal/computer): execute("extern", "00textTOMENO", task (/datum/task))
the computer- \'SIGN\' (/obj/signal/computer): parse string("extern 0 0 text TOMENO...", task (/datum/task))
task (/datum/task): parse()
app (/datum/file/normal/executable): execute(null, null)
the computer- \'SIGN\' (/obj/signal/computer): execute("run", "app", "user")
the computer- \'SIGN\' (/obj/signal/computer): parse string("run app", "user")
the computer- \'SIGN\' (/obj/signal/computer): process("run app")
>("run app")

Backtrace for BYOND 506.1247 on Linux:
Generated at Sun Dec 14 20:11:23 2014

DreamDaemon [0x8048000, 0x0], [0x8048000, 0x804bb14]
libc.so.6 [0xb6d40000, 0x0], 0x11e70a
[0xb770e000, 0xb770e600], [0xb770e000, 0xb770e600]
libc.so.6 [0xb6d40000, 0x0], 0x11e70a
libbyond.so [0xb7228000, 0x0], 0x1ee289
libbyond.so [0xb7228000, 0x0], 0x21d285
libbyond.so [0xb7228000, 0x0], 0x21defe
libbyond.so [0xb7228000, 0x0], 0x226473
libbyond.so [0xb7228000, 0x0], 0x226fcd
libbyond.so [0xb7228000, 0x0], 0x20bf36
libbyond.so [0xb7228000, 0x0], 0x21defe
libbyond.so [0xb7228000, 0x0], 0x226473
libbyond.so [0xb7228000, 0x0], 0x226dd0
libbyond.so [0xb7228000, 0x0], 0x20bf36
libbyond.so [0xb7228000, 0x0], 0x21defe
libbyond.so [0xb7228000, 0x0], 0x226473
libbyond.so [0xb7228000, 0x0], 0x226fcd
libbyond.so [0xb7228000, 0x0], 0x20bf36
libbyond.so [0xb7228000, 0x0], 0x204fff
libbyond.so [0xb7228000, 0x0], 0x204fff
libbyond.so [0xb7228000, 0x0], 0x204fff
libbyond.so [0xb7228000, 0x0], 0x204fff
libbyond.so [0xb7228000, 0x0], 0x204fff
libbyond.so [0xb7228000, 0x0], 0x21dccc
libbyond.so [0xb7228000, 0x0], 0x21f465
libbyond.so [0xb7228000, 0x0], 0x1e7683
libbyond.so 0x2bb1d0, 0x2bb31a
libbyond.so 0x28a730, 0x28a932
DreamDaemon [0x8048000, 0x0], [0x8048000, 0x804aed4]
libc.so.6 0x16d60, 0x16e46 (__libc_start_main)
DreamDaemon [0x8048000, 0x0], [0x8048000, 0x804a771]

Recent proc calls:
/obj/signal/computer/proc/add_to_log
/proc/dd_list2text
/proc/dd_text2list
/proc/dd_replacetext
/proc/dd_text2list
/obj/signal/computer/proc/execute
/proc/dd_list2text
/proc/dd_text2list
/proc/dd_text2list
/obj/signal/computer/proc/parse_string
/datum/task/proc/get_data
/proc/dd_list2text
/proc/dd_text2list
/proc/dd_replacetext
/proc/dd_list2text
/proc/dd_text2list

To help the BYOND developers debug this, please send the above trace as part
of a very detailed bug report: http://www.byond.com/members/?command=view_tracker&tracker=1


Shinx's game, Warrior Cats. Sadly, I couldn't grab the error report in time.

Shell Server Utility -- Does it just say crashing due to illegal operation everytime I sigsegv or try to sigusr2 when it's hanging?
Process 14437 dead!
Sun Dec 14 04:32:40 2014
Servers/zeex00/bwwa
bwwa/
bwwa/
Process 26825 dead!
BUG: Finished erasure with refcount=1 (ref=5:0) DM (:0)
BUG: Finished erasure with refcount=2 (ref=5:2) DM (:0)
sh: 1: kill: No such process

Sun Dec 14 11:53:20 2014
Warrior Cats RPG/
Warrior Cats RPG/
Process 12527 dead!
BUG: Crashing due to an illegal operation!

Backtrace for BYOND 506.1247 on Linux:
Generated at Sun Dec 14 20:10:22 2014

DreamDaemon [0x8048000, 0x0], [0x8048000, 0x804bb14]
libbyond.so 0x2babc0, 0x2bac60
[0xb778a000, 0xb778a600], [0xb778a000, 0xb778a600]
libbyond.so 0x2babc0, 0x2bac60
libbyond.so [0xb72a0000, 0x0], 0x21e8a9
DreamDaemon [0x8048000, 0x0], [0x8048000, 0x804c243]
[0xb778a000, 0xb778a500], [0xb778a000, 0xb778a500]
[0xb778a000, 0xb778a400], [0xb778a000, 0xb778a405]
libc.so.6 0x2ab50, 0x2ab9b (sigprocmask)
libc.so.6 0x2a720, 0x2a78b (_longjmp)
libpthread.so.0 [0xb6f20000, 0x0], 0xd134
libbyond.so [0xb72a0000, 0x0], 0x288f5b
libbyond.so [0xb72a0000, 0x0], 0x2bbf1f
[0xb778a000, 0xb778a500], [0xb778a000, 0xb778a500]

Recent proc calls:
/proc/getCPU_Usage
/proc/getServer_CPU
/proc/displayServers
/proc/getServer_CPU
/proc/getCPU_Usage
/proc/getServer_CPU
/proc/getCPU_Usage
/proc/displayServers
/proc/getServer_CPU
/proc/getCPU_Usage
/proc/displayServers
/proc/getServer_CPU
/proc/getCPU_Usage
/proc/displayServers
/proc/getServer_CPU
/proc/getCPU_Usage

To help the BYOND developers debug this, please send the above trace as part
of a very detailed bug report: http://www.byond.com/members/?command=view_tracker&tracker=1