Solved TeamSpeak 3 Server Core Dumps - Troubleshooting?

Hey gang -

I'm trying to set up a new TS3 server within a 12.2 jail. The moment I attempt to run the server binary, it dumps core. The logs aren't showing anything useful at all, but the core file is there in all its glory.

I've posted to TeamSpeak's forums and asked for guidance. While I wait, are there things I can look into to try and figure out what's causing the binary to core? Bear in mind I'm not a developer and so running through things like gdb might be a bit challenging for me. Any guidance offered would be appreciated.

Thanks!
 
Is this a Linux binary? You're going to have to use a debugger if a core is all you have.
No, it's a FreeBSD binary from their download site.

Apparently this is a jail thing and it has something to do with the database libraries/plugins they ship with it. When the process on the jail tries to do anything DB related, it cores out. If I run it from the jail host, it works fine. Clearly not ideal and I'm not going to do that.
 
Hello,

do you already have tried the port? audio/teamspeak3-server
No. And until someone puts together an all-encompassing package for it, I'm not going to. I despise building stuff off ports when binaries are available. It's a "time" thing. ;-)

This works on the host, it doesn't work in the jail. Somerthing's up WRT the jail when it comes to the DB access. That's what I need help figuring out.
 
Super cool of them to support Freebsd. It just ran for me after I created a .ts3server_license_accepted file:
Code:
Downloads/temp/teamspeak3-server_freebsd_amd64 $ ./ts3server                                                                                  
2021-04-25 17:20:55.289034|INFO    |ServerLibPriv |   |TeamSpeak 3 Server 3.13.3 (2020-12-16 14:17:05)
2021-04-25 17:20:55.289396|INFO    |ServerLibPriv |   |SystemInformation: FreeBSD 12.2-RELEASE-p3 FreeBSD 12.2-RELEASE-p3 GENERIC amd64 Binary: 64bit
2021-04-25 17:20:55.289431|WARNING |ServerLibPriv |   |The system locale is set to "C" this can cause unexpected behavior. We advice you to repair your locale!
2021-04-25 17:20:55.289831|INFO    |DatabaseQuery |   |dbPlugin name:    SQLite3 plugin, Version 3, (c)TeamSpeak Systems GmbH
2021-04-25 17:20:55.289861|INFO    |DatabaseQuery |   |dbPlugin version: 3.11.1
2021-04-25 17:20:55.290030|INFO    |DatabaseQuery |   |checking database integrity (may take a while)
2021-04-25 17:20:55.298410|INFO    |SQL           |   |db_CreateTables() tables created
...
What does ldd ts3server report in your jail? Here's the output on my system
Code:
ts3server:
    libts3_ssh.so => Downloads/temp/teamspeak3-server_freebsd_amd64/libts3_ssh.so (0x800f28000)
    librt.so.1 => /usr/lib/librt.so.1 (0x801239000)
    libm.so.5 => /lib/libm.so.5 (0x801242000)
    libthr.so.3 => /lib/libthr.so.3 (0x801274000)
    libc++.so.1 => /usr/lib/libc++.so.1 (0x8012a1000)
    libcxxrt.so.1 => /lib/libcxxrt.so.1 (0x80136e000)
    libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x801390000)
    libc.so.7 => /lib/libc.so.7 (0x8013aa000)
Are you trying to use a sqlite database? That's what it created for me. If so, the output of ldd ./libts3db_sqlite3.so might also be useful. Here's what it is on my system:
Code:
./libts3db_sqlite3.so:
    libc++.so.1 => /usr/lib/libc++.so.1 (0x800672000)
    libcxxrt.so.1 => /lib/libcxxrt.so.1 (0x80073f000)
    libm.so.5 => /lib/libm.so.5 (0x800761000)
    libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x800793000)
    libthr.so.3 => /lib/libthr.so.3 (0x8007ad000)
    libc.so.7 => /lib/libc.so.7 (0x80024e000)
 
