Bug 51957 - Concurrent get can hang if a task does not complete
Concurrent get can hang if a task does not complete
Status: RESOLVED FIXED
Product: JMeter
Classification: Unclassified
Component: HTTP
2.5.1
PC Windows XP
: P2 normal (vote)
: ---
Assigned To: JMeter issues mailing list
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2011-10-04 23:32 UTC by Sebb
Modified: 2011-10-05 00:26 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sebb 2011-10-04 23:32:52 UTC
The concurrent get code uses a timed wait for task completion:

  exec.awaitTermination(AWAIT_TERMINATION_TIMEOUT, TimeUnit.SECONDS);

However, it then uses an unconditional get():

  for (Future<HTTPSampleResult> future : retExec) {
      final HTTPSampleResult binRes = future.get();

This will wait until task completion, which may be forever.

The solution is to use a very short timeout (the code has already waited for the required time) and catch the TimeoutException.
Comment 1 Sebb 2011-10-05 00:26:33 UTC
URL: http://svn.apache.org/viewvc?rev=1179017&view=rev
Log:
Bug 51957 - Concurrent get can hang if a task does not complete

Modified:
   jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java
   jakarta/jmeter/trunk/xdocs/changes.xml