Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

SSL handshake hangs

451380May 14 2009 — edited May 18 2009
All,

We have an occasional problem where our SSL handshake seems to hang forever. So far I've only ever seen it when talking to the one backend with which we do mutual authentication. That might just be because the volume we do with that system is higher than others, however.

The business end of the stack trace is below. While we're running with jrockit, I've traced through Axis and the Sun JSSE code that appears in the trace. The approximate order of events is this:

Axis HTTPSender.getSocket() calls Axis JSSESocketFactory.create()
Axis JSSESocketFactory.create() calls Sun SSLSocketFactoryImpl.createSocket()
createSocket() calls new SSLSocketImpl(context, host, port)
SSLSocketImpl c'tor calls this.connect(address, timeout) <-- with a 0 timeout
...
Axis JSSESocketFactory.create() calls SSLSocketFactoryImpl.startHandshake()
startHandshake() communicates with backend, no timeout in sight
HTTPSender.getSocket() calls SSLSocketImlp.setSoTimeout()

The 0 timeout used in connect() jumps out at me but according to the trace we get past that point. I don't see anywhere a timeout is used in the startHandshake() method or downstream from it.

This problem existed when we were using the jdk 1.4 version of jrockit and continues now with the the jdk 5 version. The stack trace below is for the jdk 5 version.

This thread seems to hang until we bounce the server (WLS 9.2.2.) Any ideas what we can do about this? It happens rarely enough that I'm afraid we would be overwhelmed with the verbose ssl output. We run millions of these connections per day and when the problem does occur, it tends to affect multiple threads in a very short period of time, usually I think because of problem on the backend.

thanks


jrockit/net/SocketNativeIO.read(IIII)I(Native Method)
jrockit/net/SocketNativeIO.read(Ljava/io/FileDescriptor;III)I(Unknown Source)
java/net/AbstractSocketImpl$1.read(II)I(Unknown Source)
^-- Holding lock: java/net/AbstractSocketImpl$1@830d1388[thin lock]
jrockit/io/NativeIOInputStream.read(I[BI)I(Unknown Source)
jrockit/io/NativeIOInputStream.read([BII)I(Unknown Source)
com/sun/net/ssl/internal/ssl/InputRecord.a(Ljava/io/InputStream;[BII)I(DashoA12275:???)
com/sun/net/ssl/internal/ssl/InputRecord.read(Ljava/io/InputStream;Ljava/io/OutputStream;)V(DashoA12275:???)
com/sun/net/ssl/internal/ssl/SSLSocketImpl.a(Lcom/sun/net/ssl/internal/ssl/InputRecord;Z)V(DashoA12275:???)
^-- Holding lock: java/lang/Object@830d11a8[thin lock]
com/sun/net/ssl/internal/ssl/SSLSocketImpl.j()V(DashoA12275:???)
^-- Holding lock: java/lang/Object@830d1198[thin lock]
com/sun/net/ssl/internal/ssl/SSLSocketImpl.startHandshake()V(DashoA12275:???)
org/apache/axis/components/net/JSSESocketFactory.create(Ljava/lang/String;ILjava/lang/StringBuffer;Lorg/apache/axis/components/net/BooleanHolder;)Ljava/net/Socket;(JSSESocketFactory.java:186)
org/apache/axis/transport/http/HTTPSender.invoke(Lorg/apache/axis/MessageContext;)V(Optimized Method)
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 15 2009
Added on May 14 2009
4 comments
4,591 views