1830868 Members
1808 Online
110017 Solutions
New Discussion

SIGSEGV ERROR!!!!!!!

 
SOLVED
Go to solution
amir_11
Occasional Contributor

SIGSEGV ERROR!!!!!!!

Hi all,

I using hp_ux 10.20.
I have a problem with an application.
I get "memory fault (SIGSEGV).
Can I resolve it?

Thanks

Amir
9 REPLIES 9
Zeev Schultz
Honored Contributor
Solution

Re: SIGSEGV ERROR!!!!!!!

Can have a problem with stack segment size
or data segment size of a proccess.
Check these with
echo maxdsiz/D | adb /stand/vmunix /dev/kmem
echo maxssiz/D | adb /stand/vmunix /dev/kmem
maxdsiz is 64mb by default,can be encreased to
1-2gb values.Can do this with SAM also.
Note,adb maxdsiz value is in 4kb pages , so divide by 4.

Regards,
Zeev
So computers don't think yet. At least not chess computers. - Seymour Cray
Zeev Schultz
Honored Contributor

Re: SIGSEGV ERROR!!!!!!!

Use size command to determine how
application needs segment sizes .For more
details read size man page.
So computers don't think yet. At least not chess computers. - Seymour Cray
A. Clay Stephenson
Acclaimed Contributor

Re: SIGSEGV ERROR!!!!!!!

While increasing maxdsiz and maxssiz may fix this, by far the most common reason for this is an error in the programming itself. For example, attemtpting to access an element beyond the limits of an array. The best approach is to use a debugger on the core file to do a stack trace. You can then see the problem. If you have the source code, you can compile with the -g option to include more debugger information in the executable. You can then pinpoint the line of source code that caused the dump.
If it ain't broke, I can fix that.
amir_11
Occasional Contributor

Re: SIGSEGV ERROR!!!!!!!

The application that I'm having problem with is bru.
It's a backup software.
Zeev Schultz
Honored Contributor

Re: SIGSEGV ERROR!!!!!!!

Amir,
Use size command.size /

Next,

echo "maxdsiz/D" | adb /stand/vmunix /dev/kmem
echo "maxtsiz/D" | adb /stand/vmunix /dev/kmem
echo "maxssiz/D" | adb /stand/vmunix /dev/kmem

Compare with size output.

and don't forget to give points.

Zeev
So computers don't think yet. At least not chess computers. - Seymour Cray
amir_11
Occasional Contributor

Re: SIGSEGV ERROR!!!!!!!

Hi Zeev,

You will get some point's... (Just kidding you will get them all).

Now my output is:
"maxdsiz/D" | adb /stand/vmunix /dev/kmem
maxdsiz:
maxdsiz: 16384
echo "maxtsiz/D" | adb /stand/vmunix /dev/kmem
maxtsiz:
maxtsiz: 16384
echo "maxssiz/D" | adb /stand/vmunix /dev/kmem
maxssiz:
maxssiz: 2048

My size output:
size ./bru
161236 + 35392 + 15184 = 211812

The number for the kernel parameters, suppose to be like the number of the size output?
If so, is it going to effect any other application, database?

Amir
Zeev Schultz
Honored Contributor

Re: SIGSEGV ERROR!!!!!!!

Size checks only some binary,and what if
this binary calls another binaries (with more memory requests etc).

Ok,as you have 10.20 here are the values :
---------------------------------------------
maxdsiz
Specify the maximum data segment size for an executing process.

Acceptable Values:

Minimum: 0x400000 (4 Mbytes)
Maximum: 0x3B031000 (944 Mbytes)
Default: 0x4000000 (64 megabytes)
---------------------------------------------
maxssiz
Set the maximum dynamic storage segment (DSS) size in bytes.

Acceptable Values:

Minimum: 0x4000 (16 Kbytes)
Maximum: 0x4FB3000 (approx. 79 Mbytes)
Default: 0x800000 (8 Mbytes)
---------------------------------------------
maxtsiz
Set maximum shared-text segment size in bytes.

Acceptable Values:

Minimum: 0x40000 (4 Mbytes)
Maximum: 0x40000000 (4 Gbytes)
Default: 0x4000000 (64 Mbytes)

---------------------------------------------

So enlarge maxdsiz to say,128Mb (you have 4 now), maxtsiz to 128Mb (also have 4 now) and maxssiz to 64mb (have 1/2 mb now).

You can do this using SAM.adb shows you values in pages of 4kb each (run "sysdef|grep max").
For example maxdsiz - 64mb = 67108864 bytes = 0x4000000 in hex.

This requires kernel rebuild and system reboot.

Hope this helps

Zeev
So computers don't think yet. At least not chess computers. - Seymour Cray
Caesar_3
Esteemed Contributor

Re: SIGSEGV ERROR!!!!!!!

Hello!

As you can see that your values are not
enought for the program that you want to use
so you need to change them for your application

You can do it with SAM,
change the value:
maxdsiz-> 100 - 140 MB
maxssiz-> 60 - 74 MB
maxtsiz-> 100 - 140 MB

It's almost would affect on the kernel,
it will probably take a few sec. more on the
boot (load of the kernel)
But you really have small values.

Caesar
amir_11
Occasional Contributor

Re: SIGSEGV ERROR!!!!!!!

Hi Zeev,

According to the information I gave you befor you wrote me that the maxdsize value is 4MB.
When I'm looking on my kernel parameters via Sam and see that the value is 64MB:
Name Current Pending
maxdsiz 67108864 67108864

I'm a little bit confused.
Can you clear that one for me?

*another question for you:
My backup application is running almost 4 years, what happened that suddenly the parameters is not good enough or ( MA NISHTANA BKERNEL HAZE MIKOL HKERNELIM)

Cheers

Have fun

Amir