Linux Dedicated Server & Linux

Phantom139

Terrarian
Hello folks, Usually I'm on the Windows side of things and I can solve problems on my own, however being a Linux n00b comes with the added joy of no longer having that benefit of solving problems easily.

Over the past few days, I have been trying without much luck to get the Terraria Dedicated Server to run on my Linux box. I'd get world load failures on the server when loading existing worlds and crashes when trying to make new ones. So after reading some articles online and trying (And failing twice, almost thinking I killed my box twice too) to get this to work, I'm all out of the know how.

What I've been doing is using the 'mono' package (installed via sudo apt-get install mono-complete) to run the TerrariaServer.exe process. Earlier before I think I royally f-ed thing up, it was giving me some JSON related error on the crashes (To which the common response was update mono), I tried that and ended up deleting it, and part of my gnome package which forced me to restart a few times and re-install that package.

Upon re-installing mono and trying to run it again, I am now only getting the following error:
Code:
mono TerrariaServer.exe
* Assertion at socket-io.c:1075, condition `domain->sockaddr_data_field' not met

Stacktrace:

  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) System.Net.Sockets.Socket.Bind_internal (intptr,System.Net.SocketAddress,int&) <0x00060>
  at System.Net.Sockets.Socket.Bind (System.Net.EndPoint) <0x0005f>
  at System.Net.Sockets.TcpClient..ctor () <0x00073>
  at Terraria.Net.Sockets.TcpSocket..ctor () <0x00113>
  at Terraria.RemoteServer..ctor () <0x0002f>
  at Terraria.Netplay..cctor () <0x0006f>
  at (wrapper runtime-invoke) object.runtime_invoke_void (object,intptr,intptr,intptr) <0x0005a>
  at <unknown> <0xffffffff>
  at Terraria.Program.LaunchGame (string[]) <0x0008b>
  at Terraria.LinuxLaunch.Main (string[]) <0x0003b>
  at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object (object,intptr,intptr,intptr) <0x000c8>

Native stacktrace:

    mono() [0x4accca]
    /lib/x86_64-linux-gnu/libpthread.so.0(+0x113e0) [0x7fa6aa2fa3e0]
    /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x38) [0x7fa6a9d3f428]
    /lib/x86_64-linux-gnu/libc.so.6(abort+0x16a) [0x7fa6a9d4102a]
    mono() [0x65aae9]
    mono() [0x65acf7]
    mono() [0x65ae46]
    mono() [0x58acf0]
    mono() [0x58bcb4]
    [0x40c044a1]

Debug info from gdb:

Could not attach to process.  If your uid matches the uid of the target
process, check the setting of /proc/sys/kernel/yama/ptrace_scope, or try
again as the root user.  For more details, see /etc/sysctl.d/10-ptrace.conf
ptrace: Operation not permitted.
No threads.

=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================

Aborted (core dumped)

Of course this time around, not a single google search result has anything here on how to fix it. I've tried deleting all of mono and rebooting then re-installing twice, all without fail.

If anyone know how I can go about fixing this, that would be greatly appreciated.

EDIT 1: Giving it sudo access produces something even more "scary"

Code:
sudo mono TerrariaServer.exe
* Assertion at socket-io.c:1075, condition `domain->sockaddr_data_field' not met

Stacktrace:

  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) System.Net.Sockets.Socket.Bind_internal (intptr,System.Net.SocketAddress,int&) <0x00060>
  at System.Net.Sockets.Socket.Bind (System.Net.EndPoint) <0x0005f>
  at System.Net.Sockets.TcpClient..ctor () <0x00073>
  at Terraria.Net.Sockets.TcpSocket..ctor () <0x00113>
  at Terraria.RemoteServer..ctor () <0x0002f>
  at Terraria.Netplay..cctor () <0x0006f>
  at (wrapper runtime-invoke) object.runtime_invoke_void (object,intptr,intptr,intptr) <0x0005a>
  at <unknown> <0xffffffff>
  at Terraria.Program.LaunchGame (string[]) <0x0008b>
  at Terraria.LinuxLaunch.Main (string[]) <0x0003b>
  at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object (object,intptr,intptr,intptr) <0x000c8>

