Operating System - HP-UX
1752466 Members
5485 Online
108788 Solutions
New Discussion юеВ

How to avoid SIGSEGV - segmentation violation(signal no 11)

 
subrata  Sur
Frequent Advisor

How to avoid SIGSEGV - segmentation violation(signal no 11)

Right now I have faced a typical problemm in Unix (HP-UX uacob004 B.10.20 A 9000/782 2016569613 two-user license)
When i have run my application it is just thrown out of the system giving the following error .....

terminated by signal number 11
(20040924 04:56:31): Signal description: SIGSEGV - segmentation violation


I have checked the sar command it is giving like that
13:51:30 %usr %sys %wio %idle
13:51:31 100 0 0 0
13:51:32 100 0 0 0

Space is no issue ....
I guess memory utilization is the issue .....

Can u tell me how can i avoid that ...

 

 

 

Moved from HP-UX Technical Documentation to HP-UX > languages

21 REPLIES 21
John Palmer
Honored Contributor

Re: How to avoid SIGSEGV - segmentation violation(signal no 11)

SIGSEGV is an error within your application probably caused by an attempt to access a memory location that's not valid (usually an incorrect or corrupt pointer).

It's very unlikely to be caused by an operating system issue.

Are you able to consult with the application supplier?
Eric Antunes
Honored Contributor

Re: How to avoid SIGSEGV - segmentation violation(signal no 11)

Hi,

Execute as root and post the results of these:

#swapinfo -tam
#kmtune -l -q dbc_max_pct
#kmtune -l -q shmmax

Eric
Each and every day is a good day to learn.
Muthukumar_5
Honored Contributor

Re: How to avoid SIGSEGV - segmentation violation(signal no 11)

SIGSEGV problem will be occured when an application try to access unallocated memory area / invalid memory area / unaligned access to that particular application there. It is not related memory of system.

If you get that on during application run, you will get one core there. Try to analys with gdb as,

gdb application-binary core

or simply

file core
what core

SIGSEGV will be the application code written problem.
Easy to suggest when don't know about the problem!
Muthukumar_5
Honored Contributor

Re: How to avoid SIGSEGV - segmentation violation(signal no 11)

A good discussion on SIGSEV and debugging there.

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=670597

User limit corefile informations can be known as,

ulimit -c

You can know about core file limitation on using,
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=674445
Easy to suggest when don't know about the problem!
subrata  Sur
Frequent Advisor

Re: How to avoid SIGSEGV - segmentation violation(signal no 11)

In the mean time i m attaching the core file for ur further verification ... As right now i dont have gdb debugger So can u tell me at what point it is crashing my program


---------------------------------
wapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 1024 0 1024 0% 0 - 1 /dev/vg00/lvol2
reserve - 52 -52
total 1024 52 972 5% - 0 -

----------------------------------
dbc_max_pct = 50

----------------------------------
shmmax = 67108864

---------------------------------
dbc_max_pct is high, lowering it may free more memory.
------------------------------
Muthukumar_5
Honored Contributor

Re: How to avoid SIGSEGV - segmentation violation(signal no 11)

SIGSEGV problem will not come when there is insufficieny in system memory. It is because of application's are trying to access invalid memory area there.

You don't need gdb debugger too to analyse core there.

Try as,

file core
what core

If you want to analyse that problem of application and where it occured then it will be good with gdb.

Attaching core file to us will not be helpful. It will be effect to have that application binary with debug mode too there.


Or you can try adb there too.

http://software.hp.com/portal/swdepot/displayProductInfo.do?productNumber=NEWADB11i

It is for 11.00 version there.
Easy to suggest when don't know about the problem!
subrata  Sur
Frequent Advisor

Re: How to avoid SIGSEGV - segmentation violation(signal no 11)

Hi
I m attaching the core in three parts and also attaching the split software for ur further necessary action ...
Pl read it As i dnt have gdb tools
subrata  Sur
Frequent Advisor

Re: How to avoid SIGSEGV - segmentation violation(signal no 11)

Hi
Sorry for earlier mail

I m attaching the core in three zip parts and also attaching the split software(core3.zip) for ur further necessary action ...
Pl read it As i dnt have gdb tools
subrata  Sur
Frequent Advisor

Re: How to avoid SIGSEGV - segmentation violation(signal no 11)

Hi
Sorry for earlier mail

I m attaching the core in three zip parts and also attaching the split software(core3.zip) for ur further necessary action ...
Pl read it As i dnt have gdb tools


---------------
core2.zip