Threads slow down and freeze

dariesto

Client
Регистрация
03.11.2011
Сообщения
124
Благодарностей
9
Баллы
18
Hi Guys,


I have noticed that after several hundreds up to approx. two thousand attemps, threads start to slow down or even freeze without any error indication in the log tab in ZennoPoster.

It happens on Win XP SP3, all NET frameworks installed (2.0 SP2, 3.0 SP2, 3.5 SP1 and 4.0 Client Profile + Extended), ZennoPoster versions: 4.2.0.0 and 4.2.5.0.

The nonCriticalErrors.txt it is full of such logs

DEBUG|ZennoLab.FileManager.Manager|System.ArgumentException: The path is not of a legal form.
at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength)
at System.IO.Path.GetFullPathInternal(String path)
at System.IO.FileInfo..ctor(String fileName)
at ZennoLab.FileManager.Manager.VdNWku0KWs(Object )
also noted that the log file grows and grows even to hundreds megabytes.

Simetimes in the log I can find
ERROR|ZennoLab.ZennoPoster.Tasks.Threads.ServerBase|Failed to test the connection to the base process
(but it is rare comparing to the first example).

Thanks in advance for help.
 

dariesto

Client
Регистрация
03.11.2011
Сообщения
124
Благодарностей
9
Баллы
18
I have already managed what caused that error (the first mentioned), there was a table in the project which was configured with "Load from file" option selected but the path to file wasn't entered due to the fact that in the project there is an action "Bind to file" for that table. It was enough to simply uncheck option for loading table from file and error never occured anymore.

However after running project for approx. 30 minutes and ~1000 attemps another new error started to fill the log file.

Here it is:

DEBUG|CommandTransfer.MessagePerformer|System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Microsoft.JScript.JScriptException: Expected expression
at Microsoft.JScript.DocumentContext.HandleError(JScriptException error)
at Microsoft.JScript.Context.HandleError(JSError errorId, String message, Boolean treatAsError)
at Microsoft.JScript.JSParser.EOFError(JSError errorId)
at Microsoft.JScript.JSParser.ReportError(JSError errorId, Context context, Boolean skipToken)
at Microsoft.JScript.JSParser.ReportError(JSError errorId, Boolean skipToken)
at Microsoft.JScript.JSParser.ParseLeftHandSideExpression(Boolean isMinus, Boolean& canBeAttribute, Boolean warnForKeyword)
at Microsoft.JScript.JSParser.ParseUnaryExpression(Boolean& isLeftHandSideExpr, Boolean& canBeAttribute, Boolean isMinus, Boolean warnForKeyword)
at Microsoft.JScript.JSParser.ParseExpression(AST leftHandSide, Boolean single, Boolean bCanAssign, JSToken inToken)
at Microsoft.JScript.JSParser.ParseStatement()
at Microsoft.JScript.JSParser.ParseStatements(Boolean insideEval)
at Microsoft.JScript.Eval.DoEvaluate(Object source, VsaEngine engine, Boolean isUnsafe)
at Evaluator.Evaluator.Eval(String expr)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
at Global.JS.Evaluator.Eval(String jscode)
at CommandTransfer.MessagePerformer.Y2yhXU41wXkHSd5u3Nq(Object )
at CommandTransfer.MessagePerformer.eVTbiXyK1p(Object , EventArgs )

After 6 hours while it worked at 15 threads it made log file (nonCriticalErrors.txt) 12mb of size, and listing occurred more than 5 thousand times.

Also
ERROR|ZennoLab.ZennoPoster.Tasks.Threads.ServerBase|Failed to test the connection to the base process
started to be recorded more often.

Threads similarly as before slowed down and cannot finish their work.
 

Hungry Bulldozer

Moderator
Регистрация
12.01.2011
Сообщения
3 441
Благодарностей
834
Баллы
113
I have already managed what caused that error (the first mentioned), there was a table in the project which was configured with "Load from file" option selected but the path to file wasn't entered due to the fact that in the project there is an action "Bind to file" for that table. It was enough to simply uncheck option for loading table from file and error never occured anymore.

However after running project for approx. 30 minutes and ~1000 attemps another new error started to fill the log file.

Here it is:




After 6 hours while it worked at 15 threads it made log file (nonCriticalErrors.txt) 12mb of size, and listing occurred more than 5 thousand times.

Also started to be recorded more often.

Threads similarly as before slowed down and cannot finish their work.
Does first error happen for one specific site? Since it could be related with JS on this site. Another reason is youк own JavaScript if you use any. It might be also logic statement.
About the second error - try to set instance reloading more often. Do not loop inside project.
 

dariesto

Client
Регистрация
03.11.2011
Сообщения
124
Благодарностей
9
Баллы
18
Actually I have loops in project, but these are simple loops, first one is to find right proxy (checking if proxy is reserved, banned or it's interval for next use passed), second loop is to send pings to all xml-rpc servers in the list. Conditions to exit loops are determined by counters. In the debugger it goes without any errors, in ZennoPoster it goes on 15 threads for hundreds attemps and start to slow down and both errors in log file are recorded.

Now when tried on 50 threads and fired 100 attemps at finish 3 threads are keep working and in the nonCriticalErrors.txt is recorded repeatedly
ERROR|ZennoLab.ZennoPoster.Tasks.Threads.ServerBase|Failed to test the connection to the base process
and no errror related to javascript (the first mentioned).

How is possible that loops can cause this error when they can also perform work perfectly for hundreds of times (on 15 threads).

If required I can send project file for tests with description.
 

dariesto

Client
Регистрация
03.11.2011
Сообщения
124
Благодарностей
9
Баллы
18
Ok, I also found what caused that javascript error, it was empty variable on the left side in the "IF", it was empty because the two actions before was pulled value (unix timestamp) from empty file (which definitely schouldn'd be empty) then another action (javascript) was calculating interval between current timestamp and that pulled from file
Код:
(Math.round((new Date()).getTime() / 1000)-{-Variable.proxy_last_use_time-})
it failed for two reasons (didn't generated timestamp and there was no second value in it) and variable that schould store execution from javascript was empty, therefore following step (IF) generated error in log.

So I finally reached problem which is in the javascript action that after # number of attemps fail to generate timestamp.

Now I have in the nonCriticalErrors.txt:
Failed to start the thread of the base (in excess of a timeout)
and
Failed to close the thread of the base
...and after 273 attemps threads are freezed (in ZP shows that 15 threads are in use).

While threads where freezed in ZP I started to debug project in PM and what I found was that first "IF" didn't worked (no any indaction, true or false in the log).

Assuming problem is in the javascript actions and IF's.
 

Hungry Bulldozer

Moderator
Регистрация
12.01.2011
Сообщения
3 441
Благодарностей
834
Баллы
113
Please set less instances per base and test. Set base reloading more often as well.
 

dariesto

Client
Регистрация
03.11.2011
Сообщения
124
Благодарностей
9
Баллы
18
Thanks for reply. It helped but not completely, threads slowed and stopped after 4k and 5k attemps. Number of instances per base.exe process 2 and later 1. Reload of instance afeter 6 tasks. When stopping single error related to base process occured in log.
 

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)