"-keepfiles" crashes the server and leaves the virtual server unrecoverable

serversnapshotdeploy -keepfiles crashes the server and leaves the virtual server unrecoverable

Version: TeamSpeak Server 6.0.0-beta12.1 [Build: 1785239375], running in Docker
Host: Linux 6.18.33.2-microsoft-standard-WSL2 x86_64 (Docker Desktop), MariaDB 12.3.3 (database plugin “MariaDB plugin, version 3”)
Interface: SSH query (port 10022), logged in as serveradmin
License: none (“No License”, max virtualservers: 1)

Steps to reproduce

  1. Run a server with a single virtual server (sid 1). In the tries below it held a few channels and one or two connected clients.
  2. Optional: upload a file to a channel. Try 3 crashed with a file stored in the Default Channel.
  3. Send the following over the SSH query:
    use sid=1
    serversnapshotcreate
    serversnapshotdeploy -keepfiles version=3 data=<data returned by serversnapshotcreate>
    
    In try 3 the deploy command was sent exactly as the query documentation shows it, with the data passed on unchanged.

Expected

The snapshot is deployed. The files of channels that exist both on the server and in the snapshot are kept, as the documentation of -keepfiles describes.

Actual

  • serversnapshotdeploy never answers.
  • Within seconds the server process crashes:
    |VirtualServerBase|1  |stopped
    
    TeamSpeak server has crashed. A crashdump has been generated at "/var/tsserver/crashdumps/tsserver_6_0_0-beta12_1_linux_amd64_<timestamp>.dmp"
    
    In try 3 the container exited with code 139 (SIGSEGV).
  • After the automatic restart, virtual server 1 cannot be loaded:
    |ERROR   |VirtualServer |1  |VIRTUALSERVER_DEFAULT_SERVER_GROUP points to 0
    |ERROR   |VirtualSvrMgr |   |loading VirtualServer(1) failed to start, error: invalid group ID
    
  • From then on the virtual server is lost:
    • serverlist -all shows it offline, with an empty virtualserver_name.
    • use sid=1 -virtual fails with error id=2560 msg=invalid group ID, and the server log adds startServer() VirtualServer(1) failed to start, error: invalid group ID.
    • serverdelete sid=1, also with -noevent, fails with error id=1281 msg=database empty result set. This was tried after try 1 only.
  • The only way to recover was wiping the database and setting the server up again.
  • After try 1, while the virtual server hung in deploy running, its WebQuery API key was rejected with 5122 invalid apikey. This was not checked after tries 2 and 3.

Narrowing down

Every try created its own snapshot with serversnapshotcreate immediately before deploying it.

Try Restart right before -keepfiles File in a channel Result
1 yes yes (after the parameters, with -mapping) no hung in deploy running for over 20 minutes; after a container restart the virtual server could not start (same errors as above)
2 no yes (after the parameters, with -mapping) no server crashed, crashdump written, virtual server unrecoverable
3 no yes (documented form: option first, no -mapping) yes, one CSV file server crashed within seconds (exit code 139), virtual server unrecoverable
4 no no (-mapping) not checked ok in about 1 s
5 yes, deploy at uptime 0 no (-mapping) yes, one CSV file ok in 0.8 s; the file was no longer listed afterwards, as documented

Before tries 2 and 3, a deploy without -keepfiles had already succeeded on the same server (tries 4 and 5).

Deploys without -keepfiles succeeded every time. The snapshot of try 1 was checked: it decompresses cleanly, has all sections, and its default groups point to groups it contains.

Log of try 3 (UTC)

The container exited with code 139 (SIGSEGV) and was restarted by Docker:

teamspeak6-01  | TeamSpeak server has crashed. A crashdump has been generated at "/var/tsserver/crashdumps/tsserver_6_0_0-beta12_1_linux_amd64_1789392034.dmp"
teamspeak6-db  | 2026-09-14 13:20:37 15 [Warning] Aborted connection 15 to db: 'teamspeak' user: 'teamspeak' host: '172.20.0.3' (Got an error reading communication packets)
(the same warning for connections 6 to 14)
teamspeak6-01 exited with code 139 (restarting)
teamspeak6-01  | 2026-09-14 13:20:37.940245|INFO    |ServerLibPriv |   |TeamSpeak Server 6.0.0-beta12.1 (2026-07-28 11:49:35)
...
teamspeak6-01  | 2026-09-14 13:20:38.760266|ERROR   |VirtualServer |1  |VIRTUALSERVER_DEFAULT_SERVER_GROUP points to 0
teamspeak6-01  | 2026-09-14 13:20:38.760370|ERROR   |VirtualSvrMgr |   |loading VirtualServer(1) failed to start, error: invalid group ID
teamspeak6-01  | 2026-09-14 13:20:38.763993|INFO    |VirtualServerBase|1  |stopped
teamspeak6-01  | 2026-09-14 13:21:04.760524|ERROR   |VirtualServer |1  |VIRTUALSERVER_DEFAULT_SERVER_GROUP points to 0
teamspeak6-01  | 2026-09-14 13:21:04.760604|ERROR   |VirtualSvrMgr |   |startServer() VirtualServer(1) failed to start, error: invalid group ID
teamspeak6-01  | 2026-09-14 13:21:04.765159|INFO    |VirtualServerBase|1  |stopped

The last three lines come from use sid=1 -virtual.

Crash dumps

Two crash dumps are available:

  • tsserver_6_0_0-beta12_1_linux_amd64_1789390089.dmp (try 2)
  • tsserver_6_0_0-beta12_1_linux_amd64_1789392034.dmp (try 3)

They are not attached because they may contain credentials. I can send them privately on request.


Note: This analysis was put together with the help of an AI assistant (Claude). It ran the query commands against my test server while developing a ServerQuery tool, and collected the results in one place. The server logs are copied from my own Docker output. Everything marked “not checked” was not verified.

Thanks for the detailed report.

I was able to reproduce the crash and will forward it to the devs to investigate. :slight_smile:

This issue should be fixed with the latest server version.

The issue is fixed now, thanks to you and the devs :slight_smile: