Bug 43054 - SSLManager causes stress tests to saturate and crash
Summary: SSLManager causes stress tests to saturate and crash
Status: CLOSED FIXED
Alias: None
Product: JMeter - Now in Github
Classification: Unclassified
Component: HTTP (show other bugs)
Version: 2.3.1
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-07 07:41 UTC by Andrea Baroncelli
Modified: 2007-08-10 13:56 UTC (History)
0 users



Attachments
Result of `diff -u SSLManager.java.orig SSLManager.java` (477 bytes, patch)
2007-08-07 07:44 UTC, Andrea Baroncelli
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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