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

New Feature: Watchdog Timer


Post New Thread Reply   
 
Thread Tools Display Modes
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 11-04-2015 , 13:28   Re: New Feature: Watchdog Timer
Reply With Quote #11

Quote:
Originally Posted by Potato Uno View Post
I think the watchdog timer begins a timer when a function in the plugin is first invoked, and if the whole operation takes more than 8 seconds it just kills the entire stack. I'm not sure however.
That is spot on, it's OnPluginStart that got killed.
__________________
asherkin is offline
Indarello
Senior Member
Join Date: Nov 2015
Location: Russia
Old 03-15-2016 , 05:43   Re: New Feature: Watchdog Timer
Reply With Quote #12

Code:
public OnPluginStart ()
{
    RegAdminCmd ("sm_evil", ClientExec, ADMFLAG_RCON);
}

public Action:ClientExec (client, args)
{
	new abc = 0;
	while (abc < 10)
	{
		new gfh = 1232144650;
		new rtv = gfh*23845243;
		abc++;
	}	
	ServerCommand("sm_evil");
	return Plugin_Handled;
}
watchdog dont stop it
Indarello is offline
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 03-15-2016 , 06:57   Re: New Feature: Watchdog Timer
Reply With Quote #13

Quote:
Originally Posted by Indarello View Post
Code:
public OnPluginStart ()
{
    RegAdminCmd ("sm_evil", ClientExec, ADMFLAG_RCON);
}

public Action:ClientExec (client, args)
{
	new abc = 0;
	while (abc < 10)
	{
		new gfh = 1232144650;
		new rtv = gfh*23845243;
		abc++;
	}	
	ServerCommand("sm_evil");
	return Plugin_Handled;
}
watchdog dont stop it
That's because the plugin is technically running and not holding up the server.
WildCard65 is offline
Visual77
Veteran Member
Join Date: Jan 2009
Old 02-13-2018 , 06:07   Re: New Feature: Watchdog Timer
Reply With Quote #14

[SM] Exception reported: Script execution timed out

Definitely not a prefect feature. Getting a false positive OnPluginStart when a KeyValuesToFile is being read. Text file is 3,58 MB
Visual77 is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 02-13-2018 , 06:09   Re: New Feature: Watchdog Timer
Reply With Quote #15

Quote:
Originally Posted by Visual77 View Post
[SM] Exception reported: Script execution timed out

Definitely not a prefect feature. Getting a false positive OnPluginStart when a KeyValuesToFile is being read. Text file is 3,58 MB
That is not a false positive.
__________________
asherkin is offline
Visual77
Veteran Member
Join Date: Jan 2009
Old 02-13-2018 , 06:16   Re: New Feature: Watchdog Timer
Reply With Quote #16

Quote:
Originally Posted by asherkin View Post
That is not a false positive.
Care to explain. If I make the text file smaller. (1kb, 13 lines - no errors).
Solution, disable watchdog feature or increase SlowScriptTimeout heavily?

Asherskin, how about this one then.

Code:
L 02/13/2018 - 12:03:16: SourceMod error session started
L 02/13/2018 - 12:03:16: Info (map "c8m1_apartment") (file "errors_20180213.log")
L 02/13/2018 - 12:03:16: [SM] Exception reported: Script execution timed out
L 02/13/2018 - 12:03:16: [SM] Unable to load plugin "l4d2_m60_ammo_refill.smx": Fatal error during plugin initialization (ext req)
It requests sdktools I assume. With SlowScriptTimeOut 0 no error there. Reloading the plugin works.

Last edited by Visual77; 02-13-2018 at 06:29.
Visual77 is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 02-13-2018 , 06:29   Re: New Feature: Watchdog Timer
Reply With Quote #17

I'd say your HDD is dying, it shouldn't be taking 8 seconds to read and parse a 3.5MB text file, your server must take forever to startup given SRCDS' heavy disk usage.

But, the watchdog is working exactly as intended: a plugin is executing for more than SlowScriptTimeout seconds without returning to the game loop -> kill the plugin.
__________________
asherkin is offline
Visual77
Veteran Member
Join Date: Jan 2009
Old 02-13-2018 , 06:38   Re: New Feature: Watchdog Timer
Reply With Quote #18

Oh, I wasn't thinking again. These errors are coming from my laptop, sorry.
However, found it really weird that one plugin out of +100 can't find sdktools when all the others do. Lol

Ok, so we have it all sorted out. Stupidity again

Last edited by Visual77; 02-13-2018 at 06:39.
Visual77 is offline
Reply



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 22:58.


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