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

--- Comment #18 from Sebb <[email protected]> 2011-09-27 08:11:58 UTC ---
(In reply to comment #17)
> Hello Sebb,
> I tested the fix and for me it introduces an issue:
> - I get the popup saying : "One or more test threads won't exit; see log 
> file."
> 
> 
> To reproduce issue , I run with 3 threads on 15 s rampup.
> I let 2 thread start and call stop at that time, you will see that the stopper
> thread may stay alive.

I don't get the problem. Are you running against the mirror, or a live site?

Can you attach a thread dump and jmeter log (INFO will do)?

> 
> Furthermore I think there is something wrong in the fix:
> - number of lock/unlock don't match, is this regular ?

The shutdown code takes the lock but does not release it. As the thread then
exits, it should not matter, but we could add an unlock at the end.

> - what forbidds stop from taking the lock before interrupt ? for me the latch
> did it because it was incremented in stop so run thread would be stopped until
> interrupt released the latch (I agree making that on public method may no be
> the best) that interrupt would countdown. But here if stop goes faster it will
> take the lock and interrupt will just wait, or maybe I have missed something.

stop does not take the lock; interrupt does. 

It rechecks the currentSampler within the lock to ensure it cannot run after
shutdown starts - if interrupt thread ran slowly it could see the value was
non-null but the main thread could start shutdown before the interrupt lock
started. The double-check prevents interrupt running after shutdown.

-- 
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