RE: SSL3_accept makes Server stuck

2008-08-28 Thread David Schwartz
> Jinsong Du wrote: > > I have a simple server using blocked socket and OpenSSL, its only > > function is for user registering an account. When an user connect to > > this server, it spawns a child process to handle the request. I found > > sometime child processes got stuck. > > The problem here

Re: SSL3_accept makes Server stuck

2008-08-28 Thread Darryl Miles
Jinsong Du wrote: I have a simple server using blocked socket and OpenSSL, its only function is for user registering an account. When an user connect to this server, it spawns a child process to handle the request. I found sometime child processes got stuck. The problem here is that what if 2 u

Re: SSL3_accept makes Server stuck

2008-08-07 Thread Kyle Hamilton
Put your sockets into nonblocking mode (with fcntl()). If they would block and you try to read them, the system call will return with EWOULDBLOCK. Other than that, you can set an alarm; a signal will interrupt a system call. You might wish to set your signal handler to be a function that resets

Re: SSL3_accept makes Server stuck

2008-08-07 Thread Du, Jinsong
Kyle is right, I didn't set SO_KEEPALIVE on the socket in my server. Do I have to set SO_KEEPALIVE to avoid this situation in server side? Since I use select in the main loop to deal with time out situation, is there any other way to prevent OpenSSL library to wait for reading a socket indefinitel

Re: SSL3_accept makes Server stuck

2008-08-05 Thread Kyle Hamilton
Because no data has been transmitted on the socket, the client didn't send an RST, and SO_KEEPALIVE wasn't set on the socket. -Kyle H On Tue, Aug 5, 2008 at 10:19 AM, Du, Jinsong <[EMAIL PROTECTED]> wrote: > Hi Urjit, > > Unfortunately, I can't reach the computers with problem when running > the

Re: SSL3_accept makes Server stuck

2008-08-05 Thread Du, Jinsong
Hi Urjit, Unfortunately, I can't reach the computers with problem when running the client software, I don't even know where they are. I just checked the server, and the stuck process is still there, running more than two weeks: 20743 jdu./reg_mpt 14-18:43:57 #ls /proc/207

Re: SSL3_accept makes Server stuck

2008-08-03 Thread Urjit Gokhale
Looks like the server doesn't even get the Client hello message. Did you check the state of your client. Is it stuck in SSL_connect (it should be, I believe)? where is it stuck ? use s_client / s_server applications (comes with openssl.), if possible to figure out the issue. You may wish to use str