box64 icon indicating copy to clipboard operation
box64 copied to clipboard

Don't Starve Together Server crashes when loading Mods

Open Targunitoth opened this issue 2 years ago • 2 comments

Hello, Thank you for the work you put into this.

I want to run a Don't Starve Together Server with mods. Running DST without mods is working fine so far.

Here are the basics:

# Output of uname -a
Linux test-server 5.4.17-2136.309.5.1.el8uek.aarch64 #2 SMP Fri Aug 5 10:08:56 PDT 2022 aarch64 aarch64 aarch64 GNU/Linux

I installed steamcmd via schroot and qemu-i386-static, before I discovered box64 and box86 sudo schroot --chroot=debian-armhf and

#!/bin/sh

export LD_LIBRARY_PATH="/opt/linux32:$LD_LIBRARY_PATH"
export CPU_MHZ="2000"

qemu-i386-static /opt/linux32/steamcmd +@ShutdownOnFailedCommand 1 +@NoPromptForPassword 1 +force_install_dir /opt/steam/DST +login anonymous +app_update 343050 validate +quit

I can start the server with /root/box64/build/box64 /opt/steam/DST/bin64/dontstarve_dedicated_server_nullrenderer_x64 -cluster "MyDediServer" and everything works fine.

The trouble starts when I want to add Mods to my server. DST allows to automatically download mods via the steam workshop. I changed the file /opt/steam/DST/mods/dedicated_server_mods_setup.lua and added the following line:

ServerModSetup("378160973")

This is the output with the crash:

#/root/box64/build/box64 ./dontstarve_dedicated_server_nullrenderer_x64 -only_update_server_mods
Dynarec for ARM64, with extension: ASIMD AES CRC32 PMULL ATOMICS PageSize:65536
Box64 with Dynarec v0.1.9 642260b built on Aug 10 2022 04:45:32
Using default BOX64_LD_LIBRARY_PATH: ./:lib/:lib64/:x86_64/:bin64/:libs64/
Using default BOX64_PATH: ./:bin/
Counted 25 Env var
Looking for ./dontstarve_dedicated_server_nullrenderer_x64
Dontstarve* detected, forcing emulated SDL2
argv[1]="-only_update_server_mods"
Rename process to "dontstarve_dedicated_server_nullrenderer_x64"
Using emulated ./lib64/libSDL2-2.0.so.0
Using native(wrapped) libcurl-gnutls.so.4
Using native(wrapped) librt.so.1
Using native(wrapped) libpthread.so.0
Using emulated ./lib64/libfmodevent64.so
Using emulated ./lib64/libfmodex64.so
Using emulated ./lib64/libsteam_api.so
Using emulated /lib/x86_64-linux-gnu/libstdc++.so.6
Using native(wrapped) libm.so.6
Using emulated /lib/x86_64-linux-gnu/libgcc_s.so.1
Using native(wrapped) libc.so.6
Using native(wrapped) ld-linux-x86-64.so.2
Using native(wrapped) libdl.so.2
Using emulated ./lib64/libfmodex64-4.44.64.so
[00:00:00]: PersistRootStorage is now ..klei//DoNotStarveTogether/Cluster_1/Master/
[00:00:00]: Starting Up
[00:00:00]: Version: 518333
[00:00:00]: Current time: Sun Aug 14 12:34:39 2022

