[omniORB] problem shutting down
David Byron
dbyron@coactive.com
Thu, 11 Oct 2001 15:46:05 -0700
This gets a little long......
I'm in the middle of porting omniORB3 (3.0.4) to my embedded platform
running linux. The first step I've taken is to build a statically linked
version of eg1 against glibc 2.2.4 (with linuxthreads) and kernel version
2.4.6. I finally got that running, sort of. I'm using gcc 2.95.2. The
reason for the static linking is that my eventual target doesn't support
shared libraries -- at least not yet. It doesn't have an MMU.
I can run eg1 successfully on the same machine on which I built it (w/ a
2.2.18pre21 kernel), and it almost runs successfuly on my target. It runs,
but then it never exits. There have been similar discussions on the mailing
list already, but I don't think any are the same as this.
In this case, my target isn't the embedded platform yet, just another intel
machine running uClinux 2.4.6. There could very well be bugs in some other
part of my target environment, but I'm hoping the problem is obvious to
those more familiar with the internals...
Here's the output of ./eg1 --ORBtraceLevel 40 when it works:
omniORB: strand Ripper: start.
omniORB: gateKeeper is not installed. All incoming are accepted.
omniORB configuration file: /etc/omniORB.cfg either does not exist or is not
a file.
omniORB: The omniDynamic library is not linked.
omniORB: Initialising incoming rope factories.
omniORB: scavenger : start.
omniORB: strand Rope::incrRefCount: old value = 0
omniORB: Starting incoming rope factories.
omniORB: Activating: root<0>
omniORB: Creating ref to local: root<0>
target id : IDL:Echo:1.0
most derived id: IDL:Echo:1.0
I said, "Hello!".
The Echo object replied, "Hello!".
omniORB: Preparing to shutdown ORB.
omniORB: Destroying POA(RootPOA).
omniORB: Deactivating all POA(RootPOA)'s objects.
omniORB: Deactivating: root<0> (has local refs).
omniORB: strand Rope::incrRefCount: old value = 0
omniORB: strand Rope::incrRefCount: old value = 1
omniORB: Waiting for requests to complete on POA(RootPOA).
omniORB: Etherealising POA(RootPOA)'s objects.
omniORB: RefCountServantBase has zero ref count -- deleted.
omniORB: omniLocalIdentity deleted.
omniORB: Stopping incoming rope factories.
omniORB: tcpSocketMTfactory stopIncoming: Waiting for tcpSocketMT
Rendezvouser to exit...
omniORB: tcpSocketMTfactory Rendezvouser: start.
omniORB: tcpSocketMTfactory Rendezvouser: exit.
omniORB: tcpSocketMTfactory stopIncoming: tcpSocketMT Rendezvouser has
exited
omniORB: Destruction of POA(RootPOA) complete.
omniORB: Shutting-down incoming rope factories.
omniORB: strand Rope::decrRefCount: old value = 1
omniORB: tcpSocketMTfactory removeIncoming: Done
omniORB: strand Rope::decrRefCount: old value = 2
omniORB: scavenger : woken by poke()
omniORB: scavenger : exit.
omniORB: strand Ripper: exit.
omniORB: ORB shutdown is complete.
omniORB: omniRemoteIdentity deleted.
omniORB: strand Rope::decrRefCount: old value = 1
omniORB: Ref to: root<0> (not activated) -- deleted.
omniORB: Removing dummy entry from object table -- no local refs
omniORB: Dummy omniLocalIdentity deleted (no more local refs).
omniORB: No more references to the ORB -- deleted.
And, here's the output on my target...
omniORB: strand Ripper: start.
omniORB: gateKeeper is not installed. All incoming are accepted.
omniORB: The omniDynamic library is not linked.
omniORB: Initialising incoming rope factories.
omniORB: strand Rope::incrRefCount: old value = 0
omniORB: Starting incoming rope factories.
omniORB: scavenger : start.
omniORB: tcpSocketMTfactory Rendezvouser: start.
omniORB: tcpSocketMTfactory Rendezvouser: block on accept()
omniORB: Activating: root<0>
omniORB: Creating ref to local: root<0>
target id : IDL:Echo:1.0
most derived id: IDL:Echo:1.0
I said, "Hello!".
The Echo object replied, "Hello!".
omniORB: Preparing to shutdown ORB.
omniORB: Destroying POA(RootPOA).
omniORB: Deactivating all POA(RootPOA)'s objects.
omniORB: Deactivating: root<0> (has local refs).
omniORB: strand Rope::incrRefCount: old value = 0
omniORB: strand Rope::incrRefCount: old value = 1
omniORB: Waiting for requests to complete on POA(RootPOA).
omniORB: Etherealising POA(RootPOA)'s objects.
omniORB: RefCountServantBase has zero ref count -- deleted.
omniORB: omniLocalIdentity deleted.
omniORB: Stopping incoming rope factories.
omniORB: tcpSocketMTfactory stopIncoming: Waiting for tcpSocketMT
Rendezvouser to exit...
omniORB: scavenger : scanning connections
and then it hangs there.
The order that things happen in the beginning is slightly different. I have
a feeling that's causing the problem, but maybe not. From what I can tell,
one thread is waiting on an accept call (tcpSocketMTfactory.cc line 1431)
and the other one has tried to wake it up, but it hasn't worked, so now when
it tries to join it (tcpSocketMTfactory.cc line 814), it waits forever.
I have gdbserver running on my target, and have debugged other programs, but
this is the first program with threads I've tried debugging. I'm having
some problems. One thing that maybe some of you have seen is the following.
Ignoring gdbserver for a minute, I just tried running eg1 on my build
machine via gdb to make sure that works. It does, but I see some strange
messages when I tell gdb about the executable. I would normally use
-ORBtraceLevel 40 here as well, but you get the idea.
$ gdb
GNU gdb 5.0
Copyright 2000 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu".
(gdb) file eg1
Reading symbols from eg1...done.
rw_common (): write: No such file or directory.
warning: unable to set global thread event mask
[New Thread 0 (runnable)]
rw_common (): write: No such file or directory.
warning: stop_or_attach_thread: generic error
(gdb) run
Starting program: /home/dbyron/salem/src/omniorb3/src/examples/echo/eg1
I said, "Hello!".
The Echo object replied, "Hello!".
Program exited normally.
(gdb) quit
$
Thanks much for your help. I can send along either a map file or my
mk/platforms file or other build info if it helps.
-DB
---
David Byron dbyron@coactive.com
Coactive Networks, Inc. http://www.coactive.com
28 Liberty Ship Way voice:(415)289-7800
Sausalito, CA 94965 fax:(415)289-1320