On Sun, Feb 16, 2003 at 07:55:09PM -0500, Sam Varshavchik wrote:
> Ben JW writes:
>
> > when i try to start the imap server i get the following error from impad:
> > ....
> > %/usr/lib/courier-imap/libexec/imapd.rc start
> > ulimit: cannot raise limit: Invalid argument
> > ....
> > anyone?
>
> You must be root to start the server.
I get that, and I'm root when I start my server. This is under FreeBSD-4.7:
bash$ sudo bash
bash# /usr/courier-imap/libexec/imapd.rc start
ulimit: cannot raise limit: Invalid argument
bash# grep IMAP_ULIMITD= /etc/courier-imap/imapd
IMAP_ULIMITD=65536
bash# ulimit -v 65536
ulimit: cannot raise limit: Invalid argument
bash#
I couldn't work out what the problem was:
bash# ulimit -a
core file size (blocks) unlimited
data seg size (kbytes) 524288
file size (blocks) unlimited
max memory size (kbytes) unlimited
stack size (kbytes) 65536
cpu time (seconds) unlimited
max user processes 1818
pipe size (512 bytes) 1
open files 3636
virtual memory (kbytes) 589824 << I presume it's this?
bash# ulimit -v 589824
ulimit: cannot raise limit: Invalid argument
bash# ulimit -v 1
ulimit: cannot raise limit: Invalid argument
bash#
A ktrace is not particularly helpful:
bash# ktrace bash -c 'ulimit -v 65536'
ulimit: cannot raise limit: Invalid argument
bash# kdump | less
...
69514 bash CALL getrlimit(0x2,0xbfbff880)
69514 bash RET getrlimit 0
69514 bash CALL getrlimit(0x3,0xbfbff880)
69514 bash RET getrlimit 0
69514 bash CALL write(0x2,0x8099000,0x2d)
69514 bash GIO fd 2 wrote 45 bytes
"ulimit: cannot raise limit: Invalid argument
"
69514 bash RET write 45/0x2d
69514 bash CALL exit(0x1)
A return value of 0 from getrlimit indicates success; those two parameters are
#define RLIMIT_DATA 2 /* data size */
#define RLIMIT_STACK 3 /* stack size */
So as far as I can tell, it's a bug in 'bash'. In fact it works under sh:
bash# /bin/sh
# ulimit -v 65536
#
Regards,
Brian.
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users