Operating System - HP-UX
1825795 Members
2264 Online
109687 Solutions
New Discussion

Re: SIGSEGV and kernel parameters

 
Phil Daws_2
Regular Advisor

SIGSEGV and kernel parameters

Xmas Greetings all ...

I have a problem where we are receiving a Segmentation Violation. I believe this is a problem due to our kernel parameters. We are running HPUX V11.11 on a N4000x4way with 8192MB RAM. Our current parameters are :

maxdsiz_64bit 0xc0000000
maxtsiz_64bit 0x100000000
maxssiz_64bit 0x10000000
maxdsiz 0xc0000000
maxssiz 0x04fb3000
maxtsiz 0x40000000

What would you recomend we up these too?

regards

Phil
6 REPLIES 6
eran maor
Honored Contributor

Re: SIGSEGV and kernel parameters

Hi

first in is impotentd that you will know how was your system install 32 bit or 64 bit .

you can see it with the command :
getconf KERNEL_BITS

i think that you are working with 64 bit .

my advise it to change this param to there max. size .

see this link for details on the params and what is the max size of this params ,

http://docs.hp.com//hpux/onlinedocs/os/KCparams.OverviewAll.html
love computers
Bill Hassell
Honored Contributor

Re: SIGSEGV and kernel parameters

A lot depends on the programs you are running. These are limits to prevent runaway programs from consuming too much memory. If your program is a 32-bit program, then it can't grow much beyond 940 megs of RAM without paying special attention to how the program is mapped into memory. There are separate rules for shared memory, and limits for stack are different for 32 versus 64 bit programs.

The N-class computer only runs a 64 bit kernel so there are no practical limits on RAM, but you need to look at the memory and process management papers in /usr/share/doc.


Bill Hassell, sysadmin
Phil Daws_2
Regular Advisor

Re: SIGSEGV and kernel parameters

Okay. But is there a formula for calculating the requirements or is it a figure up in the air and a best guestimate?

Thanks

Phil
Phil Daws_2
Regular Advisor

Re: SIGSEGV and kernel parameters

Here is a dump from TUSC when it fails :

[extprocPLSEx][7662] Received signal 11, SIGSEGV, in user mode, [SIG_DFL], partial siginfo
[extprocPLSEx][7662] Siginfo: si_code: I_NONEXIST, faulting address: 0x3c2b4fd8, si_errno: 0
[extprocPLSEx][7662] PC: 0xc019c5b7, instruction: 0x4b570030

Scratching head now :)
Steven Gillard_2
Honored Contributor

Re: SIGSEGV and kernel parameters

Phil,

As Bill stated, it depends on what applications you are running. I personally always set the maxdsiz parameter to the maximum on production systems because I have scripts that monitor the memory usage of processes and alert me when a certain threshold is reached. I can then make a decision on whether it is normal or there is a memory leak and I need to shutdown the application.

If you're getting a SIGSEGV it may or may not be related to these parameters, it could simply be a bug the program. A couple of questions:

- how big is the resulting corefile? If the size of the core is equal to maxdsiz then thats likely to be your problem. If its less than maxdsiz then your problem is elsewhere.

- what are the lines immediately before the SIGSEGV line in your tusc trace? Do any system calls return errno's? I would expect an ENOMEM if you hit maxdsiz. No errors in the tusc trace indicates that the program has simply tried to access memory illegally, and you won't get any more info from tusc on this.

- do you have access to the source code? If so, run the core file through a debugger like wdb or gdb and you can get a stack trace. If not, send the core back to the vendor or application developers, along with any other relevant information.

Regards,
Steve
Phil Daws_2
Regular Advisor

Re: SIGSEGV and kernel parameters

Here are the lines surrounding it. As you can see it is reading from a socket and completes the read, but then bails. Will install GDB and check the core file.

[extprocPLSEx][7662] recv(6, "; ", 1, 0) ..................................................................... = 1
[extprocPLSEx][7662] recv(6, "0 ", 1, 0) ..................................................................... = 1
[extprocPLSEx][7662] recv(6, ". ", 1, 0) ..................................................................... = 1
[extprocPLSEx][7662] recv(6, "1 ", 1, 0) ..................................................................... = 1
[extprocPLSEx][7662] recv(6, "9 ", 1, 0) ..................................................................... = 1
[extprocPLSEx][7662] recv(6, "; ", 1, 0) ..................................................................... = 1
[extprocPLSEx][7662] recv(6, ". ", 1, 0) ..................................................................... = 1
[extprocPLSEx][7662] recv(6, "; ", 1, 0) ..................................................................... = 1
[extprocPLSEx][7662] recv(6, ". ", 1, 0) ..................................................................... = 1
[extprocPLSEx][7662] recv(6, "; ", 1, 0) ..................................................................... = 1
[extprocPLSEx][7662] recv(6, ". ", 1, 0) ..................................................................... = 1
[extprocPLSEx][7662] recv(6, "\n", 1, 0) ..................................................................... = 1
[extprocPLSEx][7662] Received signal 11, SIGSEGV, in user mode, [SIG_DFL], partial siginfo
[extprocPLSEx][7662] Siginfo: si_code: I_NONEXIST, faulting address: 0x3c2b4fd8, si_errno: 0
[extprocPLSEx][7662] PC: 0xc019c5b7, instruction: 0x4b570030
[extprocPLSEx][7662] exit(11) [implicit] ..................................................................... WIFSIGNALED(SIGSEGV)|
WCOREDUMP
[/orarpc/bin/][6940] select(2048, 0x7b0445c8, NULL, NULL, NULL) .............................................. = 1
[/orarpc/bin/][6940] gettimeofday(0x7b0444f0, NULL) .......................................................... = 0
[/orarpc/bin/][6940] gettimeofday(0x7b04a7f0, NULL) .......................................................... = 0
[/orarpc/bin/][6940] getsockname(7, 0x7b04ab2c, 0x7b04ab20) .................................................. = 0
[/orarpc/bin/][6940] accept(7, 0x7b04ab00, 0x7b04aafc) ....................................................... = 12
[/orarpc/bin/][6940] fcntl(12, F_SETFD, 1) ................................................................... = 0
[/orarpc/bin/][6940] ioctl(12, FIONBIO, 0x7b04a5f8) .......................................................... = 0
[/orarpc/bin/][6940] sigaction(SIGPIPE, 0x7b04a5f0, 0x7b04a618) .............................................. = 0
[/orarpc/bin/][6940] select(2048, 0x7b0445c8, 0x7b0446c8, NULL, NULL) ........................................ = 1
[/orarpc/bin/][6940] gettimeofday(0x7b0444f0, NULL) .......................................................... = 0