Jamesits / docker-dst-server

Don't Starve Together dedicated server in Docker!
https://hub.docker.com/r/jamesits/dst-server
GNU General Public License v2.0
495 stars 99 forks source link

Segmentation fault error. Not starting. Not docker, neither docker-compose #48

Open idchlife opened 2 years ago

idchlife commented 2 years ago
docker run -v ${HOME}/.klei/DoNotStarveTogether:/data -p 10999-11000:10999-11000/udp -p 12346-12347:12346-12347/udp -it jamesits/dst-server:latest
Updating server...
WARNING: setlocale('en_US.UTF-8') failed, using locale: 'C'. International characters may not work.
Redirecting stderr to '/root/Steam/logs/stderr.txt'
[  0%] Checking for available updates...
[----] Downloading update (195 of 53847 KB)...
[  0%] Downloading update (3819 of 53847 KB)...
[  7%] Downloading update (7306 of 53847 KB)...
[ 13%] Downloading update (10043 of 53847 KB)...
[ 18%] Downloading update (12516 of 53847 KB)...
[ 23%] Downloading update (15005 of 53847 KB)...
[ 27%] Downloading update (17487 of 53847 KB)...
[ 32%] Downloading update (20143 of 53847 KB)...
[ 37%] Downloading update (22677 of 53847 KB)...
[ 42%] Downloading update (25176 of 53847 KB)...
[ 46%] Downloading update (27665 of 53847 KB)...
[ 51%] Downloading update (30159 of 53847 KB)...
[ 56%] Downloading update (32641 of 53847 KB)...
[ 60%] Downloading update (35512 of 53847 KB)...
[ 65%] Downloading update (36756 of 53847 KB)...
[ 68%] Downloading update (38002 of 53847 KB)...
[ 70%] Downloading update (39371 of 53847 KB)...
[ 73%] Downloading update (40615 of 53847 KB)...
[ 75%] Downloading update (41859 of 53847 KB)...
[ 77%] Downloading update (43104 of 53847 KB)...
[ 80%] Downloading update (44478 of 53847 KB)...
[ 82%] Downloading update (45723 of 53847 KB)...
[ 84%] Downloading update (46967 of 53847 KB)...
[ 87%] Downloading update (48208 of 53847 KB)...
[ 89%] Downloading update (49571 of 53847 KB)...
[ 92%] Downloading update (50815 of 53847 KB)...
[ 94%] Downloading update (52060 of 53847 KB)...
[ 96%] Downloading update (53304 of 53847 KB)...
[ 98%] Downloading update (53847 of 53847 KB)...
[100%] Download complete.
[----] Installing update...
[----] Extracting package...
[----] Extracting package...
[----] Extracting package...
[----] Extracting package...
[----] Installing update...
[----] Installing update...
[----] Installing update...
[----] Installing update...
[----] Installing update...
[----] Installing update...
[----] Installing update...
[----] Installing update...
[----] Cleaning up...
[----] Update complete, launching Steamcmd...
max open descriptors set to 2048
WARNING: setlocale('en_US.UTF-8') failed, using locale: 'C'. International characters may not work.
Redirecting stderr to '/root/Steam/logs/stderr.txt'
[  0%] Checking for available updates...
[----] Verifying installation...
Steam Console Client (c) Valve Corporation - version 1642451655
-- type 'quit' to exit --
Loading Steam API...OK
@ShutdownOnFailedCommand 1
"@ShutdownOnFailedCommand" = "1"
@NoPromptForPassword 1
"@NoPromptForPassword" = "1"

Connecting anonymously to Steam Public...OK
Waiting for client config...OK
Waiting for user info...OK
force_install_dir /opt/dst_server
Please use force_install_dir before logon!
app_update 343050
 Update state (0x3) reconfiguring, progress: 0.00 (0 / 0)
 Update state (0x3) reconfiguring, progress: 0.00 (0 / 0)
 Update state (0x3) reconfiguring, progress: 0.00 (0 / 0)
