ACE_TAO icon indicating copy to clipboard operation
ACE_TAO copied to clipboard

All threads in ACE_TP_Reactor seem to hang when a client loses internet connection

Open gayoso opened this issue 3 years ago • 0 comments

Version

ACE version 6.4.5

Host machine and operating system

Windows 10 64 bit

Target machine and operating system (if different from host)

Windows 10 32 bit

Compiler name and version (including patch level)

Visual C++ 14.0 (Microsoft Visual Studio 2015 Communtiy Edition)

Synopsis

All threads in ACE_TP_Reactor seem to hang when a client loses internet connection mid communication, instead of just the one handling that client.

Description

I have an SSL server with a pool of 35 threads. It has been working ok for months. I found a problematic situation:

I connect to it from 2 or more computers, sending requests and receiving responses (all very short). I cut the network cable of one computer. The server stops processing requests from all the other computers. After about 30-40 seconds the server continues processing the requests.

I expect that only one thread should stay blocked (till timeout) but not all the thread pool. Note that this block only happens when we physically disconnect the network cable. If we abort any client application with Control-C, all others continue running ok.

This is my configuration:

  typedef ACE_Acceptor <Client_Handler, ACE_SSL_SOCK_Acceptor> Client_Acceptor;
  ACE_TP_Reactor tpReactor;
  ACE_Reactor reactor(&tpReactor);
  Client_Acceptor peer_acceptor;
  peer_acceptor.open(ACE_INET_Addr(PORT), &reactor);
  ACE_Sig_Action sa ((ACE_SignalHandler) handler, SIGINT);
  ACE_Thread_Manager::instance()->spawn_n(35, threadFunc, &reactor, THR_NEW_LWP | THR_DETACHED);

gayoso avatar Dec 02 '21 21:12 gayoso