Mantis - Resin
Viewing Issue Advanced Details
5697 minor always 03-21-14 13:31 09-08-14 16:48
cowan  
ferg  
normal  
closed 4.0.38  
fixed  
none    
none 4.0.41  
0005697: Thread leak on Windows with OpenSSL
Customer reports thread leak on Windows with OpenSSL. Connections not closed by client and timeout on OpenSSL are left in a RUNNABLE state:

"http--443-27$15864952" daemon prio=6 tid=0x3b53ac00 nid=0x80c runnable [0x3da0f000..0x3da0fd18]
   java.lang.Thread.State: RUNNABLE
        at com.caucho.vfs.JniSocketImpl.readNative(Native Method)
        at com.caucho.vfs.JniSocketImpl.read(JniSocketImpl.java:279)
        at com.caucho.vfs.JniStream.readTimeout(JniStream.java:87)
        at com.caucho.vfs.ReadStream.fillWithTimeout(ReadStream.java:985)
        at com.caucho.server.port.TcpConnection.waitForKeepalive(TcpConnection.java:208)
        at com.caucho.server.port.TcpConnection.run(TcpConnection.java:695)
        at com.caucho.util.ThreadPool$Item.runTasks(ThreadPool.java:743)
        at com.caucho.util.ThreadPool$Item.run(ThreadPool.java:662)
        at java.lang.Thread.run(Thread.java:619)

On unix systems, the socket itself has a timeout (setsockopt with SO_RCVTIMEO), which OpenSSL can work with.

On windows, the SO_RCVTIMEO doesn't work (or at least didn't when our code was written.) So we can't do the same timeouts.

Notes
(0006419)
cowan   
03-21-14 13:32   
Rep by P Goldberg