ptitSeb / box64

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

Trackmania Server missing Symbols and Opcode #33

Open fedoz13 opened 3 years ago

fedoz13 commented 3 years ago

Trackmania Server crashes with a few missing symbols and an unimplemented Opcode

Box64 with Dynarec v0.1.3 cb73eaf built on Jul  6 2021 16:14:32
Using default BOX64_LD_LIBRARY_PATH: ./:lib/:lib64/:x86_64/:bin64/:libs64/
Using default BOX64_PATH: ./:bin/
Counted 24 Env var
Looking for ./TrackmaniaServer
Using native(wrapped) libm.so.6
Using native(wrapped) libpthread.so.0
Using native(wrapped) libc.so.6
Using native(wrapped) ld-linux-x86-64.so.2
Using native(wrapped) librt.so.1
Using native(wrapped) libdl.so.2
Using native(wrapped) libutil.so.1
Error: Global Symbol _ZTH22g_ClassicThreadContext not found, cannot apply R_X86_64_GLOB_DAT @0x7f8a6a3558 ((nil)) in ./TrackmaniaServer
Error: Global Symbol _ZTHN14CFastStringInt6s_TempE not found, cannot apply R_X86_64_GLOB_DAT @0x7f8a6a3560 ((nil)) in ./TrackmaniaServer
Error: Global Symbol _ZTHN11CFastString6s_TempE not found, cannot apply R_X86_64_GLOB_DAT @0x7f8a6a3580 ((nil)) in ./TrackmaniaServer
Error: Global Symbol _ZTH16g_FrameAllocator not found, cannot apply R_X86_64_GLOB_DAT @0x7f8a6a3598 ((nil)) in ./TrackmaniaServer
Error: Global Symbol _ZTHN4NVis12g_iAsyncCopyE not found, cannot apply R_X86_64_GLOB_DAT @0x7f8a6a35a0 ((nil)) in ./TrackmaniaServer
Error: Global Symbol _ZTHN4NVis12g_iAsyncSwapE not found, cannot apply R_X86_64_GLOB_DAT @0x7f8a6a35a8 ((nil)) in ./TrackmaniaServer
Error: Global Symbol _ZTHN12CPlugFileImg18s_EnableLoadTexelsE not found, cannot apply R_X86_64_GLOB_DAT @0x7f8a6a35b0 ((nil)) in ./TrackmaniaServer
Error: Global Symbol _ZTHN12CPlugFileDds32s_MipMapSkipAtLoad_MaxLevelCountE not found, cannot apply R_X86_64_GLOB_DAT @0x7f8a6a35d8 ((nil)) in ./TrackmaniaServer
Error: Global Symbol _ZTHN12CPlugFileImg15s_EnableInvertYE not found, cannot apply R_X86_64_GLOB_DAT @0x7f8a6a3600 ((nil)) in ./TrackmaniaServer
Error: Global Symbol _ZTHN12CPlugFilePng16s_LoadPaletteIdsE not found, cannot apply R_X86_64_GLOB_DAT @0x7f8a6a3620 ((nil)) in ./TrackmaniaServer
Error: Global Symbol _ZTHN4NVis12g_iFrameSwapE not found, cannot apply R_X86_64_GLOB_DAT @0x7f8a6a3638 ((nil)) in ./TrackmaniaServer
Error: Global Symbol _ZTH35g_CurThread_PlugFilePreloader_iHead not found, cannot apply R_X86_64_GLOB_DAT @0x7f8a6a36a0 ((nil)) in ./TrackmaniaServer
Error: Global Symbol _ZTHN18CPlugFileOggVorbis30s_Import_ForcePrecacheToMemoryE not found, cannot apply R_X86_64_GLOB_DAT @0x7f8a6a36a8 ((nil)) in ./TrackmaniaServer
7667|0x7f8a099444: Unimplemented Opcode (F2) 66 0F 3A 21 EE 10 0F 28 F1 0F 57 F0 F3 0F 59
ptitSeb commented 3 years ago

I don't think the those missing symbols are a problem.