Native stacktrace:

    mono() [0x4accca]
    /lib/x86_64-linux-gnu/libpthread.so.0(+0x113e0) [0x7f09c27d23e0]
    /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x38) [0x7f09c2217428]
    /lib/x86_64-linux-gnu/libc.so.6(abort+0x16a) [0x7f09c221902a]
    mono() [0x65aae9]
    mono() [0x65acf7]
    mono() [0x65ae46]
    mono() [0x58acf0]
    mono() [0x58bcb4]
    [0x419834a1]

Debug info from gdb:

[New LWP 6681]
[New LWP 6682]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
0x00007f09c27d1fcb in __waitpid (pid=6683, stat_loc=0x7fff61be26cc, options=0) at ../sysdeps/unix/sysv/linux/waitpid.c:29
29    ../sysdeps/unix/sysv/linux/waitpid.c: No such file or directory.
  Id   Target Id         Frame 
* 1    Thread 0x7f09c32ec740 (LWP 6680) "Main" 0x00007f09c27d1fcb in __waitpid (pid=6683, stat_loc=0x7fff61be26cc, options=0) at ../sysdeps/unix/sysv/linux/waitpid.c:29
  2    Thread 0x7f09c17ff700 (LWP 6681) "SGen worker" pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
  3    Thread 0x7f09c1f09700 (LWP 6682) "Finalizer" 0x00007f09c27d0877 in futex_abstimed_wait_cancelable (private=0, abstime=0x0, expected=0, futex_word=0x97b100) at ../sysdeps/unix/sysv/linux/futex-internal.h:205

Thread 3 (Thread 0x7f09c1f09700 (LWP 6682)):
#0  0x00007f09c27d0877 in futex_abstimed_wait_cancelable (private=0, abstime=0x0, expected=0, futex_word=0x97b100) at ../sysdeps/unix/sysv/linux/futex-internal.h:205
#1  do_futex_wait (sem=sem@entry=0x97b100, abstime=0x0) at sem_waitcommon.c:111
#2  0x00007f09c27d0924 in __new_sem_wait_slow (sem=0x97b100, abstime=0x0) at sem_waitcommon.c:181
#3  0x00007f09c27d09ca in __new_sem_wait (sem=<optimized out>) at sem_wait.c:29
#4  0x00000000005bb8d9 in ?? ()
#5  0x000000000059c68c in ?? ()
#6  0x000000000065381c in ?? ()
#7  0x00007f09c27c870a in start_thread (arg=0x7f09c1f09700) at pthread_create.c:333
#8  0x00007f09c22e882d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 2 (Thread 0x7f09c17ff700 (LWP 6681)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x0000000000623717 in ?? ()
#2  0x00007f09c27c870a in start_thread (arg=0x7f09c17ff700) at pthread_create.c:333
#3  0x00007f09c22e882d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 1 (Thread 0x7f09c32ec740 (LWP 6680)):
#0  0x00007f09c27d1fcb in __waitpid (pid=6683, stat_loc=0x7fff61be26cc, options=0) at ../sysdeps/unix/sysv/linux/waitpid.c:29
#1  0x00000000004acd59 in ?? ()
#2  <signal handler called>
#3  0x00007f09c2217428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
#4  0x00007f09c221902a in __GI_abort () at abort.c:89
#5  0x000000000065aae9 in ?? ()
#6  0x000000000065acf7 in ?? ()
#7  0x000000000065ae46 in ?? ()
#8  0x000000000058acf0 in ?? ()
#9  0x000000000058bcb4 in ?? ()
#10 0x00000000419834a1 in ?? ()
#11 0x000000000196efb0 in ?? ()
#12 0x0000000000000000 in ?? ()

=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================

Aborted (core dumped)

I then get the system problem detected saying my "sudo" crashed, which I understand comes from the SIGBART code that is being thrown here, so no harm done. But still, pretty scary stuff.
 
Back
Top Bottom