Gamelift InitSDK Error on Amazon Linux 2023

0

I am getting an invalid attempt to read memory error when starting my unreal engine server on amazon linux 2023. I am using the 5.1 sdk which i have compiled using an amazonlinux 2023 container and placed the .so file within the unreal engine plugin.

[2023.08.31-01.29.38:908][  0]GameServerLog: Initializing the GameLift Server
[2023.08.31-01.29.38:908][  0]GameServerLog: PID: 0
[2023.08.31-01.29.38:916][  0]LogCore: === Critical error: ===
Unhandled Exception: SIGSEGV: invalid attempt to read memory at address 0x00007f04eebdce80

[2023.08.31-01.29.38:916][  0]LogCore: Fatal error!

0x00007f04eebdce80 libcrypto.so.3!UnknownFunction(0x3dce80)
Micah
asked 8 months ago502 views
2 Answers
0

I'm not the original poster but I am having the exact same issue with Linux 2023. I tried copying both libssl(libcrypto).so , libssl(libcrypto).so.3, and tried libssl(libcrypto).so.1.1 in the same folder as libaws-cpp-sdk-gamelift.server.so and I am seeing the same error as the original post too.

JustinL
answered 6 months ago
  • Hey Justin, thanks for raising this concern. I've updated my original answer to be more descriptive. The SDK needs to built with openssl-1.1.1n in addition to including libssl(libcrypto).so.1.1. With libssl(libcrypto).so.3 there is a version conflict with openssl-1.1.1n that is statically linked by Unreal into the game server executable. Building (and bundling) the SDK with the same version of openssl (openssl-1.1.1n) should help mitigate the problem.

0

Hi Micah,

For C++ SDK without using Unreal, you can just have the .so files with the Server executable. But with Unreal Engine you need to build the C++ SDK using the same version of OpenSSL that was used by Unreal Engine. UE5.1 uses OpenSSL1.1.n, but if you're on a different version you can double-check the version of OpenSSL by looking for the following log line from the UE packaging output window: "LogInit: - supports SSL with OpenSSL/1.1.1n".

Then, download the same version of OpenSSL from https://www.openssl.org/source/old/1.1.1/

$ cd ~/openssl-1.1.1n; ./config; make
$ mkdir lib
$ cp libcrypto.so.1.1 libssl.so.1.1 lib/
$ cd ~/GameLift-Cpp-ServerSDK-5.1.0/; mkdir out
$ export OPENSSL_ROOT_DIR=/home/ec2-user/openssl-1.1.1n/
$ export OPENSSL_LIBRARIES=/home/ec2-user/openssl-1.1.1n/lib/
$ cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -S . -B ./out -DBUILD_FOR_UNREAL=1
$ cd out; make

Place the generated libaws-cpp-sdk-gamelift-server.so in <UnrealProject>\Plugins\GameLiftServerSDK\ThirdParty\GameLiftServerSDK\Linux\x86_64-unknown-linux-gnu. This is where Unreal links to the C++ SDK from during compilation and packaging. Detailed instructions on setting up the plugin can be found here.

After packaging the game server for Linux, copy over the .so files for OpenSSL into the package bundle. Your folder structure should finally look like:

-<Game>
--install.sh
--<MyUnrealProjectServer>.sh (This is the target .sh file that is generated by Unreal itself)
--<Game>\<MyUnrealProject>\Plugins\GameLiftServerSDK\ThirdParty\GameLiftServerSDK\Linux\x86_64-unknown-linux-gnu\
   --libaws-cpp-sdk-gamelift-server.so
   --libcrypto.so.1.1
   --libssl.so.1.1
AWS
answered 7 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions