ptitSeb / box64

Box64 - Linux Userspace x86_64 Emulator with a twist, targeted at ARM64 Linux devices
https://box86.org
MIT License
3.69k stars 263 forks source link

SIGSEGV while trying to run a Starbound server #205

Closed ShadF0x closed 1 year ago

ShadF0x commented 2 years ago

Attempting to run Starbound server via box64 results in the following error:

Dynarec for ARM64, with extension: ASIMD AES CRC32 PMULL ATOMICS PageSize:4096
Box64 with Dynarec v0.1.7 5e01769 built on Jan  6 2022 12:32:44
Using default BOX64_LD_LIBRARY_PATH: ./:lib/:lib64/:x86_64/:bin64/:libs64/
Using default BOX64_PATH: ./:bin/
Counted 26 Env var
Looking for starbound_server
Using native(wrapped) libpthread.so.0
Using native(wrapped) libdl.so.2
Using native(wrapped) librt.so.1
Using native(wrapped) libm.so.6
Using native(wrapped) libc.so.6
Using native(wrapped) ld-linux-x86-64.so.2
[Info] Root: Preparing Root...
[Info] Root: Done preparing Root.
[Info] Root: Scanning for asset sources in directory '../assets/'
[Info] Root: Loaded Configuration in 0.00431899 seconds
[Info] Root: Scanning for asset sources in directory '../mods/'
[Warn] Root: Unrecognized file in asset directory 'mods_go_here', skipping
[Info] Root: Detected asset source named 'base' at '../assets/packed.pak'
[Info] Root: Detected unnamed asset source at '../assets/user'
[Info] Loading assets from: '../assets/packed.pak'
[Info] Loading assets from: '../assets/user'
[Info] Assets digest is 531f0b8469832a566d23a0b9870ed717c63291164883670d0ee17086a100d3cd
[Info] Root: Loaded Assets in 2.57193 seconds
[Info] Root: Loaded NameGenerator in 2.5906 seconds
[Info] Root: Loaded PlantDatabase in 0.166204 seconds
[Info] Root: Loaded ObjectDatabase in 0.422108 seconds
[Info] Root: Loaded ProjectileDatabase in 0.247161 seconds
[Info] Root: Loaded NpcDatabase in 0.115781 seconds
[Info] Root: Loaded StagehandDatabase in 0.00437271 seconds
[Info] Root: Loaded VehicleDatabase in 0.0116964 seconds
[Info] Root: Loaded PlayerFactory in 0.0126771 seconds
[Info] Root: Loaded MonsterDatabase in 0.213693 seconds
[Info] Root: Loaded VersioningDatabase in 0.0186293 seconds
[Info] Root: Loaded EntityFactory in 0.0676156 seconds
[Info] Root: Loaded ParticleDatabase in 0.120127 seconds
[Info] Root: Loaded ImageMetadataDatabase in 0.000233082 seconds
[Info] Root: Loaded MaterialDatabase in 0.343645 seconds
[Info] Root: Loaded TerrainDatabase in 0.0103703 seconds
[Info] Root: Loaded BiomeDatabase in 0.0542121 seconds
[Info] Root: Loaded LiquidsDatabase in 0.00512432 seconds
[Info] Root: Loaded StatusEffectDatabase in 0.012025 seconds
[Info] Root: Loaded DamageDatabase in 0.37963 seconds
[Info] Root: Loaded EffectSourceDatabase in 0.00943723 seconds
[Info] Root: Loaded FunctionDatabase in 0.00904939 seconds
[Info] Root: Loaded TreasureDatabase in 0.0450229 seconds
[Info] Root: Loaded DungeonDefinitions in 0.367926 seconds
[Info] Root: Loaded TilesetDatabase in 0.000877087 seconds
[Info] Root: Loaded StatisticsDatabase in 0.00574865 seconds
[Info] Root: Loaded EmoteProcessor in 0.00117221 seconds
[Info] Root: Loaded SpeciesDatabase in 0.0157245 seconds
[Info] Root: Loaded QuestTemplateDatabase in 0.0250446 seconds
[Info] Root: Loaded AiDatabase in 0.00830367 seconds
[Info] Root: Loaded TechDatabase in 0.00404727 seconds
[Info] Root: Loaded CodexDatabase in 0.00963524 seconds
[Info] Root: Loaded BehaviorDatabase in 0.40064 seconds
[Info] Root: Loaded DanceDatabase in 0.00742086 seconds
[Info] Root: Loaded SpawnTypeDatabase in 0.00853963 seconds
[Info] Root: Loaded RadioMessageDatabase in 0.00979976 seconds
[Info] Root: Writing runtime configuration to '../storage/starbound_server.config'
[Info] Root: Loaded ItemDatabase in 5.16862 seconds
[Info] Root: Loaded CollectionDatabase in 3.6803 seconds
99109|Double SIGSEGV (code=1, pc=0xffff90ba5f3c, addr=0xffff00000002)!
99110|SIGSEGV @0xffff90ba5f3c (???(/lib/aarch64-linux-gnu/libc.so.6/0xffff90ba5f3c)) (x64pc=(nil)/???:"???", rsp=0xffff62000000, stack=0xffff61800000:0xffff62000000 own=0xffff61800000 fp=(nil)), for accessing 0xffff00000002 (code=1/prot=0), db=(nil)((nil):(nil)/(nil):(nil)/???:clean, hash:0/0) handler=(nil)
Segmentation fault (core dumped)

If I provide libc.so.6 from an x86-64 installation and enable lib emulation, the output turns into this:

Dynarec for ARM64, with extension: ASIMD AES CRC32 PMULL ATOMICS PageSize:4096
Box64 with Dynarec v0.1.7 5e01769 built on Jan  6 2022 12:32:44
Using default BOX64_LD_LIBRARY_PATH: ./:lib/:lib64/:x86_64/:bin64/:libs64/
BOX64 will force the used of emulated libs for libc.so.6
Using default BOX64_PATH: ./:bin/
Counted 26 Env var
Looking for starbound_server
Using native(wrapped) libpthread.so.0
Using native(wrapped) libdl.so.2
Using native(wrapped) librt.so.1
Using native(wrapped) libm.so.6
Using emulated libc.so.6
Using native(wrapped) ld-linux-x86-64.so.2
Error: Global Symbol __libpthread_freeres not found, cannot apply R_X86_64_GLOB_DAT @0xffff9dd3edd8 ((nil)) in libc.so.6
Error: Global Symbol _dl_starting_up not found, cannot apply R_X86_64_GLOB_DAT @0xffff9dd3ef40 ((nil)) in libc.so.6
Error: Global Symbol __libdl_freeres not found, cannot apply R_X86_64_GLOB_DAT @0xffff9dd3ef88 ((nil)) in libc.so.6
Error: Global Symbol _dl_argv not found, cannot apply R_X86_64_GLOB_DAT @0xffff9dd3efe8 ((nil)) in libc.so.6
Warning, don't know of to handle rela #7 type: R_X86_64_IRELATIVE on
Warning, don't know of to handle rela #8 type: R_X86_64_IRELATIVE on
Warning, don't know of to handle rela #9 type: R_X86_64_IRELATIVE on
Warning, don't know of to handle rela #10 type: R_X86_64_IRELATIVE on
Warning, don't know of to handle rela #11 type: R_X86_64_IRELATIVE on
Warning, don't know of to handle rela #12 type: R_X86_64_IRELATIVE on
Warning, don't know of to handle rela #13 type: R_X86_64_IRELATIVE on
Warning, don't know of to handle rela #14 type: R_X86_64_IRELATIVE on
Warning, don't know of to handle rela #15 type: R_X86_64_IRELATIVE on
Warning, don't know of to handle rela #16 type: R_X86_64_IRELATIVE on
Warning, don't know of to handle rela #17 type: R_X86_64_IRELATIVE on
Warning, don't know of to handle rela #18 type: R_X86_64_IRELATIVE on
Warning, don't know of to handle rela #19 type: R_X86_64_IRELATIVE on
Warning, don't know of to handle rela #20 type: R_X86_64_IRELATIVE on
Warning, don't know of to handle rela #21 type: R_X86_64_IRELATIVE on
Warning, don't know of to handle rela #22 type: R_X86_64_IRELATIVE on
Warning, don't know of to handle rela #23 type: R_X86_64_IRELATIVE on
Warning, don't know of to handle rela #24 type: R_X86_64_IRELATIVE on
Warning, don't know of to handle rela #25 type: R_X86_64_IRELATIVE on
Warning, don't know of to handle rela #26 type: R_X86_64_IRELATIVE on
Warning, don't know of to handle rela #27 type: R_X86_64_IRELATIVE on
Warning, don't know of to handle rela #28 type: R_X86_64_IRELATIVE on
Warning, don't know of to handle rela #29 type: R_X86_64_IRELATIVE on
Warning, don't know of to handle rela #30 type: R_X86_64_IRELATIVE on
Warning, don't know of to handle rela #31 type: R_X86_64_IRELATIVE on
Warning, don't know of to handle rela #32 type: R_X86_64_IRELATIVE on
Warning, don't know of to handle rela #33 type: R_X86_64_IRELATIVE on
Warning, don't know of to handle rela #34 type: R_X86_64_IRELATIVE on
Warning, don't know of to handle rela #35 type: R_X86_64_IRELATIVE on
Warning, don't know of to handle rela #36 type: R_X86_64_IRELATIVE on
Warning, don't know of to handle rela #37 type: R_X86_64_IRELATIVE on
Warning, don't know of to handle rela #38 type: R_X86_64_IRELATIVE on
Warning, don't know of to handle rela #39 type: R_X86_64_IRELATIVE on
Warning, don't know of to handle rela #40 type: R_X86_64_IRELATIVE on
Warning, don't know of to handle rela #41 type: R_X86_64_IRELATIVE on
Warning, don't know of to handle rela #42 type: R_X86_64_IRELATIVE on
Warning, don't know of to handle rela #43 type: R_X86_64_IRELATIVE on
Warning, don't know of to handle rela #44 type: R_X86_64_IRELATIVE on
Warning, don't know of to handle rela #45 type: R_X86_64_IRELATIVE on
Warning, don't know of to handle rela #46 type: R_X86_64_IRELATIVE on
99105|SIGSEGV @0x64935a8c (???(box64/0x64935a8c)) (x64pc=0x25132/???:"???", rsp=0xffff9cad9220, stack=0xffff9c2da000:0xffff9cada000 own=(nil) fp=(nil)), for accessing 0xffffffff (code=1/prot=0), db=(nil)((nil):(nil)/(nil):(nil)/???:clean, hash:0/0) handler=(nil)
Segmentation fault (core dumped)

