Operating System - HP-UX
1835200 Members
2386 Online
110077 Solutions
New Discussion

Help Me WITH Memory fault(coredump)

 
RAC_1
Honored Contributor

Help Me WITH Memory fault(coredump)

Some background.
HP-UX 11.11 Superdome m/c
I am running a script that checks the ldap database and reports when certain conditions are met.
I am getting a core dump with following error.

./writescript.sh[26]: 2910 Memory fault(coredump)

Now I ran it with truss to check all calls. The output is as follows.

mmap(NULL, 131244, PROT_READ|PROT_EXEC, MAP_SHARED|MAP_SHLIB, 3, 0x9000) ................ = 0xc0010000
mmap(NULL, 14696, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_SHLIB, 3, 0x2a000) .... = 0x7b050000
mmap(NULL, 8192, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS, -1, NULL) ... = 0x7b04e000
mmap(NULL, 1323008, PROT_READ|PROT_EXEC, MAP_SHARED|MAP_SHLIB, 3, 0x6d000) .............. = 0xc0100000
mmap(NULL, 45056, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS|MAP_SHLIB, -1, NULL) = 0x7b043000
mmap(0x7b03b000, 32768, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_SHLIB, 3, 0x1b0000) = 0x7b03b000
mmap(NULL, 16384, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS, -1, NULL) .. = 0x7b037000
mmap(NULL, 12288, PROT_READ|PROT_EXEC, MAP_SHARED|MAP_SHLIB, 3, 0x2000) ................. = 0xc0004000
mmap(NULL, 4096, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_SHLIB, 3, 0x5000) ...... = 0x7b036000
mmap(NULL, 1323008, PROT_READ|PROT_EXEC, MAP_SHARED|MAP_SHLIB, 3, 0x6d000) .............. ERR#12 ENOMEM
mmap(NULL, 40, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS, -1, NULL) ..... = 0x7b035000
Received signal 18, SIGCLD, in sigvec(), [SIG_DFL], no siginfo
Received signal 18, SIGCLD, in sigvec(), [SIG_DFL], no siginfo
waitpid(-1, 0x7f7f11b4, WUNTRACED) ...................................................... [sleeping]
./writescript.sh[26]: 2910 Memory fault(coredump)
Received signal 18, SIGCLD, in read(), [caught], no siginfo
Received signal 18, SIGCLD, in sigvec(), [SIG_DFL], no siginfo

As can be seen it is failing at mmap call with error No -12.
My kernel values are as follows
maxdsiz - 262144
maxdsiz_64bit - 262144
maxssiz - 2048
maxssiz_64bit - 2048
maxtsiz - 262144
maxtsiz_64bit - 262144

(these values are through sysdef and kmtune is giving different values-this another thing)
I am planning to change maxssiz_64bit to 8192
Iam hitting the right spot?

Thanks in advance.
There is no substitute to HARDWORK
3 REPLIES 3
harry d brown jr
Honored Contributor

Re: Help Me WITH Memory fault(coredump)


THOSE values are NOT in KB they are in BYTES.

If you don't jack them up to where they need to be you will be in a world of hurt.

I wouldn't go any lower than this:


kmtune | grep "^max" | grep siz
maxdsiz 0x40000000 - 0X40000000
maxdsiz_64bit 0x40000000 - 0X40000000
maxssiz 0x800000 - 0X800000
maxssiz_64bit 0x800000 - 0X800000
maxtsiz 0x4000000 Y 0X4000000
maxtsiz_64bit 0x40000000 Y 0X40000000


live free or die
harry
Live Free or Die
RAC_1
Honored Contributor

Re: Help Me WITH Memory fault(coredump)

harry,

sysdef is giving above details, but kmtune gives

maxdsiz 1073741824 - 1073741824
maxdsiz_64bit 0x40000000 - 0X40000000
maxssiz 0x800000 - 0X800000
maxssiz_64bit 0x800000 - 0X800000
maxtsiz 1073741824 Y 1073741824
maxtsiz_64bit 0x40000000 Y 0X40000000

if I do printf "%d\n" 0x800000
it gives 8388608 i.e 8MB then why I am getting the error.

(Also why sysdef & kmtune report diff. things)

I am really caught in this.
There is no substitute to HARDWORK
Mike Stroyan
Honored Contributor

Re: Help Me WITH Memory fault(coredump)

The "ERR#12 ENOMEM" is not a real problem. The dld.sl just tries to map some shared libraries multiple times and gets that error from the mmap call. It doesn't cause any trouble. It looks like the coredump is from a child process. Your should use tusc with the "-f -p" options to get data from child processes.
You could also examine the core file itself with "file core" and wdb.