Bug 45976 - incomplete result file when remote testing with more than 1 server
Summary: incomplete result file when remote testing with more than 1 server
Status: RESOLVED FIXED
Alias: None
Product: JMeter - Now in Github
Classification: Unclassified
Component: HTTP (show other bugs)
Version: 2.3.2
Hardware: Sun Solaris
: P2 normal (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-09 07:39 UTC by frank.diedrich
Modified: 2008-10-10 16:42 UTC (History)
0 users



Attachments
logs from example runs (13.00 KB, application/x-zip-compressed)
2008-10-09 07:39 UTC, frank.diedrich
Details

Note You need to log in before you can comment on or make changes to this bug.
Description frank.diedrich 2008-10-09 07:39:27 UTC
Created attachment 22702 [details]
logs from example runs

running a test with a couple of http-requests on e.g. 3 remote hosts ends up in a csv-result file that contains not all entries for the requests. The results from the host which finished first are complete, but all following results are lost.

To prove my assertion I did 2 runs (5 and 10 threads) of a test plan with 9-http-requests and inspected the logs (client-log, server-log and result-files are attached).

1st run:
9 requests x 5 user/threads = 45 samples per remote host expected
start/end from client-log:
jmeter.JMeter: Started remote host:  server-3 (1223557140659)
jmeter.JMeter: Started remote host:  server-2 (1223557140672)
jmeter.JMeter: Started remote host:  server-1 (1223557140719)
jmeter.JMeter: Finished remote host: server-1 (1223557162864)
jmeter.JMeter: Finished remote host: server-3 (1223557163090)
jmeter.JMeter: Finished remote host: server-2 (1223557163128)
csv contains 45 samples from server-1, 41 from server-2 and 41 from server-3

2nd run:
9 requests x 10 user/threads = 90 samples per remote host expected
jmeter.JMeter: Started remote host:  server-2 (1223558448230)
jmeter.JMeter: Started remote host:  server-3 (1223558448236)
jmeter.JMeter: Started remote host:  server-1 (1223558448243)
jmeter.JMeter: Finished remote host: server-3 (1223558491281)
jmeter.JMeter: Finished remote host: server-1 (1223558491458)
jmeter.JMeter: Finished remote host: server-2 (1223558491598)
csv contains 90 samples from server-3, 84 from server-1 and 86 from server-2
Comment 1 Sebb 2008-10-09 07:56:48 UTC
Were you running the client JMeter engine in non-GUI mode?

If so, what happens if you run in GUI mode? Do all the results get returned?
Comment 2 frank.diedrich 2008-10-09 08:54:32 UTC
>Were you running the client JMeter engine in non-GUI mode?

yes, the examples were taken from the engine in non-GUI mode

>what happens if you run in GUI mode? Do all the results get returned?

yes, all samples get returned

Comment 3 Sebb 2008-10-09 09:03:54 UTC
OK, thanks.

It looks like non-GUI mode is exitting before all the samples have been processed.

I'm not yet sure how that can happen.
Comment 4 Sebb 2008-10-10 13:26:56 UTC
Further investigation shows that test is finising normally, but the file is being closed too early. [Also, the same problem can occur in GUI tests.]

The files are written by the ResultCollector class. Its testEnded() method checks the Set of hosts to see if there are any other tests running. However this check is faulty, because the Set of hosts is local to the class instance, and there will be one instance per remote server.

==

A work-round in the meantime is to ensure that there is a pause at the end of the test plan. The pause must be long enough to ensure that the last sample reaches the client before the first test completes.

The Test Action sampler can be used for this as it does not generate a sample.  If there is only one Thread Group in the test plan, then add a second thread group with one thread containing the Test Action sampler, and set the thread groups to run consecutively.

The bug only affects tests which run on multiple hosts at once.
Comment 5 Sebb 2008-10-10 16:42:01 UTC
Fix committed to SVN trunk:

URL: http://svn.apache.org/viewvc?rev=703603&view=rev
Log:
Bug 45976 - incomplete result file when using remote testing with more than 1 server

If you want to try this out, nightly builds after r703603 will have the fix.
Comment 6 The ASF infrastructure team 2022-09-24 20:37:42 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/2160