[omniORB] SocketCollection::Select() goes in a infinite while loop on Windo ws

Vikas Gandhi VGandhi at quark.co.in
Sat Jul 12 22:19:16 BST 2003


Hi
I am stuck with a very peculiar situation on windows that I have so far not
been able to reproduce on Solaris. Following are the details of the same,
please help.

Problem: When 50 or more instances of a client application try to call my
server application on the same IDL method (that takes some time to return
due to the business logic implementation) simultaneously, the server hangs
and takes 100% CPU time and stops catering to new requests from the
remaining clients.

Upon debugging the ORB code when the server is in this hanging state, I have
found that in SocketCollection.cc file the control has gone into an infinite
loop. Following are the details:

Filename: SocketCollection.cc
Function name: Select()

Here's the stack trace:
ws2_32.dll!7503b7bc() 	
omniORB401_rtd.dll!omni::tcpEndpoint::AcceptAndMonitor(void (void *,
omni::giopConnection *)* func=0x67cd5d3a, void * cookie=0x01827280)  Line
351 + 0xb	C++
omniORB401_rtd.dll!omni::giopRendezvouser::execute()  Line 86 + 0x1a	C++
omniORB401_rtd.dll!omniAsyncWorker::real_run()  Line 182 + 0x10	C++
omniORB401_rtd.dll!omniAsyncWorkerInfo::run()  Line 230	C++
omniORB401_rtd.dll!omniAsyncWorker::run(void * __formal=0x00000000)  Line
134	C++
omnithread30_rtd.dll!omni_thread_wrapper(void * ptr=0x018272e0)  Line 502
C++
msvcr70d.dll!_threadstartex(void * ptd=0x018274b8)  Line 241 + 0xd	C

Snippet of the infinite while loop in the Select() method:
...
  int maxfd = 0;
  int fd = 0;
  while (total) {
    if (FD_ISSET(fd,&rfds)) {
      maxfd = fd;
      total--;
    }
    fd++;
  }
...

The value of the variable fd at this time is garbage (the debugger shows a
huge negative number) and 'total' continues to remain 1 forever.

The server is using:

1) ORBthreadPerConnectionPolicy = 0
2) ORBmaxServerThreadPoolSize = 1000
3) ORBmaxGIOPVersion = 1.0
4) ORBmaxInterleavedCallsPerConnection = 2
5) ORBsupportCurrent = 0
6) ORBmaxServerThreadPerConnection = 5
7) ORBclientCallTimeOutPeriod = 0
8) ORBserverCallTimeOutPeriod  = 0
9) ORBinConScanPeriod = 0
10) ORBoutConScanPeriod = 0

Regards
Vikas



More information about the omniORB-list mailing list