dreamstalker / rehlds

Reverse-engineered HLDS
GNU General Public License v3.0
652 stars 167 forks source link

segfault rehlds #333

Open ladders1911757 opened 7 years ago

ladders1911757 commented 7 years ago

This problem in the 3.0.0.411-dev version

Feb 2 11:24:21 p398599 kernel: [558670.333173] hlds_linux [32353]: segfault at 180 ip 00000000f6f57d37 sp 00000000ffecaa40 error 4 in engine_i486.so [f6d90000 + 256000]

ladders1911757 commented 7 years ago

lsb_release -a No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 8.7 (jessie) Release: 8.7 Codename: jessie root@p398599:~# uname -a Linux p398599.kvmvps 3.16.0-4-amd64 #1 SMP Debian 3.16.36-1+deb8u1 (2016-09-03) x86_64 GNU/Linux

In-line commented 7 years ago

Can you provide some additional information?

ladders1911757 commented 7 years ago

which one?

In-line commented 7 years ago

Write something "Minimal, Complete, and Verifiable"

1) Minimal – Write as laconically as possible. 2) Complete – Write any info, anything needed to reproduce the problem. Give complete explanation, write what you done. 3) Verifiable – It'll be very good if we can reproduce problem if we repeated your actions.

(Stealed from Stack overflow)

WPMGPRoSToTeMa commented 7 years ago

Did you try older rehlds versions?

ladders1911757 commented 7 years ago

installed version 3.0.0.357, tests

LevShisterov commented 7 years ago

Install gdb (apt install gdb on debian). Run server with additional option -debug. Show debug.log after crash.

ladders1911757 commented 7 years ago

Thank you deliver, how will the log, apply here

ladders1911757 commented 7 years ago

357 is stable

ladders1911757 commented 7 years ago

Again

ReHLDS version: 3.0.0.357-dev

Feb 11 23:44:32 p398599 kernel: [1369941.347093] hlds_linux[32124]: segfault at 4 ip 00000000f6f14b6f sp 00000000ffebe0d0 error 4 in engine_i486.so[f6da7000+25c000]

Faced with this before?

LevShisterov commented 7 years ago

Installed gdb? Ran with -debug? Show debug.log please.

ladders1911757 commented 7 years ago

launched with -debug, waiting

ladders1911757 commented 7 years ago

I want to clarify. where this log file should be located?

LevShisterov commented 7 years ago

In the server root.

ladders1911757 commented 7 years ago

ok thx

ladders1911757 commented 7 years ago

debug.log not appeared after server crash

ladders1911757 commented 7 years ago

Feb 14 22:09:27 p398599 kernel: [1623435.915869] hlds_linux[20796]: segfault at 4 ip 00000000f6f22b6f sp 00000000ff8ebcc0 error 4 in engine_i486.so[f6db5000+25c000] Feb 14 23:10:34 p398599 kernel: [1627103.018552] hlds_linux[30986]: segfault at 4 ip 00000000f6efeb6f sp 00000000ffaa95a0 error 4 in engine_i486.so[f6d91000+25c000]

ladders1911757 commented 7 years ago

Both almost immediately after map change

ladders1911757 commented 7 years ago

set libkirl: i386

LevShisterov commented 7 years ago

Try latest versions. Post your info about crashes. Currently 411 and 357 versions point to different places. You can try to read this and use this metamod module to test core dump creation.

ladders1911757 commented 7 years ago

lol, sly Linux was not willing to do the dumps as root

ladders1911757 commented 7 years ago

did the same dump...

Mar 3 20:17:17 p398599 kernel: [1225614.909090] hlds_linux[23312]: segfault at 4 ip 00000000f6e520cf sp 00000000ffb03cb0 error 4 in engine_i486.so[f6ce7000+259000]

ReHLDS version: 3.0.0.426-dev ReGameDLL version: 5.2.0.172-dev

LevShisterov commented 7 years ago

Now you should change your rcon, that was in the dump. Also, this is not a core dump, but Valve's mini-dump. But may be this makes it easier to check. It was crashed at https://github.com/dreamstalker/rehlds/blob/9ecd02751820ac64add40de8233954503b8a221b/rehlds/engine/world.cpp#L315 But the reason is not so clear.

ladders1911757 commented 7 years ago

You can do something about it? Why is it just me going on? :)

ladders1911757 commented 7 years ago

the reason may be in some "crooked" plugin?

ladders1911757 commented 7 years ago

Any ideas? Here's a plug-in was I read that it could provoke a similar drop What do you think ? new_weapons.zip

In-line commented 7 years ago

@ladders1911757 You better provide a core dump. It is hard to understand crash reason now.

LevShisterov commented 7 years ago

@ladders1911757 It should be something with gEntityInterface.pfnTouch(touch, ent), when game dll (or plugins) code change triggers list there. I have no examples currently, because it is not yet known type of the crash. To get more info you can try to install debug versions of metamod and AMXX. I don't have them on hands.

ladders1911757 commented 7 years ago

Did coredump How to write here in a personal?

ladders1911757 commented 7 years ago

Here's a dump /removed/

theAsmodai commented 7 years ago

Looks like a jump to incorrect pointer. It's difficult to determine from where. Please change rcon_password.

In-line commented 7 years ago

@ladders1911757 You didn't remove it from yandex disk

ladders1911757 commented 7 years ago

