Bug 43054

Summary: SSLManager causes stress tests to saturate and crash
Product: JMeter - Now in Github Reporter: Andrea Baroncelli <andreabaroncelli>
Component: HTTPAssignee: JMeter issues mailing list <issues>
Status: CLOSED FIXED    
Severity: normal    
Priority: P3    
Version: 2.3.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Attachments: Result of `diff -u SSLManager.java.orig SSLManager.java`

Description Andrea Baroncelli 2007-08-07 07:41:22 UTC
When attempting stress tests consisting of several sequential HTTPS user login 
requests at a relatively high rate (e.g. 200 threads or more at a rate of 1 
per second, i.e. a 200 second ramp-up period or less), I noticed that after 
some initial successful iterations all the successive authentications failed 
with timeout errors.
By inspecting the code I found an apparent contradiction in the following 
method of the class org.apache.jmeter.util.SSLManager:

/**
 * Static accessor for the SSLManager object. The SSLManager is a singleton.
*/
public static final SSLManager getInstance() {
  if (null == SSLManager.manager) {
    return new JsseSSLManager(SSLManager.sslProvider);
  }

  return SSLManager.manager;
}

As you can see, no caching is performed on the object SSLManager.manager (that 
remains unused), which causes high memory consumption and is likely to be the 
responsible of the observed faulty behaviour. By replacing

    return new JsseSSLManager(SSLManager.sslProvider);

with

    SSLManager.manager = new JsseSSLManager(SSLManager.sslProvider);

I could solve my issue.
Comment 1 Andrea Baroncelli 2007-08-07 07:44:10 UTC
Created attachment 20613 [details]
Result of `diff -u SSLManager.java.orig SSLManager.java`
Comment 2 Sebb 2007-08-10 11:24:52 UTC
Thanks for the report and patch.

This was a silly error introduced when the dynamic class loading was 
replaced ... mea culpa.

Fixed in SVN r564705
Comment 3 The ASF infrastructure team 2022-09-24 20:37:40 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/1989