Operating System - HP-UX
1825770 Members
1989 Online
109687 Solutions
New Discussion

Re: SEGV_ACCERR - When trying to create more than 70 objects of a pericular type

 

SEGV_ACCERR - When trying to create more than 70 objects of a pericular type

Hi,
My application is creating a pericular type of object depeding on cofiguration.
In a pericular machine if it configured to create more than 70 objects then it is giving me the error "SEGV_ACCERR Invalid permissions for mapped object error" in the constructure.

Where is other machines and with number od objects less than 70 it is working fine.

Can any one suggest me what might be the problem. Where should I look for
9 REPLIES 9
Dennis Handly
Acclaimed Contributor

Re: SEGV_ACCERR - When trying to create more than 70 objects of a pericular type

How big are your objects? Are you running out of heap space?

Do you have memory corruption and 70 is just the right number to hit it?

Have you tried debugging it?
Do you have a stack trace and instruction dump?
(gdb) bt
(gdb) info reg
(gdb) disas $pc-16*12 $pc+16*4

Re: SEGV_ACCERR - When trying to create more than 70 objects of a pericular type

Thanks a lot Dennis for response.
We do have the core dump. I ran the commands suggessted by you. I need your help under standing those.
1. bt: We have did it before and it is crashing in same constructure. We did not get much help from here.
2. info reg: printed all the registers with names as pr0 to pr63, gr0 to gr66,br0-br7 and some other registers. But how to find out which is the problematic one?
3. disas $pc-16*12 $pc+16*4 : It provided me the disassempled code like bellow. (I am removing the file name etc prints to make it short)
mov gp=r35 MMB,
mov r59=r32
br.call.dptk.many rp=0xc00000001b8520e0;;
mov gp=r35 MI,I
zxt1 r16=ret0;;
cmp4.eq.unc p6=1,r16
nop.m 0x0 MMB,
nop.m 0x0
I am not able to find gp,r35, r59 in registers. How can I interprit and know there is any problem
Dennis Handly
Acclaimed Contributor

Re: SEGV_ACCERR - When trying to create more than 70 objects of a pericular type

>I need your help understanding those.

The idea was that you attach your output so I can see it too.

>I am not able to find gp, r35, r59 in registers.

gp == r1. You said you had "gr0 to gr66".

I don't see any loads or stores in your fragment, that's typically where you get signal 11. ($pc/$ip points to the instruction you want to look at.)

Re: SEGV_ACCERR - When trying to create more than 70 objects of a pericular type

Hi Dennis,
Thanks a lot for your effort.
Please find the attached file with output of gdb commands you suggested.
Please let me know you inputs.

Thanks
Dennis Handly
Acclaimed Contributor

Re: SEGV_ACCERR - When trying to create more than 70 objects of a pericular type

>Please let me know your input.

($pc/$ip was to indicate either register name, p /x $pc)

You are aborting on line 70. You are making 3 calls, the last one is returning NULL, $ret0.
0xc000000012e72770:2 : br.call.sptk.many rp=0xc000000012e876a0;;
0xc000000012e72780:0 : >> st8 [ret0]=r40

You might be able to find the name of the function by:
x /i 0xc000000012e876a0

You are again calling that function on line 72.

Re: SEGV_ACCERR - When trying to create more than 70 objects of a pericular type

Hi Dennis,
Thanks for the inputs.

But I am sorry I am not able to get much information from that.

It is aborting at line 70. But is only the constructor call no 3 calls.

I am attaching the code snipnet with line numbers. Can you guide me for furthur investigation.

Dennis Handly
Acclaimed Contributor

Re: SEGV_ACCERR - When trying to create more than 70 objects of a pericular type

>But I am sorry I am not able to get much information from that.
>It is aborting at line 70. But is only the constructor call no 3 calls.
... = new AcFTLWrapper();

To do a new expression it has to call operator new. And call any possible base class constructors.
If you compile with -S, you can see the actual calls in line 70 and 70.

>I am attaching the code snipnet with line numbers. Can you guide me for further investigation.

Where are all the things I asked?
x /i 0xc000000012e876a0

Re: SEGV_ACCERR - When trying to create more than 70 objects of a pericular type

Thanks Dennis for your help.
The problem is solved now it was problem with ACE thread specific storage. It was failing when we are going to store the newly created object inthread specific storage.

It got solved by doing
export PTHREAD_USER_KEYS_MAX=16384

The following link was helpfull

http://docs.hp.com/en/B3921-60631/pthread_key_create.3T.html
Dennis Handly
Acclaimed Contributor

Re: SEGV_ACCERR - When trying to create more than 70 objects of a pericular type

>It got solved by doing

If you solved your problem, you should close the thread indicating you got a solution.