Databases
cancel
Showing results for 
Search instead for 
Did you mean: 

Segmentation Fault in Oracle 2.9.0.1

Paulo Pimenta
Occasional Visitor

Segmentation Fault in Oracle 2.9.0.1

Hi,

I have a multi-thread program that always receives a segmentation fault in a Oracle lib (ttcdrv).

The segmentation fault occurs in different places, but always on this library and in a pro*c command (OPEN CURSOR) as you can see below.

HP gdb 5.4.0 for HP Itanium (32 or 64 bit) and target HP-UX 11.2x.
..
Core was generated by 'xxx'
Program terminated with signal 11, Segmentation fault.
SEGV_ACCERR - Invalid Permissions for object

#0 0x0 in ()
warning: Attempting to unwind past bad PC 0x0
#1 0x60000000f5f32fb0:0 in ttcdrv+0x1b50 () at ../include/rw/locimpl:213
#2 0x60000000f5b35670:0 in nioqwa+0xe0 () at ../include/rw/locimpl:213
#3 0x60000000f5808a50:0 in upirtrc+0x880 () at ../include/rw/locimpl:213
#4 0x60000000f5750430:0 in kpurcsc+0xf0 () at ../include/rw/locimpl:213
#5 0x60000000f5699b80:0 in kpuexecv8+0xb80 () at ../include/rw/locimpl:213
#6 0x60000000f56a03c0:0 in kpuexec+0x1e40 () at ../include/rw/locimpl:213
#7 0x60000000f57a1aa0:0 in OCIStmtExecute+0x60 () at ../include/rw/locimpl:213
#8 0x60000000f55e2f50:0 in sqlcucExecute+0x90 () at ../include/rw/locimpl:213
#9 0x60000000f55c5a90:0 in sqlall+0x2e10 () at ../include/rw/locimpl:213
#10 0x60000000f55d2f50:0 in sqlatm+0x1110 () at ../include/rw/locimpl:213
#11 0x60000000f55ac8d0:0 in sqlnst+0x7e50 () at ../include/rw/locimpl:213
#12 0x60000000f5580b20:0 in + 0x6a0 () at ../include/rw/locimpl:213
#13 0x60000000f5581830:0 in sqlcxt+0xb0 () at ../include/rw/locimpl:213
#14 0x60000000f767d2e0:0 in doOpenServicesDao (ctx=0x4eb5b0, t=322, v=9)
...

The program is compiled in 32 bits.

I've tried some things, but none of them solved the problem.

Now I'm using wdb to find out memory problems.

Any idea?

Thanks in advance
5 REPLIES
Dennis Handly
Acclaimed Contributor

Re: Segmentation Fault in Oracle 2.9.0.1

>HP gdb 5.4.0

It might be helpful for you to download the latest.

>multi-thread program

Do you have a thread stack overflow?

>#0 0x0 in ()

This typically means you had a uninitialized pointer to a function and you died on the indirect call. Or you overwrote the plabel.

>Any idea?

You'll probably need to contact Oracle.
Paulo Pimenta
Occasional Visitor

Re: Segmentation Fault in Oracle 2.9.0.1

>Do you have a thread stack overflow?

Probably not, we increased the pthread stack size to 15Mb (triple that had being used) and the problem occured anyway.

>This typically means you had a uninitialized pointer to a function and you died on the indirect call. Or you overwrote the plabel.

How could I do that in a Oracle library?

I've tried use wdb to find out some memory problems, but up to now none was find.

>You'll probably need to contact Oracle.

We believe that the problem might be related with some bug in the Oracle patch.

We're used to put five process running, four in the same machine and the fifth in other one, sometimes they crashes at the same time, it sounds a little strange once the segmentation fault occurs in the oracle client library.

Thanks.
Dennis Handly
Acclaimed Contributor

Re: Segmentation Fault in Oracle 2.9.0.1

>we increased the pthread stack size to 15Mb (triple that had being used) and the problem occurred anyway.

That is overkill. You can find the current usage in gdb:
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1110034

Then do for each thread.

>>Or you overwrote the plabel.

>How could I do that in a Oracle library?

You can overwrite any data. You can use watch points to see where the value changes. If it never was initialized, you can tell that too.
Paulo Pimenta
Occasional Visitor

Re: Segmentation Fault in Oracle 2.9.0.1

Hi,

The problem has been solved.

The problem occurred due an Oracle bug, when you use a 9.2.0.6 client version and a 9.2.0.8 server version the program crashed in segmentation fault in the ttcdrv library.

After updating the version to 9.2.0.8 the program run without problems.

This bug had been reported in Oracle Meta Link Forum.
Yura K
Occasional Visitor

Re: Segmentation Fault in Oracle 2.9.0.1

Which Oracle version were your working?!

Thanks.