alliedmodders / sourcepawn

A small, statically typed scripting language.
Other
369 stars 63 forks source link

i cant seem to get spcomp to execute. #835

Closed MparkG closed 2 years ago

MparkG commented 2 years ago

Good day.

i am trying to execute spcomp on my server. while it did work some years ago, under a different version of ubuntu, it does not do that anymore.

user@host:~/sourcemod-1.11.0-git6906-linux/addons/sourcemod/scripting$ ./spcomp
Speicherzugriffsfehler (Speicherabzug geschrieben)

That reads segmentation fault / memory access error. i have checked the additional apt installs, and they are all installed.

i also tried spcomp on my laptop, there manjaro runs, and it works just fine.

any ideas what to try or where to look?

this is what dmesg reports:

[8293990.372522] spcomp64[506838]: segfault at 8 ip 00007f7d64201a90 sp 00007ffe02c84df0 error 4 in ld-2.31.so[7f7d641f5000+23000]
[8293990.372531] Code: c0 0f 85 bd 15 00 00 49 8b 87 f0 00 00 00 48 89 85 18 ff ff ff 48 85 c0 0f 85 52 14 00 00 49 8b 47 68 49 83 bf f8 00 00 00 00 <48> 8b 40 08 48 89 85 40 ff ff ff 0f 84 97 0c 00 00 45 85 ed 74 5a
[8294051.762713] spcomp[506921]: segfault at 4 ip 00000000f7efe1d2 sp 00000000ffb2baf0 error 4 in ld-2.31.so[f7ef0000+1e000]
[8294051.762720] Code: 00 00 8b 40 08 85 c0 75 ef c7 85 80 fb ff ff 00 00 00 00 e9 14 04 00 00 8b b5 a0 fb ff ff 8b 46 34 89 b5 c0 fb ff ff 8b 76 08 <8b> 40 04 89 85 94 fb ff ff 89 85 cc fb ff ff 8b 45 14 89 85 c4 fb

ld-linux.so.2 -> ld-2.31.so and ld-linux is part of libc6 libc6 and libc6-i386 is installed in the current version.

thanks

dvander commented 2 years ago

Can you show the output of:

uname -a
lsb_release -a
MparkG commented 2 years ago
cssserver@mgp:~/serverfiles/cstrike/addons/sourcemod/scripting$ ./spcomp
Speicherzugriffsfehler (Speicherabzug geschrieben)
cssserver@mgp:~/serverfiles/cstrike/addons/sourcemod/scripting$ uname -a
Linux mgp 5.4.0-81-generic #91-Ubuntu SMP Thu Jul 15 19:09:17 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
cssserver@mgp:~/serverfiles/cstrike/addons/sourcemod/scripting$ lsb_release -a
LSB Version:    core-11.1.0ubuntu2-noarch:security-11.1.0ubuntu2-noarch
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.4 LTS
Release:        20.04
Codename:       focal
cssserver@mgp:~/serverfiles/cstrike/addons/sourcemod/scripting$ 

Wait, you are the legendary Bailopan? what an honor xD

might i add something offtopic; since a recent update of css and sm, the sm extension of cssdm together

Fyren commented 2 years ago

I installed 20.04.4 from their live ISO in a virtual machine, then installed the required 32-bit libraries (plus lsb-core, since you also have it), and spcomp doesn't segfault for me. I did end up on a different kernel patch level. You'll have to provide more information.

Can you run spcomp in gdb to get a back trace?

MparkG commented 2 years ago

incredible. im sorry to have wasted your time. Thanks for the tipp with gdb

(gdb) file serverfiles/cstrike/addons/sourcemod/scripting/spcomp
BFD: warning: /home/cssserver/serverfiles/cstrike/addons/sourcemod/scripting/spcomp has a corrupt section with a size (5a5f0076) larger than the file size
BFD: warning: /home/cssserver/serverfiles/cstrike/addons/sourcemod/scripting/spcomp has a corrupt section with a size (7473694c) larger than the file size
BFD: warning: /home/cssserver/serverfiles/cstrike/addons/sourcemod/scripting/spcomp has a corrupt section with a size (5a5f0076) larger than the file size
BFD: warning: /home/cssserver/serverfiles/cstrike/addons/sourcemod/scripting/spcomp has a corrupt section with a size (7473694c) larger than the file size
"/home/cssserver/serverfiles/cstrike/addons/sourcemod/scripting/spcomp": not in executable format: file format not recognized

I was wondering what it could have been, since spcomp worked years ago on the same computer. i updates changing something. but it was probably filezilla, breaking the file. it executes on my laptop with linux, i just copied it over via filezilla to the server. downloaded sm on the server with wget, extracted and voila it works. sorry.

Fyren commented 2 years ago

I've never used Filezilla, but you might have accidentally transferred the files in ASCII mode, which will mess it up.

dvander commented 2 years ago

Thanks for following up! Better to know the root cause than have it be a mystery.