Operating System - HP-UX
1752806 Members
5963 Online
108789 Solutions
New Discussion юеВ

Oracle 9.0.2.3 OCCI & multithread

 
luigi mazzoni_1
New Member

Oracle 9.0.2.3 OCCI & multithread

we have developed an Oracle OCCI application which run using Oracle 9.2.0.3 on HP-UX
B.11.11 U 9000/800 .
The compilation step terminate successfully, but at runtime the application
fails with "Bus error(coredump)" error.
The problem occurred during the OCI Environment
Creation(Environment::createEnvironment( Environment::OBJECT )), in particular
when use the follow library "/lib/pa20_64/libpthread.1"
This problem occurred on another machine (test machine) in 9.2.0.1 environment
and we solved it installing Oracle patch 2457956 .
Now Oracle said that there's no patch available for 9.2.0.3 environment and the only workaround is to compile the software using "-mt" option (multithreaded)

-------------------------------------------
Due to the way the linker works on HPUX, if any library is present that has a
dependency on libpthread.sl, then the thread-safe code from the Standard C++
Library will be linked in whereas during compilation, non-thread-safe code
from the Standard C++ Library is used (at least from a user's point-of-view,
for a more complete and detailed description, please contact HPUX).
-------------------------------------------


Do we have to compile using "-mt" option ?
which kind of check in the source code we have to perform to be sure to avoid
unexpected behaviour, problems ?
3 REPLIES 3

Re: Oracle 9.0.2.3 OCCI & multithread

Hello,

Have you debugged the code and have a backstrace of the coredump ? If the library is threaded compiled then you must compile with -mt option!
luigi mazzoni_1
New Member

Re: Oracle 9.0.2.3 OCCI & multithread

We have only to compile with -mt option , or we have also to check / modify the source code to be "mt" compliant ???
In this case which are the rules that we nned to observe to produce an "mt" compiant source code ?
thanks a lot ...

Re: Oracle 9.0.2.3 OCCI & multithread

The only problems that you could have is when using threads( see thread specific programming ) within your application. The library is compiled with threads to suport this programming behavior.
If you aren't using threads then all should work as with the library compiled without threads.