The missing opcode is an SSE4.1 one (insertps)... Not supposed to be supported in the vitual CPU, but it seems to check. I'll add it later.

fedoz13 commented 3 years ago

Thanks for adding it so quickly! Sadly it came up with another opcode.

Box64 with Dynarec v0.1.3 c5fbc5e built on Jul  9 2021 19:47:16
Using default BOX64_LD_LIBRARY_PATH: ./:lib/:lib64/:x86_64/:bin64/:libs64/
Using default BOX64_PATH: ./:bin/
Counted 24 Env var
Looking for ./TrackmaniaServer
Using native(wrapped) libm.so.6
Using native(wrapped) libpthread.so.0
Using native(wrapped) libc.so.6
Using native(wrapped) ld-linux-x86-64.so.2
Using native(wrapped) librt.so.1
Using native(wrapped) libdl.so.2
Using native(wrapped) libutil.so.1
Error: Global Symbol _ZTH22g_ClassicThreadContext not found, cannot apply R_X86_64_GLOB_DAT @0x7fbaec0558 ((nil)) in ./TrackmaniaServer
Error: Global Symbol _ZTHN14CFastStringInt6s_TempE not found, cannot apply R_X86_64_GLOB_DAT @0x7fbaec0560 ((nil)) in ./TrackmaniaServer
Error: Global Symbol _ZTHN11CFastString6s_TempE not found, cannot apply R_X86_64_GLOB_DAT @0x7fbaec0580 ((nil)) in ./TrackmaniaServer
Error: Global Symbol _ZTH16g_FrameAllocator not found, cannot apply R_X86_64_GLOB_DAT @0x7fbaec0598 ((nil)) in ./TrackmaniaServer
Error: Global Symbol _ZTHN4NVis12g_iAsyncCopyE not found, cannot apply R_X86_64_GLOB_DAT @0x7fbaec05a0 ((nil)) in ./TrackmaniaServer
Error: Global Symbol _ZTHN4NVis12g_iAsyncSwapE not found, cannot apply R_X86_64_GLOB_DAT @0x7fbaec05a8 ((nil)) in ./TrackmaniaServer
Error: Global Symbol _ZTHN12CPlugFileImg18s_EnableLoadTexelsE not found, cannot apply R_X86_64_GLOB_DAT @0x7fbaec05b0 ((nil)) in ./TrackmaniaServer
Error: Global Symbol _ZTHN12CPlugFileDds32s_MipMapSkipAtLoad_MaxLevelCountE not found, cannot apply R_X86_64_GLOB_DAT @0x7fbaec05d8 ((nil)) in ./TrackmaniaServer
Error: Global Symbol _ZTHN12CPlugFileImg15s_EnableInvertYE not found, cannot apply R_X86_64_GLOB_DAT @0x7fbaec0600 ((nil)) in ./TrackmaniaServer
Error: Global Symbol _ZTHN12CPlugFilePng16s_LoadPaletteIdsE not found, cannot apply R_X86_64_GLOB_DAT @0x7fbaec0620 ((nil)) in ./TrackmaniaServer
Error: Global Symbol _ZTHN4NVis12g_iFrameSwapE not found, cannot apply R_X86_64_GLOB_DAT @0x7fbaec0638 ((nil)) in ./TrackmaniaServer
Error: Global Symbol _ZTH35g_CurThread_PlugFilePreloader_iHead not found, cannot apply R_X86_64_GLOB_DAT @0x7fbaec06a0 ((nil)) in ./TrackmaniaServer
Error: Global Symbol _ZTHN18CPlugFileOggVorbis30s_Import_ForcePrecacheToMemoryE not found, cannot apply R_X86_64_GLOB_DAT @0x7fbaec06a8 ((nil)) in ./TrackmaniaServer
25931|0x7fbabb91e9: Unimplemented Opcode (04) 66 0F 3A 17 74 88 08 01 E9 CA FE FF FF 4D 89
25931|SIGSEGV @0x64903e5c (???(/usr/local/bin/box64/0x64903e5c)) (x64pc=0x7fbabb91e9/./TrackmaniaServer:"???", rsp=0x1800000014, stack=0x7fb8095000:0x7fb9095000 own=(nil) fp=0x180000000c), for accessing 0x180000000c (code=1/prot=0), db=(nil)((nil):(nil)/(nil):(nil)/???:clean, hash:0/0) handler=0x1
Segmentation fault
fedoz13 commented 3 years ago

