1748169 Members
3921 Online
108758 Solutions
New Discussion

Memory fault?

 
Jonathan Grymes
Frequent Advisor

Memory fault?

System is HP-UX 11.31 itanium (rx2620). I installed sudo but when I try to use it I get a core dump and this message.

 

$ sudo ls

Pid 5387 received a SIGSEGV for stack growth failure.
Possible causes: insufficient memory or swap space,
or stack size exceeded maxrsessiz
or stack size limit is set too small.
Memory fault

#  swapinfo -tam
             Mb      Mb      Mb   PCT  START/      Mb
TYPE      AVAIL    USED    FREE  USED   LIMIT RESERVE  PRI  NAME
dev        8192       0    8192    0%       0       -    1  /dev/vg00/lvol2
reserve       -    1028   -1028
memory     3876    1816    2060   47%
total     12068    2844    9224   24%       -       0    -

Thanks, Jon

8 REPLIES 8
Dennis Handly
Acclaimed Contributor

Re: Memory fault, maxssiz too small

>total     12068    2844    9224   24%

 

Should have enough swap.

Either you have a recursive stack overflow or your kernel limits are too small.

What does this say:

kctune maxdsiz maxssiz maxrsessiz

 

Jonathan Grymes
Frequent Advisor

Re: Memory fault?

# kctune maxdsiz maxssiz maxrsessiz
Tunable          Value  Expression  Changes
maxdsiz     4294963200  4294963200  Immed
maxrsessiz     8388608  Default
maxssiz        8388608  Default     Immed

Dennis Handly
Acclaimed Contributor

Re: Memory fault, maxssiz too small

>maxrsessiz     8388608  Default
>maxssiz        8388608  Default     Immed

 

maxssiz is way too small, increase it to 64 MB.

maxrsessiz is probably fine.  I've only seen several cases where it had to be increased and it requires a reboot.

Jonathan Grymes
Frequent Advisor

Re: Memory fault, maxssiz too small

Made the update:

# kctune  maxdsiz maxssiz maxrsessiz
Tunable          Value  Expression  Changes
maxdsiz     4294963200  4294963200  Immed
maxrsessiz     8388608  Default
maxssiz       64000000  64000000    Immed

The sudo command is still not working though.

$ ls -l /usr/local/etc/sudoers
-r--r-----   1 root       root           992 Mar 21 15:19 /usr/local/etc/sudoers
$ more /usr/local/etc/sudoers
/usr/local/etc/sudoers: Permission denied
$ sudo more /usr/local/etc/sudoers

Pid 5817 received a SIGSEGV for stack growth failure.
Possible causes: insufficient memory or swap space,
or stack size exceeded maxrsessiz
or stack size limit is set too small.
Memory fault
$

Jonathan Grymes
Frequent Advisor

Re: Memory fault, maxssiz too small

Adding a few more if its helpful.

maxdsiz                           4294963200  4294963200  Immed
maxdsiz_64bit                     4294967296  Default     Immed
maxfiles                                2048  Default
maxfiles_lim                            4096  Default     Immed
maxrsessiz                           8388608  Default
maxrsessiz_64bit                     8388608  Default
maxssiz                             64000000  64000000    Immed
maxssiz_64bit                      268435456  Default     Immed
maxtsiz                            100663296  Default     Immed
maxtsiz_64bit                     1073741824  Default     Immed
maxuprc                                 1995  1995        Immed

Dennis Handly
Acclaimed Contributor

Re: Memory fault, maxssiz too small

>The sudo command is still not working though.

 

You could try doubling it to 128 MB but I wouldn't think something like sudo would need that much stack.

It could be a recursive stack overflow.

 

Oh, making maxssiz bigger won't help if ulimit is still small.  What does "ulimit -a" show?

You may have to re-login.

Jonathan Grymes
Frequent Advisor

Re: Memory fault, maxssiz too small

# ulimit -a
time(seconds)        unlimited
file(blocks)         unlimited
data(kbytes)         4194300
stack(kbytes)        62500
memory(kbytes)       unlimited
coredump(blocks)     4194303
nofiles(descriptors) 2048

Dennis Handly
Acclaimed Contributor

Re: Memory fault, maxssiz too small

>stack(kbytes)        62500

 

This is 62 MB.  So this probably means sudo is broken or the sudoers is causing it to get a recursive stack overflow.

If you can get a corefile and a stacktrace, that might be helpful.