https://bz.apache.org/bugzilla/show_bug.cgi?id=64499

            Bug ID: 64499
           Summary: Exiting JMeter when
                    "jmeterengine.stopfail.system.exit=true" takes too
                    much time if threads are not stopped
           Product: JMeter
           Version: 5.0
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Main
          Assignee: issues@jmeter.apache.org
          Reporter: p.moua...@ubik-ingenierie.com
  Target Milestone: JMETER_5.3.1

The setting "jmeterengine.stopfail.system.exit=true"  is intended to make
JMeter exit when some threads are still not stopped or hanged.

But currently this is what happens when test is stopped (now == true):
The StopTest thread if asked to stop now:
https://github.com/apache/jmeter/blob/master/src/core/src/main/java/org/apache/jmeter/engine/StandardJMeterEngine.java#L322

1) Asks threads of threads groups to stop
2) Pauses for 10ms * Number of threads (may be improvable by capping it to a
max of 30s), not the main problem
3) verifyThreadsStopped : 
a) The problem is here, the method continues to loop even if one
threadGroup.verifyThreadsStopped() returns false => Not optimal, I would
suggest to exit on first false
b) ThreadGroup#verifyThreadsStopped has the same problem but worst it waits 5s
per thread to join

So by default , if we have 100 threads still hanged , we end up waiting 
- Number of thread hanged * 10ms + Number of thread hanged * 5000 ms 


While if we exit on first false, we would wait :
- Number of thread hanged * 10ms + 5000 ms

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to