[omniORB] Omni on PlayStation2

Ulf Stoermer ulf@emi.yamaha.co.jp
Tue Apr 1 12:14:02 2003


Hello Duncan,

I ran omniNames on the Linux-PC and attached to the running
threads with gdb while omniNames was "blocked". Here are
the backtraces of the 5 threads:

Thread 1
#0  0x420b4b31 in nanosleep () from /lib/i686/libc.so.6
#1  0x401d0185 in __pthread_timedsuspend_new () from
/lib/i686/libpthread.so.0
#2  0x401cd160 in pthread_cond_timedwait_relative () from
/lib/i686/libpthread.so.0
#3  0x401ae3d9 in omni_condition::timedwait () from
/home/ulf/omniorb/omni401/lib/libomnithread.so.3
#4  0x0804d098 in main ()
#5  0x42017499 in __libc_start_main () from /lib/i686/libc.so.6

Thread 2
#0  0x420e0037 in poll () from /lib/i686/libc.so.6
#1  0x401cdc70 in __pthread_manager () from /lib/i686/libpthread.so.0

Thread 3
#0  0x420e187e in select () from /lib/i686/libc.so.6
#1  0x401a52ec in __DTOR_END__ () from
/home/ulf/omniorb/omni401/lib/libomniORB4.so.0
#2  0x4012c651 in omni::SocketCollection::Select ()
   from /home/ulf/omniorb/omni401/lib/libomniORB4.so.0
#3  0x40157c0a in omni::tcpEndpoint::AcceptAndMonitor ()
   from /home/ulf/omniorb/omni401/lib/libomniORB4.so.0
#4  0x4010fed8 in omni::giopRendezvouser::execute ()
   from /home/ulf/omniorb/omni401/lib/libomniORB4.so.0
#5  0x400b6ae6 in omniAsyncWorkerInfo::run () from
/home/ulf/omniorb/omni401/lib/libomniORB4.so.0
#6  0x400b7756 in omniAsyncWorker::run () from
/home/ulf/omniorb/omni401/lib/libomniORB4.so.0
#7  0x401ae98c in omni_thread_wrapper () from
/home/ulf/omniorb/omni401/lib/libomnithread.so.3
#8  0x401cdfef in pthread_start_thread () from /lib/i686/libpthread.so.0

Thread 4
#0  0x420b4b31 in nanosleep () from /lib/i686/libc.so.6
#1  0x401d0185 in __pthread_timedsuspend_new () from
/lib/i686/libpthread.so.0
#2  0x401cd160 in pthread_cond_timedwait_relative () from
/lib/i686/libpthread.so.0
#3  0x401ae3d9 in omni_condition::timedwait () from
/home/ulf/omniorb/omni401/lib/libomnithread.so.3
#4  0x40105e00 in omni::Scavenger::execute () from
/home/ulf/omniorb/omni401/lib/libomniORB4.so.0
#5  0x400b6ae6 in omniAsyncWorkerInfo::run () from
/home/ulf/omniorb/omni401/lib/libomniORB4.so.0
#6  0x400b7756 in omniAsyncWorker::run () from
/home/ulf/omniorb/omni401/lib/libomniORB4.so.0
#7  0x401ae98c in omni_thread_wrapper () from
/home/ulf/omniorb/omni401/lib/libomnithread.so.3
#8  0x401cdfef in pthread_start_thread () from /lib/i686/libpthread.so.0
#9  0x401ce0df in pthread_start_thread_event () from
/lib/i686/libpthread.so.0

Thread 5
#0  0x420e8182 in recv () from /lib/i686/libc.so.6
#1  0x401d2d54 in recv () from /lib/i686/libpthread.so.0
#2  0x40156206 in omni::tcpConnection::Recv () from
/home/ulf/omniorb/omni401/lib/libomniORB4.so.0
#3  0x401093c6 in omni::giopStream::inputMessage ()
   from /home/ulf/omniorb/omni401/lib/libomniORB4.so.0
#4  0x40122574 in omni::giopImpl12::inputNewServerMessage ()
   from /home/ulf/omniorb/omni401/lib/libomniORB4.so.0
