Created attachment 28043 [details] Test plan to reproduce issue Running the attached Test Plan (I simplified by replacing HTTP Sampler by Debug Sampler), I get the following message: 2011/12/06 22:13:53 WARN - jmeter.control.TransactionController: Could not fetch SamplePackage 2011/12/06 22:13:53 ERROR - jmeter.samplers.SampleResult: sampleEnd called twice java.lang.Throwable: Invalid call sequence at org.apache.jmeter.samplers.SampleResult.sampleEnd(SampleResult.java:985) at org.apache.jmeter.control.TransactionController.next2(TransactionController.java:177) at org.apache.jmeter.control.TransactionController.next(TransactionController.java:101) at org.apache.jmeter.control.GenericController.nextIsAController(GenericController.java:195) at org.apache.jmeter.control.TransactionController.nextIsAController(TransactionController.java:139) at org.apache.jmeter.control.GenericController.next(GenericController.java:148) at org.apache.jmeter.control.TransactionController.next2(TransactionController.java:171) at org.apache.jmeter.control.TransactionController.next(TransactionController.java:101) at org.apache.jmeter.control.GenericController.nextIsAController(GenericController.java:195) at org.apache.jmeter.control.TransactionController.nextIsAController(TransactionController.java:139) at org.apache.jmeter.control.GenericController.next(GenericController.java:148) at org.apache.jmeter.control.TransactionController.next2(TransactionController.java:171) at org.apache.jmeter.control.TransactionController.next(TransactionController.java:101) at org.apache.jmeter.control.GenericController.nextIsAController(GenericController.java:186) at org.apache.jmeter.control.GenericController.next(GenericController.java:148) at org.apache.jmeter.control.LoopController.next(LoopController.java:108) at org.apache.jmeter.threads.AbstractThreadGroup.next(AbstractThreadGroup.java:75) at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:268) at java.lang.Thread.run(Thread.java:680) Issue occurs on 2.5.1 , 2.5 and 2.4.
Created attachment 28044 [details] Much simpler Test Plan
Created attachment 28045 [details] Test case where issue is always reproduced In fact, issue occurs when Throughput Controller decides not to run sample. So I created Test Plan where % is equal to 0 with one user and one iteration to simplify analysis.
Issue is due to the fact that when TPC decides to execute NO sampler, in next2 method of TransactionSampler: Sampler returnValue = super.next(); returnValue will be null so TransactionSampler thinks it has reached end of Controller so it executes sampleEnd, then next time when it has really reached end of controller we get the error.
Date: Tue Dec 6 22:28:51 2011 New Revision: 1211209 URL: http://svn.apache.org/viewvc?rev=1211209&view=rev Log: Bug 52296 - Getting ERROR sampleEnd called twice java.lang.Throwable: Invalid call sequence Modified: jmeter/trunk/src/core/org/apache/jmeter/control/TransactionController.java jmeter/trunk/xdocs/changes.xml
Date: Tue Dec 6 22:34:05 2011 New Revision: 1211212 URL: http://svn.apache.org/viewvc?rev=1211212&view=rev Log: Bug 52296 - Getting ERROR sampleEnd called twice java.lang.Throwable: Invalid call sequence Bug 52296 - TransactionController with Child ThrouputController : Getting ERROR sampleEnd called twice java.lang.Throwable: Invalid call sequence when TPC does not run sample Renamed issue
Created attachment 28051 [details] Test plan to reproduce
Issue is still here if TransactionSampler contains Controllers that may or may not execute sampler and in case of TPC if the total is not equal to 100%
Date: Wed Dec 7 21:52:39 2011 New Revision: 1211656 URL: http://svn.apache.org/viewvc?rev=1211656&view=rev Log: Bug 52296 - TransactionController with Child ThrouputController : Getting ERROR sampleEnd called twice java.lang.Throwable: Invalid call sequence when TPC does not run sample Modified: jmeter/trunk/src/core/org/apache/jmeter/control/TransactionController.java jmeter/trunk/xdocs/changes.xml
Issue affects TransactionController that have one or more children of type: - InterleaveController and subclasses - IfController - ThroughputController Where one of the children Controllers does not execute every time.
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/2673