[omniORB] Newbie having deadlock problems...

Ben Miller Ben.Miller@Mercia.Com
Fri, 28 Apr 2000 10:48:15 +0100


Hi all,

I'm new to CORBA and I've been using the 2.7.1 version of omniORB to
work through the book "Sams Teach Yourself CORBA in 14 Days".
However, I'm having a problem getting some of the examples to work
properly.

Specifically, I have a bank client that creates a Bank object and then
retrieves a BankServer object using the Naming Service.  The
BankServer object is then used to 'register' the Bank Object by
calling a function like:

Bank* bank = new BankImpl;
BankServerImpl_var svr;
//... retrieve bank server object using naming service.
...
//

svr->registerBank(bank);


Now, the problem is that in the BankServer::registerBank(..) function
it attempts to call a function on the passed-in Bank object, like
this:

void BankServerImpl::registerBank(Bank_ptr bank)
{
	cout << "BankServerImpl: Registering Bank \"" << bank->name()
<< "\"." << endl;

	// Add the given Bank at the end of the list.
	myBanks.push_back(Bank::_duplicate(bank));
}

When bank->name() is called, execution hangs.  Here's the call-stack:

NTDLL! ZwWaitForSingleObject + 11 bytes
MSAFD! WSPStartup + -19775 bytes
WSPWSP! NSPStartup + 8534 bytes
WS2_32! WSARecv + 174 bytes
WSOCK32! recv + 51 bytes
tcpSocketStrand::ll_recv(0x010140f0, 8200) line 689 + 25 bytes
reliableStreamStrand::fetch(0) line 252 + 25 bytes
reliableStreamStrand::receive(8192, 0, 8, 1) line 118
NetBufferedStream::receive(8, 1) line 327 + 40 bytes
NetBufferedStream::align_and_get_bytes(ALIGN_1, 8, 1) line 434
NetBufferedStream::get_char_array(0x0120f948, 8, ALIGN_1, 1) line 150
+ 20 bytes
GIOP_C::IssueLocateRequest(0x0120fa58, 12) line 366
omniObject::assertObjectExistent() line 507 + 26 bytes
OmniProxyCallWrapper::invoke(0x008f3328, {...}) line 55
_proxy_Bank::name() line 76 + 51 bytes
BankServerImpl::registerBank(0x008f3368) line 25 + 13 bytes
...

I'm using NT 4.0 and the Bank and BankServer implementations are in
the same directory on the local machine.  Everything else seems to
work fine.

Any ideas?

Best regards,
Ben Miller
Mercia Software Ltd.
Holt Court North,
Heneage Street West
Aston Science Park,
Birmingham B7 4AX, UK 
Registered Number: 1868855 (Cardiff) 
Tel: 44 (0)121 359 5096 
Fax: 44 (0)121 359 0375 
Web Site: http://www.mercia.com