Long callback execution detected (hang or performance issue)
tr1xy opened this issue ยท 12 comments
[14:48:50] [debug] Long callback execution detected (hang or performance issue)
[14:48:50] [debug] AMX backtrace:
[14:48:50] [debug] #0 0000a22c in Opcode:UnrelocateOpcode (Opcode:opcode=-1220407287) at C:\Users\Nemanja\Desktop\Valyria\pawno\include\YSI_Data\y_foreach\..\..\YSI_Coding\y_va\..\..\YSI_Core\y_core\..\..\amx\opcode.inc:831
[14:48:50] [debug] #1 00011058 in CodeScanRunFastPrescan (&proc=@0178b498 -8062576, &nextaddr=@0178b494 -8075992, searchFuncAddr=44812) at C:\Users\Nemanja\Desktop\Valyria\pawno\include\YSI_Data\y_foreach\..\..\YSI_Coding\y_va\..\..\YSI_Core\y_core\..\..\amx\codescan.inc:827
[14:48:50] [debug] #2 000114cc in bool:CodeScanRunFast (csState[CodeScanner:164]=@0178bcb4, searchFuncAddr=44812) at C:\Users\Nemanja\Desktop\Valyria\pawno\include\YSI_Data\y_foreach\..\..\YSI_Coding\y_va\..\..\YSI_Core\y_core\..\..\amx\codescan.inc:866
[14:48:50] [debug] #3 000133d8 in AddressofResolve () at C:\Users\Nemanja\Desktop\Valyria\pawno\include\YSI_Data\y_foreach\..\..\YSI_Coding\y_va\..\..\YSI_Core\y_core\..\..\amx\addressof_jit.inc:130
[14:48:50] [debug] #4 00013b38 in public AMX_OnCodeInit () at C:\Users\Nemanja\Desktop\Valyria\pawno\include\YSI_Data\y_foreach\..\..\YSI_Coding\y_va\..\..\YSI_Core\y_core\y_thirdpartyinclude.inc:367
[14:48:50] [debug] #5 0000343c in public Debug_OnCodeInit () at C:\Users\Nemanja\Desktop\Valyria\pawno\include\YSI_Data\y_foreach\..\..\YSI_Core\y_core\y_amx_impl.inc:206
[14:48:50] [debug] #6 00002d90 in public ScriptInit_OnCodeInit () at C:\Users\Nemanja\Desktop\Valyria\pawno\include\YSI_Data\y_foreach\..\..\YSI_Core\y_core\y_debug_impl.inc:644
[14:48:50] [debug] #7 00002644 in ScriptInit_CallOnCodeInit (bool:jit=false) at C:\Users\Nemanja\Desktop\Valyria\pawno\include\YSI_Data\y_foreach\..\..\YSI_Core\y_core\y_scriptinit_impl.inc:392
[14:48:50] [debug] #8 00002924 in public OnGameModeInit () at C:\Users\Nemanja\Desktop\Valyria\pawno\include\YSI_Data\y_foreach\..\..\YSI_Core\y_core\y_scriptinit_impl.inc:582
It's meant to do that.
How is this useful though....?
I had to disable long hang cuz my commands wouldn't work (even tho gamemode was functional (everything except pawn.cmd))
@tr1xy use
long_call_time 0
in server.cfg to disable this feature
I did already but this is pointless to have, especially when having YSI and OnScriptInit everywhere...
How long a top-level callback call should last before crashdetect prints a warning. This can be set very high (for example 1000000) to only detect functions that have totally hung, or very low (500) to detect functions that complete, but are just slow (thus affecting overall server execution and sync). Default value is 5000 (5 milliseconds).
(Zeex)
OnGameModeInit loaded sometimes very long time. So its semi-bug now.
This function very usefully to detect slow functions. But inappropriately for OnGameModeInit, it seems to me...
Is it possible to disable only public OnGameModeInit in CrashDetect?
How long a top-level callback call should last before crashdetect prints a warning. This can be set very high (for example 1000000) to only detect functions that have totally hung, or very low (500) to detect functions that complete, but are just slow (thus affecting overall server execution and sync). Default value is 5000 (5 milliseconds).
(Zeex)
OnGameModeInit loaded sometimes very long time. So its semi-bug now.
This function very usefully to detect slow functions. But inappropriately for OnGameModeInit, it seems to me...
Is it possible to disable only public OnGameModeInit in CrashDetect?
Similar to #pragma unused [arg]
(removes warning for unused function argument), there could a constant that we could define in function that would disable this check for that function?
But a simple solution would be to remove OnGamemodeInit and OnFilterscriptInit from the check because it is expected that most server will have slow functions there.
Yeah, especially heavy MySql loading... Anyways it doesn't matter as it is just a single ignore-able warning.
How is this useful though....?
I had to disable long hang cuz my commands wouldn't work (even tho gamemode was functional (everything except pawn.cmd))
If it stops something working that is a totally different bug and should be reported as such. This code should not stop anything working, just report slow code so you can try and make it faster.
However, you can disable it temporarily:
samp-plugin-crashdetect/include/crashdetect.inc
Lines 58 to 116 in ee69248
Yeah, especially heavy MySql loading... Anyways it doesn't matter as it is just a single ignore-able warning.
Again, the feature is to report potential issues in your code - if your MySQL loading is reported, that implies it is not threaded, which means again the plugin is working correctly to report a potential issue. You can't write bad code then complain that it is being reported as bad! Fix the code.
Also, the latest version of YSI already uses those functions I posted to disable the checks during its own startup, so if you're getting the errors you need to update YSI.