[omniORB] deadlock with distributed callback application

Lars Immisch lars@ibp.de
Thu, 3 May 2001 15:31:00 +0200


Dear Duncan,

> > In essence, I have several servants that call back into a single client.
> > When I start two operations, and they complete simultaneously, the first
> > server blocks on the invocation of the completion forever. The client
> > interestingly also blocks - it seems to get stuck on a _is_a which comes
> > just before the completion.
>
> The problem is that you haven't activated the root POA in the client
> program, so when the callback comes in, the call is blocked waiting
> for POA activation.

Slaps forehead. Argggh. Of course.

Now, the nice little example works, but I still have the original problem.

I just got half of it in the debugger and the first call to the server get's  
blocked sending the completion.

Specifically, it is blocked in omniObjRef::_locateRequest waiting for the  
reply from the server.

I can't see where the server is, unfortunately.

> The fact that the client also blocks in _is_a on its second call is
> due to the way omniORB handles threads at the moment. omniORB uses one
> thread per TCP connection. Normally this means that for a client to
> invoke two operations on a server concurrently, the client must have
> two threads, and open two TCP connections. However, with oneway
> operations, a second request can be sent on the same connection,
> before the first has finished.

Ok. But on which connection is the response being sent? Unless you have  
implemented bidirectional IIOP, it would have to be a new connection, right?

Would there be two connections (for completions) from the server to the  
client? It looks as if the oneway call really leads to three messages sent:

- a locate request
- the locate request response
- the completion

I just read up on the LocateRequest in H&V. So I assume that the LocateRequest  
is only sent once, whenever the server encounters a new IOR. Might the  
LocateRequest be sent twice by any chance?

But wait, that is not the problem that I see.

Hmmm. Is it possible to disable the LocateRequests? This might help me to  
narrow the problem down.

I'd be grateful for any other suggestions, too.

Thanks a lot,

Lars