What does ldd ts3server report in your jail? Here's the output on my system
I should have included that in my OP. Thanks for the kick.

Code:
# ldd ts3server
ts3server:
    libts3_ssh.so => /usr/local/teamspeak3-server_freebsd_amd64/libts3_ssh.so (0x800f28000)
    librt.so.1 => /usr/lib/librt.so.1 (0x801239000)
    libm.so.5 => /lib/libm.so.5 (0x801242000)
    libthr.so.3 => /lib/libthr.so.3 (0x801274000)
    libc++.so.1 => /usr/lib/libc++.so.1 (0x8012a1000)
    libcxxrt.so.1 => /lib/libcxxrt.so.1 (0x80136e000)
    libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x801390000)
    libc.so.7 => /lib/libc.so.7 (0x8013aa000)

I tried with the default SQLite DB, but it cored. Then I tried with a remote MariaDB, and that still cores. However,

Code:
ldd ./libts3db_mariadb.so
./libts3db_mariadb.so:
    libmariadb.so.2 => /usr/local/teamspeak3-server_freebsd_amd64/libmariadb.so.2 (0x80100e000)
    libm.so.5 => /lib/libm.so.5 (0x80067a000)
    libc++.so.1 => /usr/lib/libc++.so.1 (0x8006ac000)
    libcxxrt.so.1 => /lib/libcxxrt.so.1 (0x800779000)
    libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x80079b000)
    libthr.so.3 => /lib/libthr.so.3 (0x8007b5000)
    libc.so.7 => /lib/libc.so.7 (0x80024e000)
 
I hadn't messed with jails in a while. This was a nice refresher. The core dump seems to be caused by the absence of /usr/local/share/certs/ca-root-nss.crt
Code:
truss ./ts3server
...
open("/usr/local/share/certs/ca-root-nss.crt",O_RDONLY,0666) ERR#2 'No such file or directory'
sigprocmask(SIG_SETMASK,{ SIGHUP|SIGINT|SIGQUIT|SIGILL|SIGTRAP|SIGEMT|SIGFPE|SIGKILL|SIGBUS|SIGSEGV|SIGSYS|SIGPIPE|SIGALRM|SIGTERM|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXFSZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2 },0x0) = 0 (0x0)
thr_self(0x7fffffffcd50)             = 0 (0x0)
thr_kill(101824,SIGABRT)             = 0 (0x0)
SIGNAL 6 (SIGABRT) code=SI_LWP pid=15900 uid=1001
compat11.kevent(25,0x0,0,0x7fffdf2f49a0,128,{ 300.000000000 }) ERR#4 'Interrupted system call'
<thread 101333 exited>
<thread 101325 exited>
<thread 101330 exited>
<thread 101331 exited>
<thread 101332 exited>
<thread 101334 exited>
<thread 101324 exited>
<thread 101323 exited>
<thread 101322 exited>
<thread 101321 exited>
<thread 101320 exited>
<thread 101328 exited>
process killed, signal = 6 (core dumped)
A pkg install ca_root_nss solved the core dump problem. Now it fails with a different error:
Code:
2021-04-25 19:05:57.142189|ERROR   |FileManager   |   |bind failed on [::]:30033; reason: Protocol not supported
2021-04-25 19:05:57.142222|ERROR   |FileManager   |   |filetransfer bind failed on :::30033; reason: Protocol not supported
2021-04-25 19:05:57.142263|CRITICAL|VirtualSvrMgr |   |Could not start file manager 258 no network port available
Hopefully you know what that's about.

Edit: The only dependency for the port Alexander88207 mentioned is precisely security/ca_root_nss. I should've looked at audio/teamspeak3-server first!
 
I hadn't messed with jails in a while. This was a nice refresher. The core dump seems to be caused by the absence of /usr/local/share/certs/ca-root-nss.crt
Thank you. That seemed to do the trick. I have a functioning TS3 server in a jail now.
 
Back
Top