ID:1738657
 
Keywords: bug, debian, exclusive, linux, ss13
Linux version 2.6.32 Wheezy 7
AMD Opteron 6386 SE
8GB of ram
DreamDaemon 5.0 Beta (Version 5.07.1269)


Alright, so i started running an SS13 server the other day using the /tg/ branch of the source code available here; https://github.com/tgstation/-tg-station

Upon compiling and testing the server on a windows machine, everything works flawlessly, no issues at all. When i switched the compiled dmb onto my production machine I started having all sorts of odd issues, features in the admin panel didn't work (Specifically the game panel) a plethora of odd little things, the inability to write on paper, the inability to speak after using DNA syringes etc. Needless to say, a bunch of things are broken which worked prior on my windows box.

I've tried running the server under different security schemes, trusted, safe, ultrasafe. I've tried different versions of DreamDaemon. I've tried compiling multiple different binaries from alternate sources. My permissions seems to be all set correct and in my host config i have SUID = 1 and TRUSTED = 1

Upon inspection of the logs I can see quite a few errors like this;

runtime error: Saftey violation: tried to use external call()
proc name: replacetext (/proc/replacetext)
source file: bygex.dm,55
usr: null
src: null
call stack:
replacetext("string", "string ", "")

this happens regardless of the security scheme in use.


I'm really not sure to go from here. I've gone into the #coderbus channel on rizon irc to try and find some support from the ss13 coder community, but nobody seems to be using linux.... I'm at a road block here and any help would be appreciated. I really do not want to use windows for my production server.
You need to add -trusted to the DreamDaemon command you're using.

In response to A.T.H.K
A.T.H.K wrote:
You need to add -trusted to the DreamDaemon command you're using.

As I've already said, I have tried ultrasafe, safe and trusted and the problem persists.

After further inspecting of the logs, all issues seem to revolve around bygex.

runtime error: Saftey violation: tried to use external call()

Proves different..
In response to A.T.H.K
A.T.H.K wrote:
runtime error: Saftey violation: tried to use external call()

Proves different..

When i said the problem still persists, i meant i was still having all the same issues regardless of the security setting. I've solved this problem and as i suspected bygex was the issue.

Bygex is compiled as a dynamically loadable library for windows (DLL) and thus does not work on linux. I found the source for bygex here; https://code.google.com/p/byond-regex/source/browse/

I've spoken to the host of tgstation and let him know of my findings, hopefully the coders will eventually compile bygex into the binary in stead of making it a DLL.

An alternative for people looking to host on linux is to use the vg branch; https://github.com/d3athrow/vgstation13

There is a define you can use to turn off bygex if you are unable to compile it for linux

#define USE_BYGEX in code/_compile_options.dm.

Simply comment out the define if you encounter any problems.

Thanks to carn for pointing that out