Forum: Cfengine Help
Subject: Re: latest cf-monitord memor usage
Author: matter
Link to topic: https://cfengine.com/forum/read.php?3,18826,18867#msg-18867

Yep, heap/stack collision issue. The stabstring/extend_brk is basically running 
out of heap space. By default, there is only 1 segment reserved for data and 
the stack
(256 MB) for the commands. The ulimit values for data and stack are the maximum 
size to which they are allowed to grow. So, if the sum of the data and stack 
limit is more than 256 MB ,it is possible that stack and the heap collide, 
causing the core dump.  Using the large data segment model, allocates more 
segments for data heap and
hence avoids stack - heap collision. If the "data" limit is set to infinite, 
the heap grows and collides with the stack which causes the coredump (stack and 
data have a shared segment).

You can make the heap larger by compile flag:


-bmaxdata:0x80000000


To re-link the binary without recompilation:


ldedit -b maxdata:0x80000000 



It will give you more heap, but eventually that will be consumed as well. It 
will easily run a week with this cflag.

You could increase the ulimit for data of the id running cfengine (presumably 
root, and probably already set at least to the value below)


ulimit -d 204800


I have been trying to find this one for some time now. I have limited time 
awhile to delve into it at the level it needs. Eventually, I will find it, but 
not in the near future.

_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to