Another one

27524|0x7fb41a75ae: Unimplemented Opcode (C0) F3 0F B8 C6 83 F8 01 75 44 31 C0 F3 41 0F B8
fedoz13 commented 3 years ago

Sorry, there is a new error now

Error: PltResolver: Symbol memmem(ver 2: memmem@GLIBC_2.2.5) not found, cannot apply R_X86_64_JUMP_SLOT 0x7fa221bc68 (0x7fa21097d6) in ./TrackmaniaServer
30811|SIGSEGV @0x64903ebc (???(/usr/local/bin/box64/0x64903ebc)) (x64pc=0x7c9d9033/???:"???", rsp=0x8, stack=0x7f9f3df000:0x7fa03df000 own=(nil) fp=(nil)), for accessing (nil) (code=1/prot=0), db=(nil)((nil):(nil)/(nil):(nil)/???:clean, hash:0/0) handler=0x1
Segmentation fault
fedoz13 commented 3 years ago
12179|0x7f9e821870: Unimplemented Opcode (C8) 66 0F 38 17 C9 74 10 48 8B BC 24 00 01 00 00
fedoz13 commented 3 years ago

Good news! Trackmania now tries to launch, but only after disabling Dynarec. There are no errors shown when Dynarec is enabled and the program just refuses to load. There's also another opcode missing.

Starting Trackmania date=2021-07-07_08_00 git=105481-88bf0d159f8 GameVersion=3.3.0...
ManiaPlanet server daemon started with pid=7749 (parent=7739).
7749|0x7fa16e6e0b: Unimplemented Opcode (50) 66 0F 3A 0E 0D 3B 37 FC FE AA 66 0F 6F 44 24
7749|SIGSEGV @0x64902f8c (???(/usr/local/bin/box64/0x64902f8c)) (x64pc=0x7fa16e6e0b/./TrackmaniaServer:"???", rsp=0x14, stack=0x7f9f228000:0x7fa0228000 own=(nil) fp=0xc), for accessing 0xc (code=1/prot=0), db=(nil)((nil):(nil)/(nil):(nil)/???:clean, hash:0/0) handler=0x1
fedoz13 commented 3 years ago

Sadly this doesn't seem to have fixed it. The same opcode from above is still coming up.

fedoz13 commented 3 years ago

Thanks for your quick help, really appreciated!

12430|0x7f97a23ecc: Unimplemented Opcode (02) 66 0F 38 14 CA 0F 57 C0 0F C2 C2 02 0F 54 C1
fedoz13 commented 3 years ago
15791|0x7f8a779ef5: Unimplemented Opcode (FE) 66 41 0F 3A 20 C4 04 66 41 0F 3A 20 C4 05 66
fedoz13 commented 3 years ago

I guess they're all SSE4.1 ones...

16672|0x7f9e5933a6: Unimplemented Opcode (D2) 66 0F 3A 0A D4 09 F3 0F 2C C2 83 F8 05 77 78
ptitSeb commented 3 years ago

