lloesche / valheim-server-docker

Valheim dedicated gameserver with automatic update, World backup, BepInEx and ValheimPlus mod support
https://hub.docker.com/r/lloesche/valheim-server
Apache License 2.0
1.94k stars 272 forks source link

Had to move to debian10 branch to make latest update work #531

Open jthoel opened 1 year ago

jthoel commented 1 year ago

I have two different docker containers (one in Linode and one at home, both debian 10.13 based) and using the "latest" branch I was having a number of the thread locked and failed to update issues. moving to the debian10 branch and letting it recreate, it pulled the new version with no problems, and migrated the worlds.

I can help with some further testing if needed and older log files, but just wanted to put this here as an FYI if anyone else is having issues with upgrade problems, crashes and an inability to redeploy and take the new version.

LeventeHudak commented 1 year ago

Had the same thread lock issue and had been using the debian10 branch too without any issues. Yesterday suddenly it started acting up, not sure why. Attached all the logs of a fresh start (with already downloaded server files). Server won't show up at all, can't connect to it not even from LAN.

Edit1.: Using a 1621+ Synology NAS with 32GB of RAM.

lloesche-valheim-server1.csv

lloesche commented 1 year ago

Can you guys check to see how the :latest release behaves? @opello came up with a pretty funky workaround that copies some 32bit libc libraries from Debian 10 into the Debian 11 container, just to make steamcmd run, but everything else is Debian 11. I.e. crossplay and other features that valheim-server uses should work.

I just merged the PR #544 so would appreciate more eyes on it to see if it solves the issue or if it introduces any new ones.

Concretv commented 1 year ago

Can you guys check to see how the :latest release behaves? @opello came up with a pretty funky workaround that copies some 32bit libc libraries from Debian 10 into the Debian 11 container, just to make steamcmd run, but everything else is Debian 11. I.e. crossplay and other features that valheim-server uses should work.

I just merged the PR #544 so would appreciate more eyes on it to see if it solves the issue or if it introduces any new ones.

I can confirm that the :latest image does now work on Synology NAS (tested on DS720+ with last Synology update and latest Valheim update). Server is running and crossplay is working. I had to make a fresh new container though (updating from an old one still lead to kernel hanging). Thank you for keeping this container updated and for all your work !!

jthoel commented 1 year ago

when changed my docker compose from ":debian10" to ":latest" tried to rebuild and run my container, I get a threadtools error and then a segfault.

Dec 23 00:11:45 supervisord: valheim-updater /dev/sda1 /config ext4 rw,relatime,errors=remount-ro 0 0 Dec 23 00:11:45 supervisord: valheim-updater DEBUG - [41] - Valheim updater was just started - skipping connected players check Dec 23 00:11:45 supervisord: valheim-updater INFO - Downloading/updating/validating Valheim server from Steam Dec 23 00:11:45 supervisord: valheim-updater Redirecting stderr to '/home/valheim/Steam/logs/stderr.txt' Dec 23 00:11:45 supervisord: valheim-updater src/tier0/threadtools.cpp (4122) : Probably deadlock or failure waiting for thread to initialize. Dec 23 00:11:45 supervisord: valheim-updater Thread failed to initialize Dec 23 00:11:45 supervisord: valheim-updater [ 0%] Checking for available updates... Dec 23 00:11:45 supervisord: valheim-updater src/tier0/threadtools.cpp (4122) : Probably deadlock or failure waiting for thread to initialize. Dec 23 00:11:45 supervisord: valheim-updater Thread failed to initialize Dec 23 00:11:45 supervisord: valheim-updater CWorkThreadPool::StartWorkThread: Thread creation failed. Dec 23 00:11:45 supervisord: valheim-updater src/tier0/threadtools.cpp (4122) : Probably deadlock or failure waiting for thread to initialize. Dec 23 00:11:45 supervisord: valheim-updater Thread failed to initialize Dec 23 00:11:45 supervisord: valheim-updater CWorkThreadPool::StartWorkThread: Thread creation failed. Dec 23 00:11:45 supervisord: valheim-updater src/tier0/threadtools.cpp (1804) : Thread synchronization object is unuseable Dec 23 00:11:45 supervisord: valheim-updater /opt/steamcmd/steamcmd.sh: line 39: 75 Segmentation fault (core dumped) $DEBUGGER "$STEAMEXE" "$@" Dec 23 00:11:45 supervisord: valheim-updater ERROR - Failed to download Valheim server from Steam - retrying later - check your networking and volume access permissions 2022-12-23 00:11:46,775 INFO success: syslogd entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2022-12-23 00:11:46,775 INFO success: crond entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2022-12-23 00:11:46,775 INFO success: valheim-updater entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

from dmesg "[1301887.903746] steamcmd[2066]: segfault at 68 ip 00000000f7f01a36 sp 00000000ffd53140 error 4 in libpthread-2.31.so[f7ef7000+11000] "

putting it back and rebuilding "docker-compose up -d --force-recreate val_htp; docker logs --follow val_htp" brings the container up, rebuilds, grabs the updates and is connectable.

for reference, this is a debian 10 install on esxi. 'root@valheim:/opt/docker# uname -a Linux valheim 4.19.0-22-amd64 #1 SMP Debian 4.19.260-1 (2022-09-29) x86_64 GNU/Linux'

I have another debian 10 install in the cloud I can test if you want.

opello commented 1 year ago

This is interesting because the stack trace shows libpthread-2.31 (so libc-2.31) and in :latest it should be 2.28 for i386 and 2.31 for x86_64.

I stood up a Debian 10.13 vm in VirtualBox but did not have this problem. Can you try the following as a test?

vm@debian10:~$ docker run --rm -it lloesche/valheim-server:latest bash
root@e3614e40b29c:/# /opt/steamcmd/steamcmd.sh
Redirecting stderr to '/root/Steam/logs/stderr.txt'
[  0%] Checking for available updates...
[----] Verifying installation...
[  0%] Downloading update...
[  0%] Checking for available updates...
[----] Download complete.
[----] 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...
Redirecting stderr to '/root/Steam/logs/stderr.txt'
[  0%] Checking for available updates...
[----] Verifying installation...
Steam Console Client (c) Valve Corporation - version 1669935972
-- type 'quit' to exit --
Loading Steam API...OK

Steam>quit
root@e3614e40b29c:/#