#5  0x401229e9 in omni::giopImpl12::inputMessageBegin ()
   from /home/ulf/omniorb/omni401/lib/libomniORB4.so.0
#6  0x40111ad1 in omni::GIOP_S::dispatcher () from
/home/ulf/omniorb/omni401/lib/libomniORB4.so.0
#7  0x4010f9a1 in omni::giopWorker::real_execute ()
   from /home/ulf/omniorb/omni401/lib/libomniORB4.so.0
#8  0x4010f2a7 in omni::giopWorkerInfo::run () from
/home/ulf/omniorb/omni401/lib/libomniORB4.so.0
#9  0x4010f352 in omni::giopWorker::execute () from
/home/ulf/omniorb/omni401/lib/libomniORB4.so.0
#10 0x400b6ae6 in omniAsyncWorkerInfo::run () from
/home/ulf/omniorb/omni401/lib/libomniORB4.so.0
#11 0x400b7756 in omniAsyncWorker::run () from
/home/ulf/omniorb/omni401/lib/libomniORB4.so.0
#12 0x401ae98c in omni_thread_wrapper () from
/home/ulf/omniorb/omni401/lib/libomnithread.so.3
#13 0x401cdfef in pthread_start_thread () from /lib/i686/libpthread.so.0
#14 0x401ce0df in pthread_start_thread_event () from
/lib/i686/libpthread.so.0


Unfortunately the whole thing doesn't say anything to me,
but it would be nice if you could have a look and see if you
can find something peculiar.
I noticed though, that in case of a successful name lookup
in omniNames actually 6 threads are running.

If I can't find soon a solution then I have to give up on this
because other more important work is coming up.

I did a small test though, and indeed the exception handling
on the Playstation is not thread safe. From the main function
I start two threads which after some time will throw exceptions
and then shall be handled by the individual threads. Even though
the program doesn't crash, but the exceptions are never caught,
not even from the main thread.
I tried to recompile the gcc on the PlayStation but got internal
compiler errors and gave up on it.

Cheers

Ulf


> -----Original Message-----
> From: Duncan Grisby [mailto:duncan@grisby.org]
> Sent: Monday, 31 March 2003 7:49 PM
> To: Ulf Stoermer
> Cc: omniORB-list@omniorb-support.com
> Subject: Re: [omniORB] Omni on PlayStation2
>
>
> On Thursday 27 March, "Ulf Stoermer" wrote:
>
> > > That's very odd indeed. What does the trace on the client show?  Does
> > > the Linux omniNames work correctly with a Linux client?
> >
> > Yes, at the same time the Linux omniNames works well with any other
> > client, Linux, Windows, MacOS, Zaurus.
>
> Most peculiar. It looks like omniNames (on Linux) is not trying to
> send replies to the client. I don't know why that would happen. Try
> attaching to omniNames with gdb while it is blocked, before the client
> times out. By looking at the threads, it should be possible to see
> where it's held up.
>
> > > That looks like everything is working as it should, right up until the
> > > segfault. I don't suppose you can run it under gdb?
> >
> > Well, I can, but here comes another problem. If I run gdb I get the
> > following error:
>
> [...]
> > The same also happens when running eg1 or eg2, which both work correctly
> > when executed normally. Maybe this in fact has to do with gcc 2.95.2 not
> > supporting thread safe exceptions.
>
> It's more likely just that gdb isn't working.
>
> > But even if PlayStation at the moment isn't able to thread safely handle
> > exceptions, how could this affect the first scenario, where omniNames
> > runs on a Linux PC and never replies anything?
>
> I don't know. I think it's most useful to track down what omniNames on
> Linux is up to, since it seems to be doing something wrong, and we
> know that it ought to work there. Once that is understood, it will
> hopefully help with understanding any problems left on the
> PlayStation.
>
> Cheers,
>
> Duncan.
>
> --
>  -- Duncan Grisby         --
>   -- duncan@grisby.org     --
>    -- http://www.grisby.org --
>