Page MenuHomeSchine - Phabricator

Starmade | Native libraries not loading on Linux distributions without glibc 2.14
Closed, FinishedPublic

Description

Linux distributions such as CentOS 6.5 only come with glibc 2.12 and cannot be upgraded, this causes the native library to fail on loading as it cannot link to the correct glibc.

[LIBLOADER] OS ARCHITECTURE amd64
[2016-06-20 06:41:08] Exception in thread "main"
[2016-06-20 06:41:08] java.lang.UnsatisfiedLinkError: /home/cloud-user/StarMade/native/linux/libStarMadeNative64.so: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /home/cloud-user/StarMade/native/linux/libStarMadeNative64.so)

Details

Commits
Restricted Diffusion Commit
Task Type
Bug
Testing Results
Affected Gamemode(s)
Single and Multi
Reproducible
Yes
Last tested (version)
V0.198.219
Category
Engine
Hardware/Software/System
OS-Specific
Linux Only
Hardware-Specific
No
Video Card Vendor
uncertain
Steps to reproduce

Open StarMade on a system with a glibc below 2.14

Tester information (Internal use only)

Note from author of other report:
the last working version is 0.198.146

Event Timeline

Auburn created this task.Jun 20 2016, 9:12 PM
Restricted Application added a project: Issue Navigation. · View Herald TranscriptJun 20 2016, 9:12 PM
AndyP shifted this object from the S1 Public space to the S3 Starmade space.Jun 21 2016, 9:20 PM
AndyP changed the visibility from "Custom Policy" to "Public (No Login Required)".
AndyP changed the edit policy from "Task Author" to "Starmade (Project)".
AndyP edited Steps to reproduce. (Show Details)
AndyP changed Category from none/unspecified to Engine.
AndyP edited Serverconfig (server.cfg). (Show Details)
AndyP edited Clientconfig (settings.cfg). (Show Details)
AndyP changed the task status from Open to In Queue (Game).
AndyP claimed this task.
Restricted Application edited projects, added Starmade, Game Development; removed Issue Navigation. · View Herald TranscriptJun 21 2016, 9:21 PM
AndyP added subscribers: systemhack.net, AndyP.

-Validated-
-confirmed-

I am NOT sure if this can be fixed from our side at all, but at least sending it in queue for a review.

AndyP edited Tester information (Internal use only). (Show Details)Jun 21 2016, 9:23 PM
SmilingDemon triaged this task as Pre-Release Quality Assurance priority.

Would it be possible to hotfix this, as it is a game breaking bug?

Here is a possible hotfix, place the attached file in "{StarMadeInstallDir}\native\linux" and replace the existing version. Let me know if this fixes the issue. Thanks{F8245}

test output on that hotfix on Cent OS6 from

https://starmadedock.net/threads/starmade-server-startup-crash-glibc-version.25659/#post-294075

root@starmade StarMade]# java -Xms512m -Xmx1024m -Xincgc -Xshare:off -jar StarMade.jar -server
Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
[VERION] loading version from install dir: ./
[VERSION] VERSION: 0.198.223
[VERSION] BUILD: 20160623_212422
#################### StarMade #######################
# version 0.198.223 - build 20160623_212422 #
#####################################################
[SERIAL] "not retrieved"
[STARTER] template dir exists. overwriting template with current data
[IO][COPY] FILE FROM /home/minecraft/StarMade/./data/config/FactionConfig.xml to /home/minecraft/StarMade/./customFactionConfig/FactionConfigTemplate.xml
[IO][COPY] FILE FROM /home/minecraft/StarMade/./data/config/customFactionConfigHOWTO.txt to /home/minecraft/StarMade/./customFactionConfig/customFactionConfigHOWTO.txt
[STARTER] template dir exists. overwriting template with current data
[IO][COPY] FILE FROM /home/minecraft/StarMade/./data/config/customBlockBehaviorConfigTemplate.xml to /home/minecraft/StarMade/./customBlockBehaviorConfig/customBlockBehaviorConfigTemplate.xml
[IO][COPY] FILE FROM /home/minecraft/StarMade/./data/config/customBlockBehaviorConfigHOWTO.txt to /home/minecraft/StarMade/./customBlockBehaviorConfig/customBlockBehaviorConfigHOWTO.txt
[RESOURCES][CustomTextures] No need to create pack.zip. Hash matches (as rewriting a zip changes the hash on it)
[TEXTURE-PACK] WARNING: ignoring lava.png.zip: not a directory
[TEXTURE-PACK] WARNING: ignoring shield_tex.png.zip: not a directory
[TEXTURE-PACK] WARNING: ignoring lava.png.zip: not a directory
[TEXTURE-PACK] WARNING: ignoring shield_tex.png.zip: not a directory
[LANGUAGE] detected language: en
[LANGUAGE] loading language: english; Resolved to english
java.io.FileNotFoundException: ./keyboard.cfg (No such file or directory)
        at java.io.FileInputStream.open0(Native Method)
        at java.io.FileInputStream.open(FileInputStream.java:195)
        at java.io.FileInputStream.<init>(FileInputStream.java:138)
        at java.io.FileReader.<init>(FileReader.java:72)
        at org.schema.schine.input.KeyboardMappings.a(SourceFile:176)
        at obfuscated.QF.b(SourceFile:94)
        at obfuscated.QF.a(SourceFile:218)
        at org.schema.game.common.Starter.main(SourceFile:812)
