From Bugzilla Helper: User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; pl-PL; rv:1.7.10) Gecko/20050717 Firefox/1.0.6 Description of problem: When I change "stack size" on 65536 using ulimit or files /etc/security/limits.conf aplications like cpanel there starts making problems, when adding subdomains using cpanel I get errors " Bind reloading on imn1 using rndc zone: [leaseweb.imn.pl] Error reloading bind on imn1: socket.c:2367: isc_thread_create() failed rndc: create socket manager: unexpected error The subdomain, sdc.leaseweb.imn.pl has been added. " strace: http://tech.imn.pl/redhat/cpanel-strace.txt FTP Server (pureftpd) with standard config and stack size (10240) when trying uploading file on server I get segfault Strace: http://tech.imn.pl/redhat/pureftpd-strace.txt I get an idea to set up the higher value of stack size, I added to limits.conf * soft nofile 65536 * hard nofile 65536 * soft stack 65536 * hard stack 65536 I restarted server and testing what will be going on, and then starts showing seriusly porblems, ssl stop working in Cpanel, and using exim, could not send any mails. Version-Release number of selected component (if applicable): glibc-2.3.4-2.9 How reproducible: Always Steps to Reproduce: 1. - 2. 3. Additional info:
This has nothing to do with glibc actually. If you look at the strace, you'll see: [pid 23597] mmap2(NULL, 67112960, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = -1 ENOMEM (Cannot allocate memory) pthread_create tried to allocate thread's stack, but there wasn't enough memory. This depends on what /proc/sys/vm/overcommit_memory /proc/sys/vm/overcommit_ratio setting you are using, how much RAM + swap do you have and how many and how memory hungry other processes are. In any case that is a kernel decision. You can try echo 1 > /proc/sys/vm/overcommit_memory or increase your swap size. Anyway, if your ftp daemon needs more than 10MB of stack, especially if that's remotely triggerable how much will it actually need, I'd call it severely broken. If there are apps where it is justified to run them with bigger stack, either (if that is just non-initial thread stack needs, you can use pthread_attr_setstacksize, or you can just increase the hard limit systemwide and run only the particular program with bigger soft stack limit).