What am I to do with this fall? I have already tried everything

In-line commented 7 years ago

@ladders1911757 Disable 3-rd party plugins one by one and get by that way reason of the crash

ladders1911757 commented 7 years ago

Thank you for your opinions, I will try

LevShisterov commented 7 years ago

Archive and upload all .so files from the server directory (including all nested folders) - required to debug core file.

ladders1911757 commented 7 years ago

I'll throw in the evening

ladders1911757 commented 7 years ago

REHLDS_so.zip

LevShisterov commented 7 years ago

(including all nested folders)

(gdb) info sharedlibrary From To Syms Read Shared Object Library No /home/cs-s1/libstdc++.so.6 No /home/cs-s1/libgcc_s.so.1 No /home/cs-s1/./cstrike/addons/metamod/dlls/metamod.so No /home/cs-s1/cstrike/dlls/cs.so No /home/cs-s1/cstrike/addons/amxmodx/dlls/amxmodx_mm_i386.so No cstrike/addons/amxmodx/modules/fun_amxx_i386.so No cstrike/addons/amxmodx/modules/cstrike_amxx_i386.so No cstrike/addons/amxmodx/modules/csx_amxx_i386.so No cstrike/addons/amxmodx/modules/engine_amxx_i386.so No cstrike/addons/amxmodx/modules/fakemeta_amxx_i386.so No cstrike/addons/amxmodx/modules/hamsandwich_amxx_i386.so No cstrike/addons/amxmodx/modules/mysql_amxx_i386.so No /home/cs-s1/cstrike/addons/reunion/reunion_mm_i386.so No /home/cs-s1/cstrike/addons/VoiceTranscoder/VoiceTranscoder.so No /home/cs-s1/cstrike/addons/SafeNameAndChat/SafeNameAndChat.so No /home/cs-s1/cstrike/addons/resemiclip/resemiclip_mm_i386.so No /home/cs-s1/cstrike/addons/reauthcheck/reauthcheck_mm_i386.so No /home/cs-s1/cstrike/addons/rechecker/rechecker_mm_i386.so No /home/cs-s1/cstrike/addons/whblocker/whblocker_mm_i386.so No cstrike/addons/amxmodx/modules/nvault_amxx_i386.so No cstrike/addons/amxmodx/modules/sockets_amxx_i386.so No cstrike/addons/amxmodx/modules/sockets2_amxx_i386.so

ladders1911757 commented 7 years ago

rehlds_so1.zip

LevShisterov commented 7 years ago

Ok, here is the data:

.text:0016B443 53 push ebx .text:0016B444 56 push esi .text:0016B44D FF 15 90 38 4C 00 call ds:gEntityInterface+10h .text:0016B453 E9 DC FC FF FF jmp loc_16B134

0xffa116f0: 0xc3864d78 0x44b106bc 0xc3a07c00 0xf6f34453 0xffa11700: 0xf34ac768 0xf348caa0

ent: 0xf348caa0
touch: 0xf34ac768

touch: (gdb) x /40xw 0xf34ac768 0xf34ac768: 0x00000001 0x0000005e 0x00000000 0x00000000 0xf34ac778: 0xffffffff 0x00000001 0x0760075d 0x01ea01e6 0xf34ac788: 0x06f701ed 0x068d068a 0x07530655 0x011e011d 0xf34ac798: 0x011e011e 0x00000000 0x00000000 0x00000000 0xf34ac7a8: 0x00000000 0x00000000 0x00000000 0x00000000 0xf34ac7b8: 0x00000000 0x00000000 0x00000000 0x00000000 0xf34ac7c8: 0x00000000 0x00000000 0x00000000 0x00000000 0xf34ac7d8: 0x00000000 0x00000000 0x45033ee5 0x00000000 0xf34ac7e8: 0xfc45cac8 0x00000000 0x00000000 0x00000000 0xf34ac7f8: 0x00000000 0x00000000 0x00000000 0x00000000 free: 1 prev: NULL next: NULL freetime: 2099.931 pvPrivateData: 0x00000000 entvars_t: v.classname: 0xfc45cac8

gGlobalVariables.pStringBase: 0xf6fdcb24

(gdb) printf "%s", 0xf6fdcb24+0xfc45cac8 throwing_knife

Touched ent is freed in touch handler. So, lets see now what you have about that classname.

LevShisterov commented 7 years ago

Probably it is https://forums.alliedmods.net/showthread.php?p=19610. Do you use somehow modified or original plugin?

ladders1911757 commented 7 years ago

Yes, I use this [ 8] Ultimate Knife 15.07.22 SKAJIbnEJIb ultimate_knife. running

ladders1911757 commented 7 years ago

The server crashes because of the throwing of the knife?

In-line commented 7 years ago

@ladders1911757 Try to disable it and check. 90% "Ultimate Knife" cause the problem.

ladders1911757 commented 7 years ago

Turned off the knife throw function in the plugin

hajimura commented 7 years ago

@ladders1911757, turn off the plugin fully

LevShisterov commented 7 years ago

Can you give a link to the plugin source?

ladders1911757 commented 7 years ago

Unfortunately the source of the plugin is hidden by the author

LevShisterov commented 7 years ago

Turned off the knife throw function in the plugin

But it looks like you have the source. Probably you can share parts of it. Interested in the code that use remove_entity.