[00:00:00]: System Name: Linux
[00:00:00]: Host Name: test-server
[00:00:00]: Release(Kernel) Version: 5.4.17-2136.309.5.1.el8uek.aarch64
[00:00:00]: Kernel Build Timestamp: #2 SMP Fri Aug 5 10:08:56 PDT 2022
[00:00:00]: Machine Arch: x86_64
[00:00:00]: Don't Starve Together: 518333 LINUX
[00:00:00]: Build Date: 1240
[00:00:00]: Mode: 64-bit
[00:00:00]: Parsing command line
[00:00:00]: Command Line Arguments: -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]: Mounting file system databundles/shaders.zip successful.
[00:00:00]: Mounting file system databundles/fonts.zip successful.
[00:00:00]: THREAD - started 'GAClient' (281471659405328)
[00:00:00]: CurlRequestManager::ClientThread::Main()
[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, 27016)
Using emulated /opt/steam/DST/bin64/lib64/steamclient.so
[S_API] SteamAPI_Init(): Loaded local 'steamclient.so' OK.
CAppInfoCacheReadFromDiskThread took 0 milliseconds to initialize
1349044|SIGSEGV @0xffff21bf6770 (???(0xffff21bf6770)) (x64pc=0xffff328d7029//opt/steam/DST/bin64/lib64/steamclient.so:"/opt/steam/DST/bin64/lib64/steamclient.so + 0x877029", rsp=0xffff2d7cfc50, stack=0xffff2d6d0000:0xffff2d7d0000 own=0xffff2d6d0000 fp=0xffff33fc46c0), for accessing 0xffff00000000 (code=1/prot=0), db=0xffff21d52710(0xffff21bf6770:0xffff21bf67cc/0xffff328d7029:0xffff328d703b//opt/steam/DST/bin64/lib64/steamclient.so + 0x877029:clean, hash:b8e37e2e/b8e37e2e) handler=(nil)
RAX:0x0000ffff33fc46c0 RCX:0x0000000000000000 RDX:0x0000000000000000 RBX:0x0000ffff00000000
RSP:0x0000ffff2d7cfc50 RBP:0x0000ffff00000000 RSI:0x0000000000000028 RDI:0x0000ffff00000000
 R8:0x0000000000000000  R9:0x0000000000000000 R10:0x0000ffff33f0fcb0 R11:0x0000000000000000
R12:0x0000ffff00000000 R13:0x0000ffff00000001 R14:0x0000ffff33fc59d0 R15:0x0000ffff33f89008
RSP-0x20:0x0000ffff00000000 RSP-0x18:0x0000ffff00000000 RSP-0x10:0x0000ffff00000001 RSP-0x08:0x0000ffff328d7029
RSP+0x00:0x0000ffff33f88f40 RSP+0x08:0x0000ffff328db409 RSP+0x10:0x0000000000000003 RSP+0x18:0x0000000000000000
Segmentation fault (core dumped)

Is there maybe a library for the steamclient.so missing? Can you please help me to further debug the problem?

Targunitoth avatar Aug 14 '22 12:08 Targunitoth

Can you run with BOX64_ROLLING_LOG=1 env. var. to have more details at the crash.

ptitSeb avatar Aug 15 '22 08:08 ptitSeb

Here is the BOX64_ROLLING_LOG=1 output:

# /root/box64/build/box64 ./dontstarve_dedicated_server_nullrenderer_x64 -only_update_server_mods
Rolling log, showing last 16 function call on signals
Dynarec for ARM64, with extension: ASIMD AES CRC32 PMULL ATOMICS PageSize:65536
Box64 with Dynarec v0.1.9 642260b built on Aug 10 2022 04:45:32
Using default BOX64_LD_LIBRARY_PATH: ./:lib/:lib64/:x86_64/:bin64/:libs64/
Using default BOX64_PATH: ./:bin/
Counted 41 Env var
Looking for ./dontstarve_dedicated_server_nullrenderer_x64
Dontstarve* detected, forcing emulated SDL2
argv[1]="-only_update_server_mods"
Rename process to "dontstarve_dedicated_server_nullrenderer_x64"
Using emulated ./lib64/libSDL2-2.0.so.0
Using native(wrapped) libcurl-gnutls.so.4
Using native(wrapped) librt.so.1
Using native(wrapped) libpthread.so.0
Using emulated ./lib64/libfmodevent64.so
Using emulated ./lib64/libfmodex64.so
Using emulated ./lib64/libsteam_api.so
Using emulated /lib/x86_64-linux-gnu/libstdc++.so.6
Using native(wrapped) libm.so.6
Using emulated /lib/x86_64-linux-gnu/libgcc_s.so.1
Using native(wrapped) libc.so.6
Using native(wrapped) ld-linux-x86-64.so.2
Using native(wrapped) libdl.so.2
Using emulated ./lib64/libfmodex64-4.44.64.so
[00:00:00]: PersistRootStorage is now /root/.klei//DoNotStarveTogether/Cluster_1/Master/
[00:00:00]: Starting Up
[00:00:00]: Version: 518333
[00:00:00]: Current time: Mon Aug 15 17:00:09 2022

[00:00:00]: System Name: Linux
[00:00:00]: Host Name: test-server
[00:00:00]: Release(Kernel) Version: 5.4.17-2136.309.5.1.el8uek.aarch64
[00:00:00]: Kernel Build Timestamp: #2 SMP Fri Aug 5 10:08:56 PDT 2022
[00:00:00]: Machine Arch: x86_64
[00:00:00]: Don't Starve Together: 518333 LINUX
[00:00:00]: Build Date: 1240
[00:00:00]: Mode: 64-bit
[00:00:00]: Parsing command line
[00:00:00]: Command Line Arguments: -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]: Mounting file system databundles/shaders.zip successful.
[00:00:00]: Mounting file system databundles/fonts.zip successful.
[00:00:00]: THREAD - started 'GAClient' (281472092467216)
[00:00:00]: CurlRequestManager::ClientThread::Main()
[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, 27016)
Using emulated /opt/steam/DST/bin64/lib64/steamclient.so
[S_API] SteamAPI_Init(): Loaded local 'steamclient.so' OK.
CAppInfoCacheReadFromDiskThread took 0 milliseconds to initialize
1704811|0xffff526ffa10: Calling my_syscall (./dontstarve_dedicated_server_nullrenderer_x64)(0xBA, 0xFFFF52DC6913, 0xFFFF52DC6913, ...) => return 0x1A036B
1704811|0xffff526ffa10: Calling my_syscall (./dontstarve_dedicated_server_nullrenderer_x64)(0xBA, 0xFFFF52DC6913, 0xFFFF52DC6913, ...) => return 0x1A036B
1704811|0xffff526ffa10: Calling my_syscall (./dontstarve_dedicated_server_nullrenderer_x64)(0xBA, 0xFFFF52DC6913, 0xFFFF52DC6913, ...) => return 0x1A036B
1704811|0xffff526ffa10: Calling my_syscall (./dontstarve_dedicated_server_nullrenderer_x64)(0xBA, 0xFFFF52DC6913, 0xFFFF52DC6913, ...) => return 0x1A036B
1704811|0xffff526ffa10: Calling my_syscall (./dontstarve_dedicated_server_nullrenderer_x64)(0xBA, 0xFFFF52DC6913, 0xFFFF52DC6913, ...) => return 0x1A036B
1704811|0xffff526ffa10: Calling my_syscall (./dontstarve_dedicated_server_nullrenderer_x64)(0xBA, 0xFFFF52DC6913, 0xFFFF52DC6913, ...) => return 0x1A036B
1704811|0xffff526ffa10: Calling my_syscall (./dontstarve_dedicated_server_nullrenderer_x64)(0xBA, 0xFFFF52DC6913, 0xFFFF52DC6913, ...) => return 0x1A036B
1704811|0xffff526ffa10: Calling my_syscall (./dontstarve_dedicated_server_nullrenderer_x64)(0xBA, 0xFFFF52DC6913, 0xFFFF52DC6913, ...) => return 0x1A036B
1704811|0xffff526ffa10: Calling my_syscall (./dontstarve_dedicated_server_nullrenderer_x64)(0xBA, 0xFFFF52DC6913, 0xFFFF52DC6913, ...) => return 0x1A036B
1704811|0xffff526ffa10: Calling my_syscall (./dontstarve_dedicated_server_nullrenderer_x64)(0xBA, 0xFFFF52DC6913, 0xFFFF52DC6913, ...) => return 0x1A036B
1704811|0xffff526ffa10: Calling my_syscall (./dontstarve_dedicated_server_nullrenderer_x64)(0xBA, 0xFFFF52DC6913, 0xFFFF52DC6913, ...) => return 0x1A036B
1704811|0xffff526ffa10: Calling my_syscall (./dontstarve_dedicated_server_nullrenderer_x64)(0xBA, 0xFFFF52DC6913, 0xFFFF52DC6913, ...) => return 0x1A036B
1704811|0xffff526ffa10: Calling my_syscall (./dontstarve_dedicated_server_nullrenderer_x64)(0xBA, 0xFFFF52DC6913, 0xFFFF52DC6913, ...) => return 0x1A036B
1704811|0xffff526ffa10: Calling my_syscall (./dontstarve_dedicated_server_nullrenderer_x64)(0xBA, 0xFFFF52DB4259, 0xFFFF52DB4259, ...) => return 0x1A036B
1704811|0xffff526ffa10: Calling my_syscall (./dontstarve_dedicated_server_nullrenderer_x64)(0xBA, 0xFFFF52DB4259, 0xFFFF52DB4259, ...) => return 0x1A036B
1704811|0xffff526ffa10: Calling my_syscall (./dontstarve_dedicated_server_nullrenderer_x64)(0xBA, 0xFFFF52DC6913, 0xFFFF52DC6913, ...) => return 0x1A036B
1704811|SIGSEGV @0xffff39bb6914 (???(0xffff39bb6914)) (x64pc=0xffff51ef7029//opt/steam/DST/bin64/lib64/steamclient.so:"/opt/steam/DST/bin64/lib64/steamclient.so + 0x877029", rsp=0xffff477cfc50, stack=0xffff476d0000:0xffff477d0000 own=0xffff476d0000 fp=0xffff535e46c0), for accessing 0xffff00000000 (code=1/prot=0), db=0xffff39d124a0(0xffff39bb6914:0xffff39bb6970/0xffff51ef7029:0xffff51ef703b//opt/steam/DST/bin64/lib64/steamclient.so + 0x877029:clean, hash:b8e37e2e/b8e37e2e) handler=(nil)
RAX:0x0000ffff535e46c0 RCX:0x0000000000000000 RDX:0x0000000000000000 RBX:0x0000ffff00000000
RSP:0x0000ffff477cfc50 RBP:0x0000ffff00000000 RSI:0x0000000000000028 RDI:0x0000ffff00000000
 R8:0x0000000000000000  R9:0x0000000000000000 R10:0x0000ffff5352fcb0 R11:0x0000000000000000
R12:0x0000ffff00000000 R13:0x0000ffff00000001 R14:0x0000ffff535e59d0 R15:0x0000ffff535a9008
RSP-0x20:0x0000ffff00000000 RSP-0x18:0x0000ffff00000000 RSP-0x10:0x0000ffff00000001 RSP-0x08:0x0000ffff51ef7029
RSP+0x00:0x0000ffff535a8f40 RSP+0x08:0x0000ffff51efb409 RSP+0x10:0x0000000000000003 RSP+0x18:0x0000000000000000
Segmentation fault (core dumped)

But it doesn't seem very helpful for me, so I added the BOX64_LOG=3, too: https://drive.google.com/file/d/18jrtVwLuVMN0BCZIre9i-quBQtEspelo/view?usp=sharing

Targunitoth avatar Aug 15 '22 17:08 Targunitoth