core-keeper-dedicated icon indicating copy to clipboard operation
core-keeper-dedicated copied to clipboard

Server crash - Segmentation faul

Open Kogs opened this issue 1 year ago • 20 comments

Hey starting today our server started crashing.

There isn't much in the log, only this. ./launch.sh: line 97: 86 Segmentation fault (core dumped) DISPLAY=:99 LD_LIBRARY_PATH="$LD_LIBRARY_PATH:../Steamworks SDK Redist/linux64/" ./CoreKeeperServer "${params[@]}"

worlds.zip

If you need any more information, feel free to let me know.

Kogs avatar Sep 06 '24 23:09 Kogs

Can you attach the CoreKeeperLog.txt located in the ~/core-keeper-dedicated/ folder?

Makerblaker avatar Sep 06 '24 23:09 Makerblaker

There is no stack trace in there. I guess it was overwritten instantly because the server restarted on its own. Maybe its still useful: CoreKeeperServerLog.txt

Is there a place where the previous log is stored? I couldn't find anything.

Kogs avatar Sep 07 '24 01:09 Kogs

Not that I am aware of. When the server starts, it overwrites the file. This is the behaviour of Core Keeper, not Docker.

Makerblaker avatar Sep 07 '24 13:09 Makerblaker

FWIW, I changed the discord env variable in the config to 0 and it started up properly. When I had this on, it caused the segfault.

mattsepela avatar Sep 07 '24 17:09 mattsepela

It starts just fine. Discord integration is already disabled. I'll keep an eye out if it crashes again maybe I can get the log. But I think it is not related to docker here and is probably just a bug in the game.

Kogs avatar Sep 07 '24 18:09 Kogs

I am having the same issue, but setting DISCORD=0 did not fix it

defib avatar Sep 08 '24 17:09 defib

I am having the same issue, but setting DISCORD=0 did not fix it

Could you send a copy of your CoreKeeperServerLog.txt?

Makerblaker avatar Sep 08 '24 17:09 Makerblaker

I am having the same issue, but setting DISCORD=0 did not fix it

Same here.

_corekeeper-core-keeper-1_logs.txt CoreKeeperServerLog.txt

Mok-sea avatar Sep 10 '24 20:09 Mok-sea

I had issues with this when trying to mount specific folders within the container. Certain paths worked, and other's didnt.

CooperWallace avatar Sep 12 '24 03:09 CooperWallace

Is there a solution to this problem? I set DISCORD=0 and that didn't solve the problem Could this be a problem with the image system version? I looked at CoreKeeperServerLog.txt, which says NullReferenceException and Signal 11, and CoreKeeperServer has no missing dependencies.

dvchdbfhjd avatar Sep 12 '24 14:09 dvchdbfhjd

Is there a solution to this problem? I set DISCORD=0 and that didn't solve the problem Could this be a problem with the image system version? I looked at CoreKeeperServerLog.txt, which says NullReferenceException and Signal 11, and CoreKeeperServer has no missing dependencies.

Can you pull down a fresh image? Core-Keeper did release an update that required a rebuild of the container.

Makerblaker avatar Sep 12 '24 15:09 Makerblaker

Hello same here, Linux headless on debian 12 :

core-keeper-1 | ./launch.sh: line 80: 80 Segmentation fault (core dumped) DISPLAY=:99 LD_LIBRARY_PATH="$LD_LIBRARY_PATH:../Steamworks SDK Redist/linux64/" ./CoreKeeperServer "${params[@]}"

First time running the container. No files are being created inside ./data dir

I have this docker compose

services:
  core-keeper:
    image: escaping/core-keeper-dedicated
    volumes:
      - server-files:/home/steam/core-keeper-dedicated
      - ./data:/home/steam/core-keeper-data
    env_file:
      - ./core.env
    restart: always
    stop_grace_period: 2m
volumes:
    server-files:

core.env

WORLD_INDEX=0
WORLD_NAME=Djo
WORLD_SEED=0
WORLD_MODE=0
GAME_ID=
DATA_PATH=/home/steam/core-keeper-data
DISCORD=0
MAX_PLAYERS=10
SEASON=-1
SERVER_IP=0.0.0.0
SERVER_PORT=27015

Also, weirdly, not using volumes makes the server not even able to try to launch (file not found). No files will be written to "real" directories.

Write avatar Sep 12 '24 16:09 Write

I finally managed to use the container, but I'm forced to use volumes and can't bind to real file system directories. For example using - ./data:/home/steam/core-keeper-data is not possible and would make the server segfault as it can't find world data.

Maybe an GUID/UID issue that prevents files from being written / read when using real directories ?

Settings directories to uid/guid 1000 on host system doesn't solve the issue, evne though "steam" user (inside the docker container) is indeed puid/guid 1000.

Doing docker exec -it --user=steam corekeeper-core-keeper-1 /bin/bash and "touch somefile" in ~/core-keeper-data works fine and are shown on host system.

So far I'm not able to understand why no other file can be written to these directories when not using volumes.

Write avatar Sep 12 '24 16:09 Write

@Write Sounds like a problem of the file authorisation on the host system. Could you please check the owner of the directory ./data using ls -lisa on the host?

Micke90s avatar Sep 12 '24 16:09 Micke90s

@Write Sounds like a problem of the file authorisation on the host system. Could you please check the owner of the directory ./data using ls -lisa on the host?

Owner is "'ubuntu" which is user 1000 on my host.

User steam inside the container is user 1000.

Doing docker exec -it --user=steam corekeeper-core-keeper-1 /bin/bash -c 'touch ~/core-keeper-data/test' does work and indicate that user steam can indeed write to the directory as the file appears on host.

Write avatar Sep 12 '24 17:09 Write

Other than that, using only volumes right now. Played one hour or so, and I also have the Segfault issue randomly.

I Will post the CoreKeeperServerLog.txt asap.

Write avatar Sep 13 '24 05:09 Write

I have been trying to get a linux server spun up for core keeper for the past 5 hours with several different methods, still can't get it to work on ubuntu even with this docker image. Seg fault "ck-server kernel: [ 4219.550173] CoreKeeperServe[26747]: segfault at 0 ip 000000004121a756 sp 00007ffc7c303dc0 error 4 likely on CPU 0 (core 0, socket 0)"

sirsikes777 avatar Sep 14 '24 06:09 sirsikes777

Not sure if this helps for you, but changing line 15 in entry.sh from exec bash "./launch.sh" to exec bash "./core-keeper-dedicated/_launch.sh" solved the problem for me. It failed every time when running launch.sh, but running the _launch.sh file in the core-keeper-dedicated folder worked better for me.

perandersson avatar Sep 17 '24 19:09 perandersson

The problem for me was permissions on the mounted volume (-v flag for docker).

The user inside the container, by default, is steam with the UID and GUID of 1000. In my case, I had to

chown 1000:1000 /var/game-data/corekeeper

in order to run the container with

docker run ... -v /var/game-data/corekeeper:/home/steam/core-keeper-data ...

sdedovic avatar Sep 19 '24 03:09 sdedovic

For me the problem was trying to use SERVER_IP and SERVER_PORT:

SERVER_IP=<my-ip-address>
SERVER_PORT=15000

Reverting this to empty values fixed the issue with segfaults:

SERVER_IP=
SERVER_PORT=

nyxi avatar Sep 19 '24 20:09 nyxi