On Monday 18 October 2004 11:36, ML mail wrote:

Hi,

> Oct 18 11:32:16 srv master[30609]: setrlimit: Unable
> to set file descriptors limit to -1: Operation not
> permitted
> Oct 18 11:32:16 srv master[30609]: retrying with 1024
> (current max)
> Oct 18 11:32:16 srv master[30609]: process started
> Oct 18 11:32:16 srv master[30610]: about to exec
> /opt/cyrus/bin/ctl_cyrusdb
> Oct 18 11:32:16 srv ctl_cyrusdb[30610]: recovering
> cyrus databases
> Oct 18 11:32:16 srv ctl_cyrusdb[30610]: skiplist:
> recovered /var/cyrus/mailboxes.db (0 records, 144
> bytes) in 0 seconds
> Oct 18 11:32:16 srv ctl_cyrusdb[30610]: skiplist:
> recovered /var/cyrus/annotations.db (0 records, 144
> bytes) in 0 seconds
> Oct 18 11:32:16 srv ctl_cyrusdb[30610]: done
> recovering cyrus databases
> Oct 18 11:32:16 srv master[30611]: about to exec
> /opt/cyrus/bin/ctl_mboxlist
> Oct 18 11:32:16 srv master[30609]: process 30611
> exited, signaled to death by 11
> And the master quits with "Segmentation fault". Does
> anyone know what's this setrlimit problem ?

Well, this won't fix your problem, at least it shouldn't ;) but the attached 
patch silences the setrlimit thing. Maybe Cyrus developers want to merge this 
finally ...

-- 
ciao, Marc
--- old/master/master.c	2004-06-22 21:00:05.000000000 +0200
+++ new/master/master.c	2004-10-12 23:51:19.000000000 +0200
@@ -1541,7 +1541,7 @@ void limit_fds(rlim_t x)
 
     rl.rlim_cur = x;
     rl.rlim_max = x;
-    if (setrlimit(RLIMIT_NUMFDS, &rl) < 0) {
+    if (setrlimit(RLIMIT_NUMFDS, &rl) < 0 && x != RLIM_INFINITY) {
 	syslog(LOG_ERR, "setrlimit: Unable to set file descriptors limit to %ld: %m", x);
 
 #ifdef HAVE_GETRLIMIT
@@ -1555,8 +1555,7 @@ void limit_fds(rlim_t x)
 	}
     }
 
-
-    if (verbose > 1) {
+    if (verbose > 1 && getrlimit(RLIMIT_NUMFDS, &rl) >= 0) {
 	r = getrlimit(RLIMIT_NUMFDS, &rl);
 	syslog(LOG_DEBUG, "set maximum file descriptors to %ld/%ld", rl.rlim_cur,
 	       rl.rlim_max);

Reply via email to