Could not read settings file: using defaults (./keyboard.cfg (No such file or directory))
[LANGUAGE] Loading English; Version: 0
[LANGUAGE] LOADED FONT PATH/NAME: font/Monda-Regular.ttf
[SERVER] using world: world0; ./server-database/world0/
[INIT] Segment Database Path: /home/minecraft/StarMade/./server-database/world0/DATA; exists? true; is Dir? true; creating dir sucessfull (gives false if exists)? false
[GUI] NO STARMADE-WINDOW CONFIG FOUND. Using defaults
[LIBLOADER] OS Linux - 2.6.32-642.1.1.el6.x86_64
[LIBLOADER] OS ARCHITECTURE amd64
Java HotSpot(TM) 64-Bit Server VM warning: You have loaded library /home/minecraft/StarMade/native/linux/libStarMadeNative64.so which might have disabled stack guard. The VM will try to fix the stack guard now.
It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.
Exception in thread "main"
java.lang.UnsatisfiedLinkError: /home/minecraft/StarMade/native/linux/libStarMadeNative64.so: /home/minecraft/StarMade/native/linux/libStarMadeNative64.so: invalid ELF header (Possible cause: endianness mismatch)
        at java.lang.ClassLoader$NativeLibrary.load(Native Method)
        at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1857)
        at java.lang.Runtime.loadLibrary0(Runtime.java:870)
        at java.lang.System.loadLibrary(System.java:1122)
        at obfuscated.QG.a(SourceFile:106)
        at org.schema.game.common.Starter.main(SourceFile:834)
[root@starmade StarMade]#

My hotfix file above is confirmed working, this will be included in the next update.

SmilingDemon changed the task status from In Queue (Game) to Resolved.Jun 26 2016, 8:45 AM

moving it to resolved than .. and closing it after next release

Restricted Application edited projects, added Quality Assurance; removed Game Development. · View Herald TranscriptJun 26 2016, 8:45 AM

Auburn's hotfix file is not working for me (linux debian), here is the output after replacing the file:

[VERION] loading version from install dir: ./
[VERSION] VERSION: 0.198.223
[VERSION] BUILD: 20160623_212422

    1. StarMade #######
  1. version 0.198.223 - build 20160623_212422 # #############

