Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better compatibility for ARM64 hosts #464

Merged

Conversation

sonroyaalmerol
Copy link
Contributor

@sonroyaalmerol sonroyaalmerol commented Feb 27, 2024

Context

Choices

  • Add qemu-i386-static binary to the base image. This would mean going back to my base image as the current one does not have the said binary.
  • Add ARM_COMPATIBILITY_MODE as an env option instead of changing the default to avoid breaking changes. Moving away from Box86 as default will also mean significantly slower build times so it would not be ideal for the test CI.
  • ARM_COMPATIBILITY_MODE might allow you to proceed despite not having 4k page size. However, it is not a guarantee. It's the best option we currently have if we want to expand compatibility.
  • Move page size checker within the InstallServer function as it is only relevant when steamcmd is executed to close QNAP NAS - Container Station - Trouble getting Server up and Running on a ARM CPU #456.
  • Since moving the page size checker allows users to "bypass" the restriction by skipping the update/install, Box64 binaries built for different page sizes (8k, 16k, and 64k) have been added to the base image. The script has also been modified to automatically swap the binary used accordingly.
  • Add to known issues (documentation)

Test instructions

  1. Tested in known working ARM64 hosts and confirmed there are no breaking changes.
  2. Tested by @Zarrsito and confirmed 64k page size works if steamcmd is bypassed.

Checklist before requesting a review

  • I have performed a self-review of my code
  • I've added documentation about this change to the README.
  • I've not introduced breaking changes.

@sonroyaalmerol
Copy link
Contributor Author

@Zarrsito do you mind testing this for me? i don't have a machine that can recreate your problem

@thijsvanloef thijsvanloef added the help wanted Extra attention is needed label Feb 27, 2024
@Zarrsito
Copy link

Zarrsito commented Feb 27, 2024

Sure! :D But what exactly do i need to do to test this ? when i try to pull the image with container station i get a choice what brand i want to download, do i have to select some special ?

I´ve now already tryed to download the dev-arm64 version, which is sending me into a 4k page size error (i had that problem with the latest version too, until i found the latest-arm64 version)

@thijsvanloef
Copy link
Owner

@Zarrsito you can use the following image: thijsvanloef/palworld-server-docker:pr-464

@Zarrsito
Copy link

Zarrsito commented Feb 27, 2024

ive tested the above build and im getting this error ;

usermod: no changes
Only ARM64 hosts with 4k page size is supported.
EXECUTING USERMOD

QNAP changed page size to 64k
and thijsvanloef/palworld-server-docker:latest-arm64 has the right settings for page size

@thijsvanloef
Copy link
Owner

@Zarrsito if you pull thijsvanloef/palworld-server-docker:pr-464 again, could you try again? The pagesize check was still there, should be gone.

@Zarrsito
Copy link

so i´ve tested, and this is the result:

EXECUTING USERMOD
usermod: no changes
ARM compatibility mode enabled
Server installation not detected.
Starting Installation
tid(29) burning pthread_key_t == 0 so we never use it
WARNING: setlocale('en_US.UTF-8') failed, using locale: 'C'. International characters may not work.
**
ERROR:../../accel/tcg/cpu-exec.c:954:cpu_exec: assertion failed: (cpu == current_cpu)
Bail out! ERROR:../../accel/tcg/cpu-exec.c:954:cpu_exec: assertion failed: (cpu == current_cpu)
/home/steam/steamcmd/steamcmd.sh: line 39: 29 Trace/breakpoint trap $DEBUGGER "$STEAMEXE" "$@"
cp: cannot stat './PalServer.sh': No such file or directory
sed: can't read ./PalServer-arm64.sh: No such file or directory
chmod: cannot access './PalServer-arm64.sh': No such file or directory
./PalServer-arm64.sh does not exist.
Server Not Installed Properly

do i need some special folders as workingspace for this ?

@Zarrsito
Copy link

!
Unbenannt

@sonroyaalmerol
Copy link
Contributor Author

@Zarrsito Okay, I didn't realize you were not using the latest tag when you submitted the issue. This fix is meant for those with CPUs that are only capable of executing ARM64 binaries without an additional compatibility layer (mostly those who are not running Docker Desktop) which I believe is the problem for those in issue #366. I thought you had the same issue.

I'll revert the page size check change as it was the expected behaviour.

@Zarrsito
Copy link

Zarrsito commented Feb 27, 2024

what do u mean with latest tag? =) i´ve answered the questions as good as possible :)

thijsvanloef/palworld-server-docker:pr-464
is now the first docker container not resulting in an exec error, for me
and i´ve tested all avaiable images in the docker store...

@sonroyaalmerol
Copy link
Contributor Author

Don't worry about it. Your answers were perfect. It was just a misunderstanding on my part. This specific fix is not for your problem. If using the latest tag gives you a page size error, then that is most likely your problem and there's nothing we can do about it on our side. I've explained more about this in the issue you submitted.

@sonroyaalmerol sonroyaalmerol changed the title Add compatibility mode for hosts incapable of running AArch32 binaries Better compatibility for ARM64 hosts Feb 29, 2024
@thijsvanloef
Copy link
Owner

@sonroyaalmerol I can't really test this PR, are you confident that it has been tested enough?

@sonroyaalmerol
Copy link
Contributor Author

I can say that this PR will not affect existing ARM64 users. It's more of adding a different option for people to try if they had an ARM64 host that didn't work previously. It shouldn't have any breaking changes.

@thijsvanloef thijsvanloef merged commit 73b17ae into thijsvanloef:main Mar 1, 2024
10 checks passed
MusclePr pushed a commit to MusclePr/palworld-server-docker that referenced this pull request Jun 19, 2024
…ility-mode

Better compatibility for ARM64 hosts
@sonroyaalmerol sonroyaalmerol deleted the qemu-compatibility-mode branch July 7, 2024 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
3 participants