Bug 43007 - Test ends before all threadgroups started
Summary: Test ends before all threadgroups started
Status: RESOLVED FIXED
Alias: None
Product: JMeter - Now in Github
Classification: Unclassified
Component: Main (show other bugs)
Version: 2.2
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-01 01:49 UTC by Christoph
Modified: 2007-08-11 11:06 UTC (History)
0 users



Attachments
Test this bug with this testplan (69.99 KB, text/plain)
2007-08-01 01:51 UTC, Christoph
Details
jmeter log file for failed run (16.41 KB, application/octet-stream)
2007-08-10 17:20 UTC, Christoph
Details
new testplan for testing this bug (64.27 KB, application/octet-stream)
2007-08-11 02:52 UTC, Christoph
Details
new jmeter.log file (25.21 KB, text/plain)
2007-08-11 02:55 UTC, Christoph
Details
logfile showing successful run (16.37 KB, text/plain)
2007-08-11 03:28 UTC, Christoph
Details
logfile showing failed run (27.25 KB, text/plain)
2007-08-11 03:32 UTC, Christoph
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph 2007-08-01 01:49:26 UTC
We have a test that consists of several threadgroups. The first testgroup 
contains an "if-controller", that can disable all requests in that testgroup. 
in some cases, the test ends and all other testgroups are not started.
Comment 1 Christoph 2007-08-01 01:51:57 UTC
Created attachment 20579 [details]
Test this bug with this testplan

you can test this bug with this testplan.
all threadgroups are disabled by if-controller except the last one, that should
make a request to google. as you can see, in most cases this request is not
executed.
Comment 2 Sebb 2007-08-10 11:45:54 UTC
Works fine for me.

Please attach the jmeter log file for a failing run.
Comment 3 Christoph 2007-08-10 17:20:44 UTC
Created attachment 20641 [details]
jmeter log file for failed run

this logfile was generated for a run where request in testgroup "test15" was
not executed.
this problem does not show up for every run, i have tested this script on 3
different windows-machines and in 3 of 10 times "test15" is not sampled.
Comment 4 Sebb 2007-08-10 22:59:09 UTC
The jmeter log is missing some information.

One difference from my tests is that the log contains messages like:

INFO  - jmeter.engine.StandardJMeterEngine: Ending thread 0

which I don't understand.

However the thread groups "Test15" does start and stop, so I suggest you add a 
dummy sampler to the thread group before and after the If Controller.

Also, it's very confusing to have multiple thread groups all called "Test14" - 
please remove/rename those.

How are you running the test? GUI? non-GUI? Remote?
Comment 5 Christoph 2007-08-11 02:52:01 UTC
Created attachment 20642 [details]
new testplan for testing this bug

- renamed all threadgroups
- all threadgroups disabled by if-controller except last one (test25)
- removed if-controller from last threadgroup
Comment 6 Christoph 2007-08-11 02:55:24 UTC
Created attachment 20643 [details]
new jmeter.log file

log file shows 2 runs, first run was not ok (threadgroup "test25" not
processed), second run was ok.

i'm running the test in GUI mode, but this problem does also occur in
non-GUI-mode.
Comment 7 Sebb 2007-08-11 03:04:30 UTC
Thanks for the updated test plan and log file.

However the logs are incomplete - I need the whole of each log file please.
Comment 8 Christoph 2007-08-11 03:28:36 UTC
Created attachment 20644 [details]
logfile showing successful run
Comment 9 Christoph 2007-08-11 03:32:58 UTC
Created attachment 20645 [details]
logfile showing failed run

i openend the testplan more than 10 times and the problem did not show up. 
in this logfile, the first run is OK, only in the second run the request in
testgroup "test25" was not sampled.

the problem is mostly occuring if a test is started more than 1 times. on my
PC, in most times the first run (after starting jmeter) is OK, and in the next
10 runs about 7 runs are failing.
Comment 10 Sebb 2007-08-11 04:54:36 UTC
Changed the version to 2.2, as that is what the log files show.

This at least explains the messages:

INFO  - jmeter.engine.StandardJMeterEngine: Ending thread 0

which were fixed in 2.3RC3.
Comment 11 Sebb 2007-08-11 08:56:33 UTC
Finally found the problem: when a thread group stops, the code checks to see 
if there were any other groups left.

Sometimes it would happen that all the earlier thread groups would complete 
before the next group was even created, so the count would be zero.

This is only likely to happen if the thread groups complete very quickly - as 
is the case here.

Fixed in SVN r564931.
Comment 12 Christoph 2007-08-11 10:42:00 UTC
thanks a lot for the bugfix!
i've tested this testplan also with R2.3, the problem is also occurring here 
(should be fixed here too).

cheers,
  christoph
Comment 13 Sebb 2007-08-11 11:06:36 UTC
The fix will be in the next release, probably 2.3 GA.

In the meantime, any nightly build after r564931 will have the fix if you want 
to try and break that ;-)

I forgot to say this earlier, so thanks for reporting the issue, and for 
providing the test cases/logs.
Comment 14 The ASF infrastructure team 2022-09-24 20:37:40 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/1985