AW: [omniORB] omniORB possibly looping
Ralf Walther
rw@neurotec.de
Thu, 25 Feb 99 09:20:00 GMT
Hi Kelly,
you're right, I actually run into the same problem on HPUX10.20.
Are you using the environment ORACLE_SID to specify the database?
Unfortunately the only thing to do is, AVOID A FORK/EXEC IN CORBA
servers.
In your case, try to connect to the Oracle database via the listener
process. This will
let the listener start your db client process.
So what is the problem of a fork/exec? It's not garanteed, that a process
sets the
close-on-exec flag of its acquired file descriptors. This effects the
state of the forked process, ...
you see, ... the ORACLE client process inherits all open descriptors,
which confuse the CORBA
server. I recognized, that the server waits for a socket resource
in tcpSocketRendezvouser::run_undetached, but there were enough free
sockets available.
On my search for solutions I've found similar problems described for
orbix as well. In orbix it's
recommended to let the daemon start server and to avoid forks in server
processes.
Hope it works in your app, too
Regards
Ralf Walther
> I have run into a bit of a snag while trying to create an omniORB
> server which connects to Oracle 8 using OCI. When the server process
> attempts to connect the process appears to hang.
>
> While trying to create a small program that reproduces the error, I
found
> that I could reproduce the problem with a simple program that attempts
to
> log in to Oracle and contains no omniORB calls at all. The program
when
> linked normally works fine, when linked to omniORB libraries the
process
> hangs when attempting to connect to Oracle.
>
> I ran the program under strace and realized that the program forks a
> child, and blocks attempting to read from what must be the new child's
> stdout.
>
> I then attached to the child program with gdb, looked at the stack
> trace and it looked like the process was looping somewhere in
> libtcpwrapGK.
>
> I'm currently doing a debug compile of omniORB and will attempt to
> sniff around a bit more tomorrow. I am hoping in the mean time that
> one of you will recognise this problem and point me to a fix by the
> time I read my mail tomorrow evening ;-)
>
> If anyone has some insight please post. Otherwise I will resume my
> search tomorrow.
>
> -K
>
>