Interestingly enough, I did manage to successfully start it up once (the first time), but after that every consecutive launch ended in SIGSEGV.

OS used: Ubuntu 20.04. CPU used: Ampere Altra Q80.

PeterStrick commented 1 year ago

Starbound Server from the GOG Version runs successfully using Box64 compiled on March 22 2023, including Mods from the Steam Workshop and elsewhere.

Gameplay was smooth, other than the occasional lag when my Friends attempted to drain an entire Ocean Planet.

OS: Ubuntu 22.04.2 LTS aarch64 CPU: Ampere Altra (Oracle Cloud)

Tested was:

Log from a Restart to get Box64 Output:

ubuntu@uwu-server-ubuntu-3-2:/mnt/Storage/Starbound/game/linux$ ./starbound_server
Dynarec for ARM64, with extension: ASIMD AES CRC32 PMULL ATOMICS PageSize:4096 Running on Neoverse-N1 with 4 Cores
Params database has 22 entries
Box64 with Dynarec v0.2.3 900f3877 built on Mar 22 2023 07:33:12
Using default BOX64_LD_LIBRARY_PATH: ./:lib/:lib64/:x86_64/:bin64/:libs64/
Using default BOX64_PATH: ./:bin/
Counted 37 Env var
Looking for ./starbound_server
Rename process to "starbound_server"
Using native(wrapped) libpthread.so.0
Using native(wrapped) libdl.so.2
Using native(wrapped) libc.so.6
Using native(wrapped) ld-linux-x86-64.so.2
Using native(wrapped) libutil.so.1
Using native(wrapped) librt.so.1
Using native(wrapped) libm.so.6
[Info] Root: Preparing Root...
[Info] Root: Done preparing Root.
[Info] Root: Scanning for asset sources in directory '../assets/'
[Info] Root: Loaded Configuration in 0.00621529 seconds
[Info] Root: Scanning for asset sources in directory '../mods/'
[Info] Root: Detected asset source named 'EMO-JSON' at '../mods/Even MORE Optimized JSON!.pak'
[Info] Root: Detected asset source named 'base' at '../assets/packed.pak'
[Info] Root: Detected unnamed asset source at '../mods/Starbound Patch Project.pak'
[Info] Root: Detected asset source named 'xbawks' at '../mods/xbawks'
[Info] Root: Detected asset source named 'Efficient Watering' at '../mods/Efficient Watering.pak'
[Info] Root: Detected asset source named 'ExtraZoomLevels' at '../mods/Extra Zoom Levels.pak'
[Info] Root: Detected asset source named 'Avali' at '../mods/avali'
[Info] Root: Detected asset source named 'Improved Containers' at '../mods/Improved Containers.pak'
[Info] Root: Detected asset source named 'PerennialCrops' at '../mods/Perennial Crops.pak'
[Info] Root: Detected asset source named 'Protogen Mod' at '../mods/Protogen'
[Info] Root: Detected asset source named 'BetterPlatformFalling' at '../mods/Better Platform Falling.pak'
[Info] Root: Detected asset source named 'navigationtools' at '../mods/navigation_tools_0.9.pak'
[Info] Root: Detected asset source named 'Protogen Customization' at '../mods/Protogen_Customization.pak'
[Info] Root: Detected unnamed asset source at '../assets/user'
[Info] Loading assets from: '../mods/Even MORE Optimized JSON!.pak'
[Info] Loading assets from: '../assets/packed.pak'
[Info] Loading assets from: '../mods/Starbound Patch Project.pak'
[Info] Loading assets from: '../mods/xbawks'
[Info] Loading assets from: '../mods/Efficient Watering.pak'
[Info] Loading assets from: '../mods/Extra Zoom Levels.pak'
[Info] Loading assets from: '../mods/avali'
[Info] Loading assets from: '../mods/Improved Containers.pak'
[Info] Loading assets from: '../mods/Perennial Crops.pak'
[Info] Loading assets from: '../mods/Protogen'
[Info] Loading assets from: '../mods/Better Platform Falling.pak'
[Info] Loading assets from: '../mods/navigation_tools_0.9.pak'
[Info] Loading assets from: '../mods/Protogen_Customization.pak'
[Info] Loading assets from: '../assets/user'
[Info] Assets digest is 97e143588cb98b1bb0d0b5d9c4e7483702c0c73914247cbb977ecc9a8ae51c3c
[Info] Root: Loaded Assets in 3.88357 seconds
[Info] Root: Loaded NameGenerator in 3.91385 seconds
[Info] Root: Loaded PlantDatabase in 0.166674 seconds
[Info] Root: Loaded ProjectileDatabase in 0.300669 seconds
[Info] Root: Loaded ObjectDatabase in 0.76127 seconds
[Info] Root: Loaded MonsterDatabase in 0.347144 seconds
[Info] Root: Loaded StagehandDatabase in 0.00436277 seconds
[Info] Root: Loaded NpcDatabase in 0.107559 seconds
[Info] Root: Loaded VehicleDatabase in 0.00989897 seconds
[Info] Root: Loaded PlayerFactory in 0.0238126 seconds
[Info] Root: Loaded VersioningDatabase in 0.0318506 seconds
[Info] Root: Loaded EntityFactory in 0.0531186 seconds
[Info] Root: Loaded ParticleDatabase in 0.133388 seconds
[Info] Root: Loaded ImageMetadataDatabase in 0.00010004 seconds
[Info] Root: Writing runtime configuration to '../storage/starbound_server.config'
[Info] Root: Loaded MaterialDatabase in 0.425502 seconds
[Info] Root: Loaded TerrainDatabase in 0.0113185 seconds
[Info] Root: Loaded BiomeDatabase in 0.0477778 seconds
[Info] Root: Loaded LiquidsDatabase in 0.00938069 seconds
[Info] Root: Loaded StatusEffectDatabase in 0.0150803 seconds
[Info] Root: Loaded DamageDatabase in 0.342644 seconds
[Info] Root: Loaded EffectSourceDatabase in 0.00700077 seconds
[Info] Root: Loaded FunctionDatabase in 0.0177835 seconds
[Info] Root: Loaded TreasureDatabase in 0.0357224 seconds
[Info] Root: Loaded DungeonDefinitions in 0.39597 seconds
[Info] Root: Loaded TilesetDatabase in 0.00147512 seconds
[Info] Root: Loaded StatisticsDatabase in 0.00586005 seconds
[Info] Root: Loaded EmoteProcessor in 0.00249208 seconds
[Info] Root: Loaded SpeciesDatabase in 0.0414534 seconds
[Info] Root: Loaded QuestTemplateDatabase in 0.024253 seconds
[Info] Root: Loaded AiDatabase in 0.0155249 seconds
[Info] Root: Loaded TechDatabase in 0.00909913 seconds
[Info] Root: Loaded CodexDatabase in 0.0129165 seconds
[Info] Root: Loaded BehaviorDatabase in 0.433012 seconds
[Info] Root: Loaded DanceDatabase in 0.0104506 seconds
[Info] Root: Loaded SpawnTypeDatabase in 0.0117583 seconds
[Info] Root: Loaded RadioMessageDatabase in 0.0110598 seconds
[Info] Root: Loaded ItemDatabase in 6.79934 seconds
[Info] Root: Loaded CollectionDatabase in 5.14763 seconds
[Info] Server Version 1.4.4 (linux x86_64) Source ID: 8cbe6faf22282659828a194e06a08999f213769e Protocol: 747
[Info] UniverseServer: Acquiring universe lock file
[Info] UniverseServer: Loading settings
[Info] UniverseServer: Starting UniverseServer with UUID: 424f499869f9a77484a1d8cf2884e949
[Info] UniverseServer: listening for incoming TCP connections on 0.0.0.0:21025
ptitSeb commented 1 year ago

Thanks for the feedback! Looks good :)

Looks like this ticket can closed then?

PeterStrick commented 1 year ago

Thanks for the feedback! Looks good :)

Looks like this ticket can closed then?

From my point of view this Issue can be closed

ptitSeb commented 1 year ago

Ok, closing. @ShadF0x feel free to open a new ticket if you have furthers issues.