Created attachment 29866 [details] Jmeter plan that shows the issue When using HTTPClient4 with HTTPS, requests hangs for 4-5 seconds for each request when using IP's without reverse DNS, using the DNS names or adding the IP and DNS name to hosts file removes the delay. Also using HTTPClient3.1 instead seems to solve the issue. I have added a plan that shows the issue. Regards Troels
Should note that this is on Windows 8
Here is a stack dump during the pause: "Thread Group 1-1" prio=6 tid=0x038f3c00 nid=0xd80 runnable [0x03b7f000] java.lang.Thread.State: RUNNABLE at java.net.Inet4AddressImpl.getHostByAddr(Native Method) at java.net.InetAddress$1.getHostByAddr(Unknown Source) at java.net.InetAddress.getHostFromNameService(Unknown Source) at java.net.InetAddress.getHostName(Unknown Source) at java.net.InetAddress.getHostName(Unknown Source) at sun.security.ssl.SSLSocketImpl.getHost(Unknown Source) - locked <0x1349be48> (a sun.security.ssl.SSLSocketImpl) at sun.security.ssl.Handshaker.getHostSE(Unknown Source) at sun.security.ssl.ClientHandshaker.getKickstartMessage(Unknown Source) at sun.security.ssl.Handshaker.kickstart(Unknown Source) at sun.security.ssl.SSLSocketImpl.kickstartHandshake(Unknown Source) - locked <0x1349be48> (a sun.security.ssl.SSLSocketImpl) at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source) - locked <0x1349c038> (a java.lang.Object) at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source) at sun.security.ssl.SSLSocketImpl.getSession(Unknown Source) at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:91) at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:572) at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180) at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:294) at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:640) at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:479) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805) at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:284) at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:62) at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1075) at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1064) at org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:426) at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:255) at java.lang.Thread.run(Unknown Source) This will need further investigation.
The stack dump was on WinXP using JMeter 2.8.
Hello, What java version are you using ? Regards
C:\Users\TroelsLiebeBentsen>java -version java version "1.7.0_11" Java(TM) SE Runtime Environment (build 1.7.0_11-b21) Java HotSpot(TM) 64-Bit Server VM (build 23.6-b04, mixed mode)
(In reply to comment #3) > The stack dump was on WinXP using JMeter 2.8. 2013/01/18 16:55:19 INFO - jmeter.JMeter: Version 2.8 r1393162 2013/01/18 16:55:19 INFO - jmeter.JMeter: java.version=1.7.0_11 2013/01/18 16:55:19 INFO - jmeter.JMeter: java.vm.name=Java HotSpot(TM) Client VM
Using: 2013/01/18 17:25:52 INFO - jmeter.JMeter: Version 2.8 r1393162 2013/01/18 17:25:52 INFO - jmeter.JMeter: java.version=1.6.0_38 2013/01/18 17:25:52 INFO - jmeter.JMeter: java.vm.name=Java HotSpot(TM) Client VM 2013/01/18 17:25:52 INFO - jmeter.JMeter: os.name=Windows XP I get similar results: "Thread Group 1-1" prio=6 tid=0x03c4c400 nid=0x27c runnable [0x055ff000] java.lang.Thread.State: RUNNABLE at java.net.Inet4AddressImpl.getHostByAddr(Native Method) at java.net.InetAddress$1.getHostByAddr(InetAddress.java:852) at java.net.InetAddress.getHostFromNameService(InetAddress.java:532) at java.net.InetAddress.getHostName(InetAddress.java:475) at java.net.InetAddress.getHostName(InetAddress.java:447) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.getHost(SSLSocketImpl.java:1971) - locked <0x1302b5b8> (a com.sun.net.ssl.internal.ssl.SSLSocketImpl) at com.sun.net.ssl.internal.ssl.Handshaker.getHostSE(Handshaker.java:257) at com.sun.net.ssl.internal.ssl.ClientHandshaker.getKickstartMessage(ClientHandshaker.java:1020) at com.sun.net.ssl.internal.ssl.Handshaker.kickstart(Handshaker.java:620) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.kickstartHandshake(SSLSocketImpl.java:1305) - locked <0x1302b5b8> (a com.sun.net.ssl.internal.ssl.SSLSocketImpl) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1202) - locked <0x1302b718> (a java.lang.Object) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1230) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.getSession(SSLSocketImpl.java:2036) at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:91) at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:572) at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180) at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:294) at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:640) at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:479) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805) at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:284) at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:62) at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1075) at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1064) at org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:426) at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:255) at java.lang.Thread.run(Thread.java:662)
I don't reproduce on Mac OSx: java version "1.6.0_37" Java(TM) SE Runtime Environment (build 1.6.0_37-b06-434-10M3909) Java HotSpot(TM) 64-Bit Server VM (build 20.12-b01-434, mixed mode) @sebb do you use the plan as is or do you point @Troels Liebe Bentsen Is the IP in the test plan public ? Thanks
(In reply to comment #8) > I don't reproduce on Mac OSx: > java version "1.6.0_37" > Java(TM) SE Runtime Environment (build 1.6.0_37-b06-434-10M3909) > Java HotSpot(TM) 64-Bit Server VM (build 20.12-b01-434, mixed mode) > > @sebb do you use the plan as is or do you point Yes (except I unchecked "Follow redirects" - not relevant here) > @Troels Liebe Bentsen Is the IP in the test plan public ? > > Thanks
I reproduce on Windows 7 but not on Mac OS. Seems to affect Windows Family only. Could be something related to this: http://www.velocityreviews.com/forums/showpost.php?p=2959030&postcount=8
However the problem only affects HC4, not the HC3.1 or Java implementations. So if it is a Windows issue, why is it being triggered by HC4 only? I think it may be something to do with the way SSL verification is handled in HC4. Even though we use the HC4TrustAllSSLSocketFactory, it still invokes org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:91) which calls getSession, even though the session is not needed later. I've not yet had a chance to try recoding to avoid this; if it is the cause then I think we may need to raise an enhancement request against HC4.
I thought that: - https://issues.apache.org/jira/browse/HTTPCLIENT-1302
Created attachment 30151 [details] Jmeter file for Mac OS x attached
(In reply to comment #13) > Created attachment 30151 [details] > Jmeter file for Mac OS x attached Seems to be for a different bug report. Was this intended for Bugzilla 54799 ?
Yes it's related to 54799
Failed to reproduce on Xubuntu 12.04 java version "1.6.0_45" Java(TM) SE Runtime Environment (build 1.6.0_45-b06) Java HotSpot(TM) Server VM (build 20.45-b01, mixed mode)
Could this be an explanation: - http://bugs.java.com/bugdatabase/view_bug.do?bug_id=6450279
Anybody could test this bug on Windows again to see if it's still in 3.0 or current nightly ? Thanks
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/3038