[SERIAL] "not retrieved"
[STARTER] template dir exists. overwriting template with current data
[IO][COPY] FILE FROM /home/archie/servers/StarMade/StarMade/./data/config/FactionConfig.xml to /home/archie/servers/StarMade/StarMade/./customFactionConfig/FactionConfigTemplate.xml
[IO][COPY] FILE FROM /home/archie/servers/StarMade/StarMade/./data/config/customFactionConfigHOWTO.txt to /home/archie/servers/StarMade/StarMade/./customFactionConfig/customFactionConfigHOWTO.txt
[STARTER] template dir exists. overwriting template with current data
[IO][COPY] FILE FROM /home/archie/servers/StarMade/StarMade/./data/config/customBlockBehaviorConfigTemplate.xml to /home/archie/servers/StarMade/StarMade/./customBlockBehaviorConfig/customBlockBehaviorConfigTemplate.xml
[IO][COPY] FILE FROM /home/archie/servers/StarMade/StarMade/./data/config/customBlockBehaviorConfigHOWTO.txt to /home/archie/servers/StarMade/StarMade/./customBlockBehaviorConfig/customBlockBehaviorConfigHOWTO.txt
[RESOURCES][CustomTextures] No need to create pack.zip. Hash matches (as rewriting a zip changes the hash on it)
[TEXTURE-PACK] WARNING: ignoring lava.png.zip: not a directory
[TEXTURE-PACK] WARNING: ignoring shield_tex.png.zip: not a directory
[TEXTURE-PACK] WARNING: ignoring lava.png: not a directory
[TEXTURE-PACK] WARNING: ignoring shield_tex.png: not a directory
[TEXTURE-PACK] WARNING: ignoring lava.png.zip: not a directory
[TEXTURE-PACK] WARNING: ignoring shield_tex.png.zip: not a directory
[TEXTURE-PACK] WARNING: ignoring lava.png: not a directory
[TEXTURE-PACK] WARNING: ignoring shield_tex.png: not a directory
[LANGUAGE] detected language: en
[LANGUAGE] loading language: english; Resolved to english
java.io.FileNotFoundException: ./keyboard.cfg (No such file or directory)

at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:146)
at java.io.FileReader.<init>(FileReader.java:72)
at org.schema.schine.input.KeyboardMappings.a(SourceFile:176)
at obfuscated.QF.b(SourceFile:94)
at obfuscated.QF.a(SourceFile:218)
at org.schema.game.common.Starter.main(SourceFile:812)

Could not read settings file: using defaults (./keyboard.cfg (No such file or directory))
[LANGUAGE] Loading English; Version: 0
[LANGUAGE] LOADED FONT PATH/NAME: font/Monda-Regular.ttf
[SERVER] using world: world0; ./server-database/world0/
[INIT] Segment Database Path: /home/archie/servers/StarMade/StarMade/./server-database/world0/DATA; exists? true; is Dir? true; creating dir sucessfull (gives false if exists)? false
[GUI] NO STARMADE-WINDOW CONFIG FOUND. Using defaults
[LIBLOADER] OS Linux - 3.18.7-vs2.3.7.4-beng
[LIBLOADER] OS ARCHITECTURE amd64
Java HotSpot(TM) 64-Bit Server VM warning: You have loaded library /home/archie/servers/StarMade/StarMade/native/linux/libStarMadeNative64.so which might have disabled stack guard. The VM will try to fix the stack guard now.
It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.
Exception in thread "main"
java.lang.UnsatisfiedLinkError: /home/archie/servers/StarMade/StarMade/native/linux/libStarMadeNative64.so: /home/archie/servers/StarMade/StarMade/native/linux/libStarMadeNative64.so: invalid ELF header (Possible cause: endianness mismatch)

at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary1(ClassLoader.java:1965)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1890)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1880)
at java.lang.Runtime.loadLibrary0(Runtime.java:849)
at java.lang.System.loadLibrary(System.java:1088)
at obfuscated.QG.a(SourceFile:106)
at org.schema.game.common.Starter.main(SourceFile:834)

This was an issue another user had, he had tried to download the file using wget, and instead of getting the file it is just the download of the HTML page. Make sure it is the correct file size, it should be 142968 bytes

You see how clicking on the link opens a webpage instead of downloading the file? Using wget with that URL will download the HTML for the webpage instead of the file. Here is a link you can safely use with wget https://dl.dropboxusercontent.com/u/47692480/libStarMadeNative64.so

Thank you, can confirm the hotfix to be working on linux debian.
Keep up the good work.

Auburn added a commit: Restricted Diffusion Commit.Jun 28 2016, 11:31 PM
AndyP closed this task as Closed.

Closing issue.

Restricted Application removed a project: Quality Assurance. · View Herald TranscriptFeb 23 2017, 11:38 PM
Restricted Application added a project: Engine. · View Herald TranscriptMar 10 2017, 6:11 PM