You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@jmeter.apache.org by bu...@apache.org on 2016/03/08 17:24:47 UTC

[Bug 59146] New: MeasuringConnectionManager is not Thread Safe

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

            Bug ID: 59146
           Summary: MeasuringConnectionManager is not Thread Safe
           Product: JMeter
           Version: Nightly (Please specify date)
          Hardware: All
                OS: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: HTTP
          Assignee: issues@jmeter.apache.org
          Reporter: support@ubikloadpack.com

Hello,
MeasuringConnectionManager is not ThreadSafe as it has 2 fields:
    private MeasuringConnectionRequest measuredConnection;
    private SampleResult sample;


When parallel download is used, this will lead to corruption of those 2 fields.

Indeed :
setSample() will be called at nearly the same time and the field will be
corrupt.

Our tests of this feature show the occurence of exceptions on Parallel
download:
1457430068509,5,sessionExample3,200,"Embedded resource download
error:http://localhost:8080/examples/servlets/images/return.gif code:Non HTTP
response code: java.lang.IllegalStateException message:Non HTTP response
message: java.lang.IllegalStateException: Connection is already open
        at org.apache.http.util.Asserts.check(Asserts.java:34)
        at
org.apache.http.impl.SocketHttpClientConnection.assertNotOpen(SocketHttpClientConnection.java:70)
        at
org.apache.http.impl.conn.DefaultClientConnection.openCompleted(DefaultClientConnection.java:142)
        at
org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:185)
        at
org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:328)
        at
org.apache.jmeter.protocol.http.sampler.MeasuringConnectionManager$MeasuredConnection.open(MeasuringConnectionManager.java:122)
        at
org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:612)
        at
org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:447)
        at
org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:884)
        at
org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
        at
org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:55)
        at
org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.executeRequest(HTTPHC4Impl.java:558)
        at
org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:318)
        at
org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:74)
        at
org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase$ASyncSample.call(HTTPSamplerBase.java:1950)
        at
org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase$ASyncSample.call(HTTPSamplerBase.java:1918)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)


1457430242104,12,sessionExample3,Non HTTP response code:
java.lang.ArrayIndexOutOfBoundsException,"Non HTTP response message:
java.lang.ArrayIndexOutOfBoundsException
        at java.net.SocketInputStream.read(SocketInputStream.java:162)
        at java.net.SocketInputStream.read(SocketInputStream.java:141)
        at
org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:160)
        at
org.apache.http.impl.io.SocketInputBuffer.fillBuffer(SocketInputBuffer.java:84)
        at
org.apache.http.impl.io.AbstractSessionInputBuffer.readLine(AbstractSessionInputBuffer.java:273)
        at
org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:140)
        at
org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:57)
        at
org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:261)
        at
org.apache.http.impl.AbstractHttpClientConnection.receiveResponseHeader(AbstractHttpClientConnection.java:283)
        at
org.apache.http.impl.conn.DefaultClientConnection.receiveResponseHeader(DefaultClientConnection.java:259)
        at
org.apache.http.impl.conn.ManagedClientConnectionImpl.receiveResponseHeader(ManagedClientConnectionImpl.java:209)
        at
org.apache.jmeter.protocol.http.sampler.MeasuringConnectionManager$MeasuredConnection.receiveResponseHeader(MeasuringConnectionManager.java:218)
        at
org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:272)
        at
org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:124)
        at
org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:686)
        at
org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:488)
        at
org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:884)
        at
org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
        at
org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:55)
        at
org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.executeRequest(HTTPHC4Impl.java:558)
        at
org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:318)
        at
org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:74)
        at
org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1149)
        at
org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1138)
        at
org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:464)
        at
org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:409)
        at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:240)
        at java.lang.Thread.run(Thread.java:745)

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

[Bug 59146] MeasuringConnectionManager is not Thread Safe (nightly before 3.0)

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59146

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #1 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
Author: pmouawad
Date: Tue Mar  8 20:50:34 2016
New Revision: 1734154

URL: http://svn.apache.org/viewvc?rev=1734154&view=rev
Log:
Bug 59146 - MeasuringConnectionManager is not Thread Safe (nightly before 3.0)
Bugzilla Id: 59146

Modified:
   
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
   
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/MeasuringConnectionManager.java
    jmeter/trunk/xdocs/changes.xml

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

[Bug 59146] MeasuringConnectionManager is not Thread Safe (nightly before 3.0)

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59146

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|MeasuringConnectionManager  |MeasuringConnectionManager
                   |is not Thread Safe          |is not Thread Safe (nightly
                   |                            |before 3.0)

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

[Bug 59146] MeasuringConnectionManager is not Thread Safe (nightly before 3.0)

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59146

--- Comment #2 from Felix Schumacher <fe...@internetallee.de> ---
Date: Fri Mar 18 09:28:58 2016
New Revision: 1735561

URL: http://svn.apache.org/viewvc?rev=1735561&view=rev
Log:
Followup to 1734154. No need for temporary variable. Return new instance
directly.

Bugzilla Id: 59146

Modified:
   
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/MeasuringConnectionManager.java

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