Bug 51865 - Infinite loop inside thread group does not work properly if "Start next loop after a Sample error" option set
Infinite loop inside thread group does not work properly if "Start next loop ...
Status: RESOLVED FIXED
Product: JMeter
Classification: Unclassified
Component: Main
2.5
All All
: P2 critical (vote)
: ---
Assigned To: JMeter issues mailing list
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2011-09-22 06:27 UTC by Oleg
Modified: 2012-01-15 13:44 UTC (History)
1 user (show)



Attachments
Scenario for reproducing error (16.43 KB, application/octet-stream)
2011-09-22 06:27 UTC, Oleg
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Oleg 2011-09-22 06:27:05 UTC
Created attachment 27555 [details]
Scenario for reproducing error

I tried to use new feature of JMeter2.5 "Start next loop".
There is infinite loop in thread group, it provide some users's scenario. 
If error occured in the sampler which is inside loop, then behaviour of jmeter is strange. According to "View Results Tree" listener, it doesn't do anything, but thread remain active.
I prepared simplified example for reproducing this bug(attachment).
After running, it executes 3 loops and stopped (if no any errors occured)
Then enable sampler "(failed)Load page" (it must cause error)and run scenario again, and look at VRT. After first error, no any other samplers executed, but thread is still active. It do something depending on parameter "Forever" of loop. If definite count if iterations is set, some delay between loops present(about 10 seconds for 1000 iterations)  but none the less scenario remain working.
Comment 1 Oleg 2011-09-22 06:31:32 UTC
For reproducing the bug please set "Forever" option for "Main actions(loop)"
Comment 2 Oleg 2011-09-22 11:11:09 UTC
I turned on DEBUG logging
Such strings are repeated in log:
2011/09/22 15:08:31 DEBUG - jmeter.testelement.property.AbstractProperty: Running version, executing function 
2011/09/22 15:08:31 DEBUG - jmeter.control.GenericController: Calling next on: org.apache.jmeter.control.LoopController 
2011/09/22 15:08:31 DEBUG - jmeter.control.GenericController: Calling next on: org.apache.jmeter.control.LoopController 
2011/09/22 15:08:31 DEBUG - jmeter.control.GenericController: Calling next on: org.apache.jmeter.control.LoopController 
2011/09/22 15:08:31 DEBUG - jmeter.control.GenericController: Calling next on: org.apache.jmeter.control.LoopController 
2011/09/22 15:08:31 DEBUG - jmeter.control.GenericController: Calling next on: org.apache.jmeter.control.LoopController 
2011/09/22 15:08:31 DEBUG - jmeter.control.GenericController: Calling next on: org.apache.jmeter.control.LoopController 
2011/09/22 15:08:31 DEBUG - jmeter.control.GenericController: Calling next on: org.apache.jmeter.control.LoopController 
2011/09/22 15:08:31 DEBUG - jmeter.control.GenericController: Calling next on: org.apache.jmeter.control.LoopController 
2011/09/22 15:08:31 DEBUG - jmeter.control.GenericController: Calling next on: org.apache.jmeter.control.LoopController 
may it can help to resolve problem?
Comment 3 Philippe Mouawad 2011-09-23 14:01:57 UTC
Issue is fixed in Trunk (upcoming 2.5.1).

Regards
Philippe Mouawad
Comment 4 Philippe Mouawad 2011-09-23 17:08:58 UTC
Hello,
2.5.1 should be available within 2 or 3 days.
Meanwhile if you can build JMeter from source and check issue is fixed for you it would be great.
Otherwise test when 2.5.1 is available and answer by saying:
- OK we will close issue
- KO => Describe Issue

That's the info needed.

Regards
Philippe Mouawad
Comment 5 Philippe Mouawad 2011-09-23 17:32:29 UTC
You can get last nightly build here if you don't want to build:
https://builds.apache.org/job/JMeter-trunk/lastSuccessfulBuild/artifact/trunk/dist/

Regards
Philippe
Comment 6 Philippe Mouawad 2011-10-31 10:52:12 UTC
Date: Mon Oct 31 10:50:11 2011
New Revision: 1195404

URL: http://svn.apache.org/viewvc?rev=1195404&view=rev
Log:
Fix to Start Next Loop broken feature, fixes following issues:
- Bug 51865 - Infinite loop inside thread group does not work properly if "Start next loop after a Sample error" option set
- Bug 51868 - A lot of exceptions in jmeter.log while using option "Start next loop" for thread
- Bug 51866 - Counter under loop doesn't work properly if "Start next loop on error" option set for thread group


Added:
   jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/FindTestElementsUpToRootTraverser.java   (with props)
Modified:
   jakarta/jmeter/trunk/src/components/org/apache/jmeter/control/ForeachController.java
   jakarta/jmeter/trunk/src/core/org/apache/jmeter/control/Controller.java
   jakarta/jmeter/trunk/src/core/org/apache/jmeter/control/GenericController.java
   jakarta/jmeter/trunk/src/core/org/apache/jmeter/control/IfController.java
   jakarta/jmeter/trunk/src/core/org/apache/jmeter/control/LoopController.java
   jakarta/jmeter/trunk/src/core/org/apache/jmeter/control/RunTime.java
   jakarta/jmeter/trunk/src/core/org/apache/jmeter/control/WhileController.java
   jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/AbstractThreadGroup.java
   jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterThread.java
   jakarta/jmeter/trunk/xdocs/changes.xml
Comment 7 Philippe Mouawad 2011-11-01 10:05:51 UTC
Hello,
A Fix has been provided, it would be Nice of you to test it and submit a comment confirming it is fixed for you.

Regards
Comment 8 Oleg 2011-12-13 13:18:32 UTC
verified on 0 - my simplified example works OK
Comment 9 Philippe Mouawad 2012-01-15 13:44:14 UTC
Thanks for verification.
Marking issue as RESOLVED to avoid it appearing in Bug Report.