Re: SIGSEGV, SEGV_ACCERR - Invalid Permissions for object in OCIEnvCreate (808 Views)
Reply
Advisor
Pinkerik
Posts: 14
Registered: ‎08-14-2013
Message 1 of 7 (839 Views)
Accepted Solution

SIGSEGV, SEGV_ACCERR - Invalid Permissions for object in OCIEnvCreate

When running application, it crashes inside oracle library when calling OCIEnvCreate

But, when I tryed to simulate it, by just calling it alone, it works fine, even tryed to run it inside thread (still ok)

I have literally spent half a day just googling and trying every suggestion I found on forums, but I don't know what to try next..

 

Just to mention, it works completely fine on other platforms

 

Problem is reproducible every time, and every time it fails at same point

 

at call to:

OCIEnvCreate(reinterpret_cast<OCIEnv**>(&oci_env_hndl_), OCI_THREADED, NULL, NULL, NULL, NULL, 0, NULL);

where oci_env_hndl_ is NULL at time being called (checked through gdb)

 

I'm desperate here, and open to any suggestions

 

Thx.

 

Please use plain text.
Acclaimed Contributor
Dennis Handly
Posts: 24,762
Registered: ‎03-06-2006
Message 2 of 7 (827 Views)

Re: SIGSEGV, SEGV_ACCERR - Invalid Permissions for object in OCIEnvCreate (thread stack overflow)

[ Edited ]

>even tried to run it inside thread

 

You could have a thread stack overflow.

What does this show?

(gdb) disas $pc-16*12 $pc+16*4

(gdb) set $sp_save = $sp

(gdb) frame 42

(gdb) p $sp - $sp_save

Please use plain text.
Advisor
Pinkerik
Posts: 14
Registered: ‎08-14-2013
Message 3 of 7 (816 Views)

Re: SIGSEGV, SEGV_ACCERR - Invalid Permissions for object in OCIEnvCreate

Had to rerun the program, because firewall cut of my ssh connection,

but same crash at the same place,

just posting new backtrace again

Please use plain text.
Acclaimed Contributor
Dennis Handly
Posts: 24,762
Registered: ‎03-06-2006
Message 4 of 7 (811 Views)

Re: SIGSEGV, SEGV_ACCERR - Invalid Permissions for object in OCIEnvCreate (thread stack overflow)

>(gdb) p $sp - $sp_save $1 = 335024

 

Yes,  you have a thread stack overflow.  You need something about twice the above value.

 

0x9fffffffbbf03c10:0 <skgfqio+0x00>: alloc r36=ar.pfs,0,42,8,0

0x9fffffffbbf03c10:1 <skgfqio+0x01>: mov r9=0x45730  << large frame!

0x9fffffffbbf03c30:0 <skgfqio+0x20>: sub r12=r12,r9

0x9fffffffbbf03c60:1 <skgfqio+0x51>: adds r39=16,r12

0x9fffffffbbf03c70:1 <skgfqio+0x61>: st4 [r39]=r0,8  <<< Storing into a local shouldn't give signal

Please use plain text.
Advisor
Pinkerik
Posts: 14
Registered: ‎08-14-2013
Message 5 of 7 (808 Views)

Re: SIGSEGV, SEGV_ACCERR - Invalid Permissions for object in OCIEnvCreate

I even tryed to increase thread stack trace through 

pthread_attr_setstacksize

 

Old thread stack size: 262144
New thread stack size: 8388608

 

But that still didn't help

Please use plain text.
Acclaimed Contributor
Dennis Handly
Posts: 24,762
Registered: ‎03-06-2006
Message 6 of 7 (806 Views)

Re: SIGSEGV, SEGV_ACCERR - Invalid Permissions for object in OCIEnvCreate (thread stack overflow)

[ Edited ]

>I even tried to increase thread stack trace through pthread_attr_setstacksize

 

(Should I assume you know how to use that function and pass the attributes to pthread_create?)

 

>(gdb) p $sp - $sp_save $1 = 335024

 

If this calculation didn't change, then you didn't change the stacksize.

Please use plain text.
Advisor
Pinkerik
Posts: 14
Registered: ‎08-14-2013
Message 7 of 7 (801 Views)

Re: SIGSEGV, SEGV_ACCERR - Invalid Permissions for object in OCIEnvCreate

I'm so sorry about my last post,

I have a realy bad habit of not reading documentation till the end...

 

But it works great now

Thank you so much for your help

Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation