Bug 51957

Summary: Concurrent get can hang if a task does not complete
Product: JMeter Reporter: Sebb <sebb>
Component: HTTPAssignee: JMeter issues mailing list <issues>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 2.5.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   

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