Warning: failed to init SDL thread priority manager: SDL not found
 Update state (0x61) downloading, progress: 2.30 (11534336 / 502502748)
 Update state (0x61) downloading, progress: 26.37 (132530374 / 502502748)
 Update state (0x61) downloading, progress: 38.28 (192340851 / 502502748)
 Update state (0x61) downloading, progress: 49.88 (250647844 / 502502748)
 Update state (0x61) downloading, progress: 63.77 (320460915 / 502502748)
 Update state (0x61) downloading, progress: 80.43 (404148776 / 502502748)
 Update state (0x61) downloading, progress: 100.00 (502502748 / 502502748)
 Update state (0x81) verifying update, progress: 41.00 (206034162 / 502502748)
 Update state (0x81) verifying update, progress: 89.13 (447869482 / 502502748)
 Update state (0x101) committing, progress: 0.00 (0 / 502502748)
 Update state (0x101) committing, progress: 48.59 (244163038 / 502502748)
Success! App '343050' fully installed.
quit
Updating mods...
[00:00:00]: PersistRootStorage is now /data//DoNotStarveTogether/Cluster_1/Master/
[00:00:00]: Starting Up
[00:00:00]: Version: 494138
[00:00:00]: Current time: Sat Feb  5 13:08:48 2022

[00:00:00]: System Name: Linux
[00:00:00]: Host Name: 070f96500c13
[00:00:00]: Release(Kernel) Version: 3.10.0-957.27.2.el7.x86_64
[00:00:00]: Kernel Build Timestamp: #1 SMP Mon Jul 29 17:46:05 UTC 2019
[00:00:00]: Machine Arch: x86_64
[00:00:00]: Don't Starve Together: 494138 LINUX
[00:00:00]: Build Date: 7659
[00:00:00]: Mode: 32-bit
[00:00:00]: Parsing command line
[00:00:00]: Command Line Arguments: -persistent_storage_root /data -ugc_directory /data/ugc -only_update_server_mods
[00:00:00]: Initializing distribution platform
[00:00:00]: ....Done
[00:00:00]: Mounting file system databundles/klump.zip successful.
[00:00:00]: THREAD - started 'GAClient' (4130233152)
[00:00:00]: CurlRequestManager::ClientThread::Main()
[00:00:00]: Mounting file system databundles/shaders.zip successful.
[00:00:00]: Mounting file system databundles/fonts.zip successful.
[00:00:00]: Mounting file system databundles/anim_dynamic.zip successful.
[00:00:00]: Mounting file system databundles/bigportraits.zip successful.
[00:00:00]: Mounting file system databundles/images.zip successful.
[00:00:00]: Mounting file system databundles/scripts.zip successful.
[00:00:00]: [Steam] SteamGameServer_Init(10999, 12346)
[S_API] SteamAPI_Init(): Loaded local 'steamclient.so' OK.
CAppInfoCacheReadFromDiskThread took 0 milliseconds to initialize
Setting breakpad minidump AppID = 322330
[00:00:01]: [Steam] SteamGameServer_Init success
[00:00:01]: ProfileIndex:3.27
[00:00:01]: [Connect] PendingConnection::Reset(true)
[00:00:01]: THREAD - started 'Ping Job Thread' (4069522240)
[00:00:01]: Platform: 1
[00:00:01]: Network tick rate: U=15(2), D=0
[00:00:01]: Network tick rate: U=15(2), D=0
[00:00:01]: OnLoadPermissionList: /data//DoNotStarveTogether/Cluster_1/blocklist.txt (Success)
[00:00:01]: OnLoadPermissionList: /data//DoNotStarveTogether/Cluster_1/adminlist.txt (Success)
[00:00:01]: OnLoadUserIdList: /data//DoNotStarveTogether/Cluster_1/whitelist.txt (Success)
[00:00:01]: Token retrieved from: /data//DoNotStarveTogether/Cluster_1/cluster_token.txt
[00:00:01]: Token retrieved from: /data//DoNotStarveTogether/Cluster_1/cluster_token.txt
[00:00:01]: cGame::InitializeOnMainThread
[00:00:01]: Renderer initialize: Okay
[00:00:01]: AnimManager initialize: Okay
[00:00:01]: Buffers initialize: Okay
[00:00:01]: cDontStarveGame::DoGameSpecificInitialize()
[00:00:01]: GameSpecific initialize: Okay
[00:00:01]: cGame::StartPlaying
[00:00:01]: THREAD - started 'StreamInput' (4065327936)
[00:00:01]: AppVersion::GetArchitecture() x32
[00:00:01]: LOADING LUA
[00:00:01]: DoLuaFile scripts/main.lua
[00:00:01]: DoLuaFile loading buffer scripts/main.lua
[00:00:01]:   taskgrouplist:    default Together
[00:00:01]:   taskgrouplist:    classic Classic
[00:00:01]:   taskgrouplist:    cave_default    Underground
[00:00:01]:   taskgrouplist:    lavaarena_taskset   The Forge
[00:00:01]:   taskgrouplist:    quagmire_taskset    The Gorge
[00:00:01]: running main.lua

