Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SIGBUS and SIGSEGV Errors in HP-UX 11 and Oracle 9i

Status
Not open for further replies.

rousse

Programmer
Sep 24, 2003
12
US
What are the possibilities of getting SIGBUS and SIGSEGV errors in the following scenario?

There is a program (C/C++/Pro*C) that was running fine under HP-UX 11.x and Oracle8i (8.1.6). Oracle database was upgraded to Oracle9i (9.2.0). The source code, including the project libraries, was re-compiled with 64-bit HP-UX C/C++ compiler options, the Pro*C code was pre-compiled with Oracle9i precompiler, and linked with 64-bit Oracle9i libraries.

Also, this program runs as a daemon, spawns processes, allocates and deallocates memory (through new and delete). Furthermore, the program runs fine for some time. However, if I increase the number of records from Oracle9i to be processed, the daemon stops and logs either SIGBUS or SIGSEGV error.

What are the possible reasons of getting SIGBUS or SIGSEGV error in the above scenario?

Thank you.
<rousse>
 
Hi,

We also got a crash (SIGSEGV) in our case, anyone has idea?

TIA
Mack


Here is the problem description:

### Is this a new or existing installation? ###
Existing

### Please describe the problem or question that you have. ###
We are using PRO*C precompiler in our applications to connect with Oracle databases. Our developers work with Oracle 8.1.7.4 and compile the programs with this version of Pro*C precompiler. Next time we want to migrate Oracle to the version 9.2.0.4. So we have migrated one test database to 9.2.0.4. The compiling still runs under 8.1.7.4. Now we get following problem:
- if environment of the migrated test DB is set to 9.2.0.4 (it means its correct version):
LD_LIBRARY_PATH=/oracle/app/rdbms/ora920/lib
ORACLE_BASE=/oracle/app/rdbms/ora920
ORACLE_HOME=/oracle/app/rdbms/ora920
ORACLE_PATH=/oracle/app/rdbms/ora920/bin
PATH=/oracle/app/rdbms/ora920/bin
the application fails.

- however, if ORACLE_PATH, ORACLE_HOME, LD_LIBRARY_PATH are set to /oracle/app/rdbms/ora817 (it means to the Oracle environment of compilation) the application works fine.


The problem occurs at statement:
EXEC SQL CONNECT :user_string IDENTIFIED BY :pwd_string;

The connection to the database by SQL*Plus works fine, there aren't any errors in the database alert file.

### Are you receiving an error? ###
Yes

### If yes, please list all of the error numbers and messages. ###
Signal 11: SIGSEGV sigcode 1 MAP ERR sigsender 0

### If you are receiving an error, what is happening in the code when the error occurs? ###
Program terminaes, a core file is created

### Has this code ever worked correctly before? ###
Yes

### If this is a Pre-Compiler or OCI problem, do the sample programs work? ###
Unknown

### If this is a Pre-Compiler or OCI problem, are you using the Oracle provided makefile (demo_proc.mk, demo_procob.mk, etc.)? ###
Unknown

### If a SQL statement is failing, does this statement work in SQL*Plus? ###
Yes

### If you are getting ORA-3113 errors, are there additional errors in the alert.log? ###
Does Not Apply
 
Hi

Have you tried MetaLink?

Regards
Allan
Icq: 346225948
 
Dear mackpei,

Our SIGBUS/SIGSEGV problem came from a piece of code like this:

void
foo1( void )
{
STRUCT_ABC *ptr_StructAbc;
ptr_StructAbc = new STRUCT_ABC;
ptr_StructAbc = foo2( param1 );
...
}

If you need more help, please let me know.

Regards,
<rousse>
 
Thanks for your hints.

I just investigated the problem again, and the crash does not happen any more if I do the following changes.

The case &quot;crash&quot;:

1. Create a child process

2. Terminate the parent process

3. In the child process: Connect to DB (Oracle 9)

4. Core dump (without any error messages)!


The case &quot;no crash&quot;:

1. Connect to DB (Oracle 9)

2. Create a child process

3. Terminate the parent process

4. The program runs in background...

However no crash if the ORACLE environment variables are set to Oracle 8 ones.

So is it a problem if I connect to an Oracle 9 DB using Oracle 9's environment variables from a child process? Can you explain me the reason for this?

TIA
Mack
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top