-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Server Crash on "quit" #47
Comments
So it actually seems that this crash could happen due to these: Without these the server stops fine after almost 2 seconds (via LinuxGSM). |
JetPack_Fix has been merged into live tf2, it's safe to remove. Source-vehicles is unlikely the source of your crash. Try to isolate the root cause, by running either Slender or Source-Vehicles only. |
They are not running together at the same time. My GameMode Manager disables plugins of the current gamemode and enables plugins of the next gamemode in |
Those could be still different crash then. It'd be tremendously useful if you could somehow generate a minidump. |
That's so weird |
That makes your issue more clear. Now we can clearly establish a link to CBaseNPC, however without any minidump I'm afraid this issue will remain in limbo for another good while. |
But I really can't get any minidump when the server is stopping it does not seem to track any crash to generate the dump for. |
You'll need to attach a debugger to the srcds process, so that it can outlive metamod and sourcemod. And then generate a minidump from that. This will require familiarity with debuggers however. Alternatively, if you can create the absolute minimal reproduction case, no extra extensions, no extra plugins, and transmit it as a zip file. I could investigate this on my own. |
So the gdb thrown this:
Idk if this is the line it's talking about: if (g_pSDKHooks) {
g_pSDKHooks->RemoveEntityListener(this);
} |
Definitively dangling pointers CBaseNPC/extension/extension.cpp Lines 260 to 274 in b5dd18a
They should set back to nullptr here. I'm surprised the dependency system doesn't catch thisCBaseNPC/extension/extension.cpp Lines 107 to 109 in b5dd18a
In any case, if you feel up to it. You can compile the extension yourself with the fix I mentioned, otherwise I'll open a pull request later today. |
Did you mean directly setting the pointer to null like this? if (interface == g_pSDKHooks) {
g_pSDKHooks = nullptr;
return false;
} And should I do the same with other interface pointers? |
Yeah, it seems that this fixed the crash. My problem was that I first built the ext on my Arch (btw) and as it turned out I have a little higher GLIBC version (2.38) than the one on my Ubuntu server (2.35). So I had to clone all of the stuff (SDK, SM, MM:S, AMBuild) and install some new stuff (Clang is one of them) on my server. Then I forgor to apply the fix and thought it didn't work 😆 |
I will enable all of the disabled plugins to see if it's not crashing anymore and if it's fine I'll close this issue. |
Yeah, I have enabled all of the problematic plugins which use CBaseNPC. Now my server stops correctly. |
Thank you for all your troubleshooting, and field testing the fix. Feel free to PR in the fix ! |
This extensions crashes my Linux server (local on Arch) when i run
quit
(via LinuxGSM'stf2server stop
) to stop the server.There are no any errors or dumps when this happens. Accelerator doesn't seem to notice this kind of crash because it happens on SDK unload, after these lines:
Then all i see in logs is the message about server restarting in 10 seconds.
And server crashes even if i don't use extension features in any plugin, the extension just need to be loaded to crash.
But it doesn't crash if i unload it via
sm exts unload
though.The text was updated successfully, but these errors were encountered: