Bug 62760 - StackOverFlow error returned for IF controller when Loop count is set to forever
Summary: StackOverFlow error returned for IF controller when Loop count is set to forever
Status: NEW
Alias: None
Product: JMeter
Classification: Unclassified
Component: HTTP (show other bugs)
Version: 3.3
Hardware: All All
: P2 minor (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
: 61521 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-09-26 06:49 UTC by Rohit Pal
Modified: 2019-09-05 18:39 UTC (History)
3 users (show)



Attachments
Jmx file - Please refer attached jmx file wherein Loop count is set to Forever, under If controller - condition is set to false and Interpret condition as variable expression is uncheck (5.42 KB, application/xml)
2018-09-26 06:49 UTC, Rohit Pal
Details
Refer Log file for detail console log (120.91 KB, text/plain)
2018-09-26 06:52 UTC, Rohit Pal
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rohit Pal 2018-09-26 06:49:36 UTC
Created attachment 36162 [details]
Jmx file - Please refer attached jmx file wherein Loop count is set to Forever, under If controller - condition is set to false and Interpret condition as variable expression is uncheck

Under Thread Group, give any number of threads, rampup and scheduler duration as you need but set Loop count to forever.
Add If controller under same thread group and add one HTTP Sampler.
Under If controller, uncheck Interpret Condition as Variable Expression? and set condition is such a way that it should return false. For e.g "PASS"=="PASSED" (This will return false)
Now if you run the script, In console, you can find UncaughtException -- 

2018-09-26 11:25:06,132 ERROR o.a.j.JMeter: Uncaught exception: 
java.lang.StackOverflowError: null
	at org.apache.jmeter.threads.JMeterContextService.getContext(JMeterContextService.java:60) ~[ApacheJMeter_core.jar:5.0 r1840935]
	at org.apache.jmeter.engine.util.SimpleVariable.getVariables(SimpleVariable.java:65) ~[ApacheJMeter_core.jar:5.0 r1840935]
	at org.apache.jmeter.engine.util.SimpleVariable.toString(SimpleVariable.java:51) ~[ApacheJMeter_core.jar:5.0 r1840935]
	at org.apache.jmeter.engine.util.CompoundVariable.execute(CompoundVariable.java:142) ~[ApacheJMeter_core.jar:5.0 r1840935]
	at org.apache.jmeter.engine.util.CompoundVariable.execute(CompoundVariable.java:111) ~[ApacheJMeter_core.jar:5.0 r1840935]
	at org.apache.jmeter.testelement.property.FunctionProperty.getStringValue(FunctionProperty.java:101) ~[ApacheJMeter_core.jar:5.0 r1840935]
	at org.apache.jmeter.testelement.AbstractTestElement.getPropertyAsString(AbstractTestElement.java:281) ~[ApacheJMeter_core.jar:5.0 r1840935]
	at org.apache.jmeter.control.IfController.getCondition(IfController.java:177) ~[ApacheJMeter_core.jar:5.0 r1840935]
	at org.apache.jmeter.control.IfController.next(IfController.java:237) ~[ApacheJMeter_core.jar:5.0 r1840935]
	at org.apache.jmeter.control.GenericController.nextIsAController(GenericController.java:222) ~[ApacheJMeter_core.jar:5.0 r1840935]
	at org.apache.jmeter.control.GenericController.next(GenericController.java:175) ~[ApacheJMeter_core.jar:5.0 r1840935]
	at org.apache.jmeter.control.LoopController.next(LoopController.java:134) ~[ApacheJMeter_core.jar:5.0 r1840935]
	at org.apache.jmeter.control.LoopController.nextIsNull(LoopController.java:166) ~[ApacheJMeter_core.jar:5.0 r1840935]
	at org.apache.jmeter.control.GenericController.next(GenericController.java:170) ~[ApacheJMeter_core.jar:5.0 r1840935]
	at org.apache.jmeter.control.LoopController.next(LoopController.java:134) ~[ApacheJMeter_core.jar:5.0 r1840935]
	at org.apache.jmeter.control.GenericController.nextIsAController(GenericController.java:225) ~[ApacheJMeter_core.jar:5.0 r1840935]
	at org.apache.jmeter.control.GenericController.next(GenericController.java:175) ~[ApacheJMeter_core.jar:5.0 r18
Comment 1 Rohit Pal 2018-09-26 06:52:45 UTC
Created attachment 36163 [details]
Refer Log file for detail console log
Comment 2 Philippe Mouawad 2018-10-28 21:26:41 UTC
*** Bug 61521 has been marked as a duplicate of this bug. ***
Comment 3 Philippe Mouawad 2018-12-09 11:56:05 UTC
This behaviour exists since at least version 3.3.
Comment 4 justin 2019-03-12 04:01:28 UTC
(In reply to Rohit Pal from comment #1)
> Created attachment 36163 [details]
> Refer Log file for detail console log

Can you explain the use/purpose of your If Controller? why is your condition plainly "PASS"=="PASSED"

If you set an infinite loop that pings google for results, what are you expecting it to do instead of StackOverflow-ing?
Comment 5 Graham Russell 2019-09-05 18:39:55 UTC
Rohit Pal, what behavior were you trying to achieve in your script?
Is it to poll for a condition?
Or was it just to demonstrate the possibility of a crash?