Raised This Month: $48 Target: $400
 12% 

[ANY? / CSGO] ExecuteStringCommand Crash Fix


Post New Thread Reply   
 
Thread Tools Display Modes
Author
SM9
AlliedModders Donor
Join Date: Sep 2013
Location: United Kingdom
Plugin ID:
5819
Plugin Version:
0.5
Plugin Category:
Technical/Development
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Prevents StringCommands being executed too early.
    Old 09-08-2017 , 20:26   [ANY? / CSGO] ExecuteStringCommand Crash Fix
    Reply With Quote #1

    Firstly, I am not going to say how to reproduce the crash, but notably most CSGO servers are affected, even servers without Sourcemod (I am sorry about the misconception earlier)

    I am not sure if games like TF2, CSS etc are affected but the fix should work regardless minus the PTAH support.
    If you have a CSGO server you can install PTAH for enhanced protection at an even earlier stage.

    Optional requirements: PTAH (CSGO only)

    Credits to these guys for helping track down the exploit:
    Asherkin
    Voided
    Dr!fter
    OfficialSikari for helping figure out how to replicate the issue.

    Credits to komashchenko for PTAH.

    Thanks to Kinsi for helping me test it.
    Attached Files
    File Type: sp Get Plugin or Get Source (ExecuteStringCmdCrashFix.sp - 190 views - 1.3 KB)
    File Type: smx ExecuteStringCmdCrashFix.smx (4.9 KB, 109 views)
    __________________
    If you like my work and want to help support me, Please consider a Donation

    Last edited by SM9; 09-09-2017 at 13:33. Reason: Fixed error (0.5)
    SM9 is offline
    Kinsi
    Senior Member
    Join Date: Apr 2013
    Old 09-08-2017 , 20:29   Re: [CSGO] ExecuteStringCommand Crash Fix
    Reply With Quote #2

    This crash has driven me nuts over the past weeks because of how infrequently / randomly it happened, and i believe we might've finally found the culprit. A lot of thanks to Asherkin, Dr!fter and VoiDeD for doing pretty much all of the work tracking it down. PM'd asher and we'll have to hope for a quick patch, for the while, this does the job.

    Last edited by Kinsi; 09-08-2017 at 20:32.
    Kinsi is offline
    SM9
    AlliedModders Donor
    Join Date: Sep 2013
    Location: United Kingdom
    Old 09-08-2017 , 21:34   Re: [CSGO] ExecuteStringCommand Crash Fix
    Reply With Quote #3

    Updated to 0.3 -
    • Added logging to file.
    __________________
    If you like my work and want to help support me, Please consider a Donation

    Last edited by SM9; 09-08-2017 at 21:34.
    SM9 is offline
    SM9
    AlliedModders Donor
    Join Date: Sep 2013
    Location: United Kingdom
    Old 09-08-2017 , 23:03   Re: [ANY? / CSGO] ExecuteStringCommand Crash Fix
    Reply With Quote #4

    Updated to 0.4 -
    • Make sure server is processing (Apparently this was needed even though we don't block the server anyway?? wtf).
    __________________
    If you like my work and want to help support me, Please consider a Donation
    SM9 is offline
    KyleS
    SourceMod Plugin Approver
    Join Date: Jul 2009
    Location: Segmentation Fault.
    Old 09-09-2017 , 02:20   Re: [ANY? / CSGO] ExecuteStringCommand Crash Fix
    Reply With Quote #5

    Quote:
    Originally Posted by xCoderx View Post
    Firstly, I am not going to say how to reproduce the crash, but most servers which run Sourcemod are currently affected, and the SM dev team does not plan to fix the problem even though it only happens with servers that run Sourcemod.
    This isn't even close to accurate. SM may add some processing time to a client connection that makes this easier to trigger with your rudimentary steps to reproduce, but the cause is not SourceMod at all and has been explained to you a number of times by a number of people.
    KyleS is offline
    Visual77
    Veteran Member
    Join Date: Jan 2009
    Old 09-09-2017 , 03:38   Re: [ANY? / CSGO] ExecuteStringCommand Crash Fix
    Reply With Quote #6

    This was already in smac/rcon_lock
    Visual77 is offline
    FlawlessKush
    Member
    Join Date: Mar 2014
    Old 09-09-2017 , 07:42   Re: [ANY? / CSGO] ExecuteStringCommand Crash Fix
    Reply With Quote #7

    Quote:
    Originally Posted by Visual77 View Post
    This was already in smac/rcon_lock
    ??? so we dont need this then if we use smac or is this more effective?


    @xCoderx

    Code:
    [SM] Exception reported: Client index 10 is invalid (arg 3)
    L 09/09/2017 - 02:13:08: [SM] Blaming: ExecuteStringCmdCrashFix.smx
    L 09/09/2017 - 02:13:08: [SM] Call stack trace:
    L 09/09/2017 - 02:13:08: [SM]   [0] LogToFileEx
    L 09/09/2017 - 02:13:08: [SM]   [1] Line 51, C:\Users\Michael\Desktop\ExecuteStringCmdCrashFix.sp::ExecuteStringCommand
    L 09/09/2017 - 02:38:38: Error log file session closed.

    Last edited by FlawlessKush; 09-09-2017 at 08:04.
    FlawlessKush is offline
    KyleS
    SourceMod Plugin Approver
    Join Date: Jul 2009
    Location: Segmentation Fault.
    Old 09-09-2017 , 10:34   Re: [ANY? / CSGO] ExecuteStringCommand Crash Fix
    Reply With Quote #8

    Quote:
    Originally Posted by FlawlessKush View Post
    ??? so we dont need this then if we use smac or is this more effective?


    @xCoderx

    Code:
    [SM] Exception reported: Client index 10 is invalid (arg 3)
    L 09/09/2017 - 02:13:08: [SM] Blaming: ExecuteStringCmdCrashFix.smx
    L 09/09/2017 - 02:13:08: [SM] Call stack trace:
    L 09/09/2017 - 02:13:08: [SM]   [0] LogToFileEx
    L 09/09/2017 - 02:13:08: [SM]   [1] Line 51, C:\Users\Michael\Desktop\ExecuteStringCmdCrashFix.sp::ExecuteStringCommand
    L 09/09/2017 - 02:38:38: Error log file session closed.
    Yes, this engine/game issue has been fixed in plugins for roughly a decade now (as explained to both of them in IRC).
    KyleS is offline
    SM9
    AlliedModders Donor
    Join Date: Sep 2013
    Location: United Kingdom
    Old 09-09-2017 , 11:23   Re: [ANY? / CSGO] ExecuteStringCommand Crash Fix
    Reply With Quote #9

    Quote:
    Originally Posted by KyleS View Post
    Yes, this engine/game issue has been fixed in plugins for roughly a decade now (as explained to both of them in IRC).
    Quote:
    Originally Posted by KyleS View Post
    This isn't even close to accurate. SM may add some processing time to a client connection that makes this easier to trigger with your rudimentary steps to reproduce, but the cause is not SourceMod at all and has been explained to you a number of times by a number of people.
    Sorry about the confusion, it appears to be a game bug with the game itself.

    Quote:
    Originally Posted by FlawlessKush View Post
    ??? so we dont need this then if we use smac or is this more effective?


    @xCoderx

    Code:
    [SM] Exception reported: Client index 10 is invalid (arg 3)
    L 09/09/2017 - 02:13:08: [SM] Blaming: ExecuteStringCmdCrashFix.smx
    L 09/09/2017 - 02:13:08: [SM] Call stack trace:
    L 09/09/2017 - 02:13:08: [SM]   [0] LogToFileEx
    L 09/09/2017 - 02:13:08: [SM]   [1] Line 51, C:\Users\Michael\Desktop\ExecuteStringCmdCrashFix.sp::ExecuteStringCommand
    L 09/09/2017 - 02:38:38: Error log file session closed.
    If you are running CSGO and PTAH then this will be more effective as it blocks the string command at a lower level, otherwise its the same as smac_commands

    I have also fixed the error in 0.5, thanks for telling me about it.

    Updated to 0.5 -
    • Reordered logic, (Thanks Headline for sanitizing things)
    __________________
    If you like my work and want to help support me, Please consider a Donation

    Last edited by SM9; 09-09-2017 at 13:21.
    SM9 is offline
    Morell
    AlliedModders Donor
    Join Date: Jun 2010
    Location: World
    Old 09-10-2017 , 02:36   Re: [ANY? / CSGO] ExecuteStringCommand Crash Fix
    Reply With Quote #10

    The bug that fixes it might be this one?

    sourcemod.2.csgo.dll!__SourceHook_FHCls_ConCo mmandDispatchfalse::Func(CCommand const &) [GameHooks.cpp:45 + 0xa3]
    __________________
    Morell is offline
    Reply


    Thread Tools
    Display Modes

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 11:47.


    Powered by vBulletin®
    Copyright ©2000 - 2018, vBulletin Solutions, Inc.
    Theme made by Freecode