Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> OCI MT-Safety on Solaris
When initializing OCI in MT-safe mode via opinit(OCI_EV_TSF) I have
observed deadlocks in programs that fork. It seems OCI locks mutexes in
the parent and tries to relock in the child without unlocking in the
parent.
Also, repeated forking affects OCI integrity. In a program that repeatedly logs on to an 7.3 server via olog(), then forks and logs off, the login cursor return code is frequently changed to "Invalid cursor". This behavior does not occur upon using the Solaris fork1() system call, which duplicates only the calling thread in the child (posix semantics), instead of fork(), which duplicates all of the process' threads in the child.
Since all operations on an LDA/CDA are serialized, particulary since only one cursor can be executing against a connection at a given time (per Oracle example code from OCI manual), there isn't much benefit to passing a connection to multiple threads anyway.
Pls post your observations about multithreaded OCI apps on Solaris 2.x
-R. Sood
rsood_at_panix.com
Received on Tue Aug 11 1998 - 20:19:53 CDT
![]() |
![]() |