https://issues.apache.org/bugzilla/show_bug.cgi?id=51888

--- Comment #10 from Sebb <[email protected]> 2011-09-26 16:03:55 UTC ---
What appears to be the issue is that the interrupt may(In reply to comment #5)
> Hello,
> For me the issue is an HTTPClient one.
> It is not a problem that appears to be running threadFinished when interrupt 
> is
> still active.

Actually, I think this is a general problem; however so far only HC4 seems to
be affected by it.

> The explanation for this would be this kind of sequence:
> 1) Stopper thread (Thread-77 in my Thread Dump) first calls
> StandardJMeterEngine.tellThreadsToStop which calls stop() => Thread is
> suspended here
> 2) "Thread Group 1-32" gets stop call , run thread is stopped and we enter
> threadFinished => Thread is suspended
> 3) Stopper thread enters interrupt call and calls abort which is suspended 
> just
> before AbstractClientConnAdapter.abortConnection
> 4) "Thread Group 1-32" locks  
> org.apache.http.impl.conn.SingleClientConnManager
> through shutdown call

The explanation I have is slightly different; threads are S (engine) and T
(JMeterThread); numbers are time sequence:

T1) active sample in progress
S2) interrupt active sample
T3) sample completes
S4) [interrupt cleanup in progress]
T5) thread completes
S6) [interrupt cleanup still in progress]
T7) shutdown invoked

I tried adding a short pause between S6 and T7 and that fixed the problem for
me, as it allowed the interrupt to complete.

The fix in comment 6 works because it causes the JMeterThread code to wait
until the engine interrupt has finished.

I think the fix actually needs to be applied to JMeterThread instead so it
applies to all samplers, not just HC4.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to