Yes, they are all SSE 4.1 (I don't think I saw 4.2) I only add the opcode in the interpretor for now. I'll add full support for SSE4.x later

fedoz13 commented 3 years ago

Okay the last one finally seems to have fixed it! It now runs but quits after a few seconds without any error message displayed on screen and I can't figure out what's the cause.

Dynarec is Off
Box64 with Dynarec v0.1.3 486aa58 built on Jul 11 2021 22:17:10
Using default BOX64_LD_LIBRARY_PATH: ./:lib/:lib64/:x86_64/:bin64/:libs64/
Using default BOX64_PATH: ./:bin/
Counted 24 Env var
Looking for ./TrackmaniaServer
argv[1]="/title=Trackmania"
argv[2]="/game_Settings=Matchsettings/tracklist.txt"
argv[3]="/dedicated_cfg=dedicated_cfg.txt"
Using native(wrapped) libm.so.6
Using native(wrapped) libpthread.so.0
Using native(wrapped) libc.so.6
Using native(wrapped) ld-linux-x86-64.so.2
Using native(wrapped) librt.so.1
Using native(wrapped) libdl.so.2
Using native(wrapped) libutil.so.1
Error: Global Symbol _ZTH22g_ClassicThreadContext not found, cannot apply R_X86_64_GLOB_DAT @0x7fac9dbf08 ((nil)) in ./TrackmaniaServer
Error: Global Symbol _ZTHN14CFastStringInt6s_TempE not found, cannot apply R_X86_64_GLOB_DAT @0x7fac9dbf10 ((nil)) in ./TrackmaniaServer
Error: Global Symbol _ZTHN11CFastString6s_TempE not found, cannot apply R_X86_64_GLOB_DAT @0x7fac9dbf30 ((nil)) in ./TrackmaniaServer
Error: Global Symbol _ZTH16g_FrameAllocator not found, cannot apply R_X86_64_GLOB_DAT @0x7fac9dbf48 ((nil)) in ./TrackmaniaServer
Error: Global Symbol _ZTHN4NVis12g_iAsyncCopyE not found, cannot apply R_X86_64_GLOB_DAT @0x7fac9dbf50 ((nil)) in ./TrackmaniaServer
Error: Global Symbol _ZTHN4NVis12g_iAsyncSwapE not found, cannot apply R_X86_64_GLOB_DAT @0x7fac9dbf58 ((nil)) in ./TrackmaniaServer
Error: Global Symbol _ZTHN12CPlugFileImg18s_EnableLoadTexelsE not found, cannot apply R_X86_64_GLOB_DAT @0x7fac9dbf60 ((nil)) in ./TrackmaniaServer
Error: Global Symbol _ZTHN12CPlugFileDds32s_MipMapSkipAtLoad_MaxLevelCountE not found, cannot apply R_X86_64_GLOB_DAT @0x7fac9dbf88 ((nil)) in ./TrackmaniaServer
Error: Global Symbol _ZTHN12CPlugFileImg15s_EnableInvertYE not found, cannot apply R_X86_64_GLOB_DAT @0x7fac9dbfb0 ((nil)) in ./TrackmaniaServer
Error: Global Symbol _ZTHN12CPlugFilePng16s_LoadPaletteIdsE not found, cannot apply R_X86_64_GLOB_DAT @0x7fac9dbfd0 ((nil)) in ./TrackmaniaServer
Error: Global Symbol _ZTHN4NVis12g_iFrameSwapE not found, cannot apply R_X86_64_GLOB_DAT @0x7fac9dbfe8 ((nil)) in ./TrackmaniaServer
Error: Global Symbol _ZTH35g_CurThread_PlugFilePreloader_iHead not found, cannot apply R_X86_64_GLOB_DAT @0x7fac9dc050 ((nil)) in ./TrackmaniaServer
Error: Global Symbol _ZTHN18CPlugFileOggVorbis30s_Import_ForcePrecacheToMemoryE not found, cannot apply R_X86_64_GLOB_DAT @0x7fac9dc058 ((nil)) in ./TrackmaniaServer
Starting Trackmania date=2021-07-07_08_00 git=105481-88bf0d159f8 GameVersion=3.3.0...
ManiaPlanet server daemon started with pid=1052 (parent=1042).
Configuration file : dedicated_cfg.txt
Loading system configuration...
...system configuration loaded
Loading cache...
...OK

pi@raspberrypi:~/TMServer $
ptitSeb commented 3 years ago

Is the server free to download somewhere?

fedoz13 commented 3 years ago

Yeah, it's hosted for free on Maniaplanet: http://files.v04.maniaplanet.com/server/TrackmaniaServer_Latest.zip

On my Windows machine it looks something like this, even with no configuration file set

[2021/07/12 12:28:06] Starting Trackmania date=2021-07-07_08_00 git=105481-88bf0d159f8 GameVersion=3.3.0...
[2021/07/12 12:28:06] WARNING: No system configuration file
[2021/07/12 12:28:06] Loading cache...
[2021/07/12 12:28:06] ...OK
[2021/07/12 12:28:07] Listening for xml-rpc commands on port 5000.
[2021/07/12 12:28:07] WARNING: No match settings file
[2021/07/12 12:28:07] Server not started: no ServerName specified.
[2021/07/12 12:28:07] URL: uplay://launch/5595/0/#join=(replaced IP)::2350@Trackmania
[2021/07/12 12:28:07] Server not running, exiting.
Hacker1245 commented 12 months ago

decided to retest it for fun without a config file, seems to do the same thing

Dynarec for ARM64, with extension: ASIMD AES CRC32 PMULL ATOMICS PageSize:4096 Running on Kryo-3XX-Silver Kryo-3XX-Gold with 8 Cores
Params database has 24 entries
Box64 with Dynarec v0.2.3 da098cc1 built on Jul 23 2023 18:01:07
Using default BOX64_LD_LIBRARY_PATH: ./:lib/:lib64/:x86_64/:bin64/:libs64/
Using default BOX64_PATH: ./:bin/
Counted 25 Env var
Looking for ./TrackmaniaServer
Rename process to "TrackmaniaServer"
Using native(wrapped) libm.so.6
Using native(wrapped) libpthread.so.0
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) libdl.so.2
Using native(wrapped) libresolv.so.2
Warning: Global Symbol _ZTH22g_ClassicThreadContext not found, cannot apply R_X86_64_GLOB_DAT @0x103402648 ((nil)) in /home/kupfer/TrackmaniaServer_Latest/TrackmaniaServer
Warning: Global Symbol _ZTHN14CFastStringInt6s_TempE not found, cannot apply R_X86_64_GLOB_DAT @0x103402650 ((nil)) in /home/kupfer/TrackmaniaServer_Latest/TrackmaniaServer
Warning: Global Symbol _ZTH16g_FrameAllocator not found, cannot apply R_X86_64_GLOB_DAT @0x103402668 ((nil)) in /home/kupfer/TrackmaniaServer_Latest/TrackmaniaServer
Warning: Global Symbol _ZTHN11CFastString6s_TempE not found, cannot apply R_X86_64_GLOB_DAT @0x103402688 ((nil)) in /home/kupfer/TrackmaniaServer_Latest/TrackmaniaServer
Warning: Global Symbol _ZTHN12CPlugFileImg15s_EnableInvertYE not found, cannot apply R_X86_64_GLOB_DAT @0x1034026a8 ((nil)) in /home/kupfer/TrackmaniaServer_Latest/TrackmaniaServer
Warning: Global Symbol _ZTHN12CPlugFileDds32s_MipMapSkipAtLoad_MaxLevelCountE not found, cannot apply R_X86_64_GLOB_DAT @0x1034026b0 ((nil)) in /home/kupfer/TrackmaniaServer_Latest/TrackmaniaServer
Warning: Global Symbol _ZTHN4NVis25g_iAsyncSwap_WRITE_VISIONE not found, cannot apply R_X86_64_GLOB_DAT @0x1034026d8 ((nil)) in /home/kupfer/TrackmaniaServer_Latest/TrackmaniaServer
Warning: Global Symbol _ZTHN12CPlugFileImg18s_EnableLoadTexelsE not found, cannot apply R_X86_64_GLOB_DAT @0x1034026e0 ((nil)) in /home/kupfer/TrackmaniaServer_Latest/TrackmaniaServer
Warning: Global Symbol _ZTHN4NVis25g_iAsyncCopy_WRITE_VISIONE not found, cannot apply R_X86_64_GLOB_DAT @0x103402718 ((nil)) in /home/kupfer/TrackmaniaServer_Latest/TrackmaniaServer
Warning: Global Symbol _ZTHN4NVis18g_iFrameSwap_WRITEE not found, cannot apply R_X86_64_GLOB_DAT @0x103402748 ((nil)) in /home/kupfer/TrackmaniaServer_Latest/TrackmaniaServer
Warning: Global Symbol _ZTH35g_CurThread_PlugFilePreloader_iHead not found, cannot apply R_X86_64_GLOB_DAT @0x1034027c0 ((nil)) in /home/kupfer/TrackmaniaServer_Latest/TrackmaniaServer
Warning: Global Symbol _ZTHN18CPlugFileOggVorbis30s_Import_ForcePrecacheToMemoryE not found, cannot apply R_X86_64_GLOB_DAT @0x1034027c8 ((nil)) in /home/kupfer/TrackmaniaServer_Latest/TrackmaniaServer
Warning: Global Symbol _ZTHN12CPlugFilePng16s_LoadPaletteIdsE not found, cannot apply R_X86_64_GLOB_DAT @0x1034027d0 ((nil)) in /home/kupfer/TrackmaniaServer_Latest/TrackmaniaServer
Warning: Weak Symbol _ZTH22g_ClassicThreadContext not found, cannot apply R_X86_64_JUMP_SLOT @0x1034028a8 (0x1b05146)
Warning: Weak Symbol _ZTHN14CFastStringInt6s_TempE not found, cannot apply R_X86_64_JUMP_SLOT @0x103402918 (0x1b05226)
Warning: Weak Symbol _ZTH16g_FrameAllocator not found, cannot apply R_X86_64_JUMP_SLOT @0x103402948 (0x1b05286)
Warning: Weak Symbol _ZTHN11CFastString6s_TempE not found, cannot apply R_X86_64_JUMP_SLOT @0x103402a10 (0x1b05416)
Warning: Weak Symbol _ZTHN12CPlugFileImg15s_EnableInvertYE not found, cannot apply R_X86_64_JUMP_SLOT @0x103402a80 (0x1b054f6)
Warning: Weak Symbol _ZTHN12CPlugFileDds32s_MipMapSkipAtLoad_MaxLevelCountE not found, cannot apply R_X86_64_JUMP_SLOT @0x103402a88 (0x1b05506)
Warning: Weak Symbol _ZTHN4NVis25g_iAsyncSwap_WRITE_VISIONE not found, cannot apply R_X86_64_JUMP_SLOT @0x103402b28 (0x1b05646)
Warning: Weak Symbol _ZTHN12CPlugFileImg18s_EnableLoadTexelsE not found, cannot apply R_X86_64_JUMP_SLOT @0x103402b58 (0x1b056a6)
Warning: Weak Symbol _ZTHN4NVis25g_iAsyncCopy_WRITE_VISIONE not found, cannot apply R_X86_64_JUMP_SLOT @0x103402b90 (0x1b05716)
Warning: Weak Symbol _ZTHN4NVis18g_iFrameSwap_WRITEE not found, cannot apply R_X86_64_JUMP_SLOT @0x103402bb8 (0x1b05766)
Warning: Weak Symbol _ZTH35g_CurThread_PlugFilePreloader_iHead not found, cannot apply R_X86_64_JUMP_SLOT @0x103402cb8 (0x1b05966)
Warning: Weak Symbol _ZTHN18CPlugFileOggVorbis30s_Import_ForcePrecacheToMemoryE not found, cannot apply R_X86_64_JUMP_SLOT @0x103402cc0 (0x1b05976)
Warning: Weak Symbol _ZTHN12CPlugFilePng16s_LoadPaletteIdsE not found, cannot apply R_X86_64_JUMP_SLOT @0x103402cc8 (0x1b05986)
Error: Symbol getservbyname_r not found, cannot apply R_X86_64_JUMP_SLOT @0x103402f10 (0x1b05e16) in /home/kupfer/TrackmaniaServer_Latest/TrackmaniaServer
Starting Trackmania date=2023-06-30_10_00 git=121459-0756db30791 GameVersion=3.3.0...
ManiaPlanet server daemon started with pid=34189 (parent=34183).
WARNING: No system configuration file
rajdakin commented 2 weeks ago

Is this fixed now?