[00:00:01]: loaded modindex
[00:00:01]: ModIndex: Beginning normal load sequence for dedicated server.

[00:00:01]: FinishDownloadingServerMods Complete!
src/vstdlib/strtools.cpp (990) : pDest != NULL
src/vstdlib/strtools.cpp (990) : pDest != NULL
Segmentation fault
Error on line 71; RET 139.
Jamesits commented 2 years ago

Please identify your Linux distro name & version, Linux kernel version (uname -a), Docker version (docker info), CPU model (lscpu).

idchlife commented 2 years ago

@Jamesits

CentOS Linux 7 Linux CentOS-76-64-minimal 3.10.0-957.27.2.el7.x86_64 #1 SMP Mon Jul 29 17:46:05 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Docker Server Version: 20.10.4

CPU: Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit

Jamesits commented 2 years ago

Hmmm I genuinely have no idea. Have you tried running the server without Docker (following the official guides)?

Jamesits commented 2 years ago

I have good news and bad news. The good news is that I can reproduce this exact bug; the bad news is that in every 2 runs of the server in my environment, only 1 will trigger this bug, while all the config, envs, etc. are exactly the same.

theAkito commented 2 years ago

I have good news and bad news. The good news is that I can reproduce this exact bug; the bad news is that in every 2 runs of the server in my environment, only 1 will trigger this bug, while all the config, envs, etc. are exactly the same.

Did you compare both logs, line by line?

I see a lot of warnings and other hiccups during the initialisation process, when looking at the provided log. Maybe one problem is only appearing during the faulty startup, when the segmentation fault happens.

Jamesits commented 2 years ago

Still no clue on why the segfault happens (I think there are some strange issues in a library which need further investigation); but if you have time, please try the 64-bit version of the server and see if it helps.

  1. Update to the latest image (docker pull jamesits/dst-server)
  2. prepend -e "DST_SERVER_ARCH=amd64" to the docker run command
Jamesits commented 2 years ago

Can still occasionally reproduce this bug on either x86 and amd64 version. Still no clue on how this is happening...

AkaCyberRat commented 1 year ago

Hi, I ran into the same problem today. I initially started everything by default - the server crashed on this error. Added a server token - the container crashed on the same error. Then I added this environment variable DST_SERVER_ARCH=amd64 to the docker-compose file and everything worked.

Linux 4.15.0-200-generic #211-Ubuntu SMP Thu Nov 24 18:16:04 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit

KanraTaro commented 1 year ago

So, I just found this a couple of days ago but hadn't been able to get it running bc of the exact same issue, even after adding the DST_SERVER_ARCH=amd64 -e variable, but I noticed @Jamesits updated the nightly about 16 hours ago and switched to it and everything has been working perfectly since.

I'm currently running it in a Debian VM on Proxmox:

VM: Debian 5.10.158-2 (2022-12-13) x86_64 GNU/Linux Docker Server Version: 20.10.5