[Dovecot] running imap command line
I am trying to debug some core dump problems. I should be able to run imap by itself right? How to fix?
# ./imap imap(root): Fatal: setgroups() failed: Too many extra groups
I am using latest nightly code.
At 9:39 AM -0800 1/5/08, Anil wrote:
I am trying to debug some core dump problems. I should be able to run imap by itself right? How to fix?
# ./imap imap(root): Fatal: setgroups() failed: Too many extra groups
I am using latest nightly code.
That error indicates that the root account is a member of too many groups to use the setgroups() system call, at least after Dovecot adds its mail_extra_groups list. Typically systems control that limit with the NGROUPS_MAX or kern.ngroups kernel parameter (depending on the heritage of the specific OS) and the traditional limit is 16, with some systems defaulting to 32. Some systems are held to 32 as an absolute limit.
Some programs deal with that limit by truncating the list of groups provided to setgroups() but that can be a tricky business.
-- Bill Cole bill@scconsult.com
I don't think I am hitting the NGROUPS_MAX, my limits.h shows it to be 16.
# groups root other bin sys adm uucp mail tty lp nuucp daemon
Thats less than 16.
I think the setgroups() used in Dovecot is failing because of this error:
EINVAL The value of gidsetsize is non-zero and less
than the number of supplementary group IDs
set for the calling process.
What does that mean?
if (setgroups(gid_count, gid_list) < 0) {
if (errno == EINVAL) {
i_fatal("setgroups(%s) failed: Too many extra groups",
extra_groups == NULL ? "" : extra_groups);
} else {
i_fatal("setgroups() failed: %m");
}
}
On Jan 5, 2008 11:07 AM, Bill Cole dovecot-20061108@billmail.scconsult.com wrote:
At 9:39 AM -0800 1/5/08, Anil wrote:
I am trying to debug some core dump problems. I should be able to run imap by itself right? How to fix?
# ./imap imap(root): Fatal: setgroups() failed: Too many extra groups
I am using latest nightly code.
That error indicates that the root account is a member of too many groups to use the setgroups() system call, at least after Dovecot adds its mail_extra_groups list. Typically systems control that limit with the NGROUPS_MAX or kern.ngroups kernel parameter (depending on the heritage of the specific OS) and the traditional limit is 16, with some systems defaulting to 32. Some systems are held to 32 as an absolute limit.
Some programs deal with that limit by truncating the list of groups provided to setgroups() but that can be a tricky business.
-- Bill Cole bill@scconsult.com
At 11:53 AM -0800 1/5/08, Anil wrote:
I don't think I am hitting the NGROUPS_MAX, my limits.h shows it to be 16.
# groups root other bin sys adm uucp mail tty lp nuucp daemon
Thats less than 16.
I think the setgroups() used in Dovecot is failing because of this error:
EINVAL The value of gidsetsize is non-zero and less than the number of supplementary group IDs set for the calling process.
What does that mean?
Either:
- You are using some OS where the Standard C Library is badly broken by design.
- You are using Solaris (or some related OS) and have mis-read the man page where that quoted text exists, but explicitly DOES NOT describe setgroups().
-- Bill Cole bill@scconsult.com
Ok, guilty as charged! #2 was it. I got cross eyed, and was wondering why they were saying the same thing twice!
The getgroups() function will fail if:
EINVAL The value of gidsetsize is non-zero and less
than the number of supplementary group IDs
set for the calling process.
The setgroups() function will fail if:
EINVAL The value of ngroups is greater than
{NGROUPS_MAX}.
On Jan 5, 2008 12:27 PM, Bill Cole dovecot-20061108@billmail.scconsult.com wrote:
At 11:53 AM -0800 1/5/08, Anil wrote:
I don't think I am hitting the NGROUPS_MAX, my limits.h shows it to be 16.
# groups root other bin sys adm uucp mail tty lp nuucp daemon
Thats less than 16.
I think the setgroups() used in Dovecot is failing because of this error:
EINVAL The value of gidsetsize is non-zero and less than the number of supplementary group IDs set for the calling process.
What does that mean?
Either:
- You are using some OS where the Standard C Library is badly broken by design.
- You are using Solaris (or some related OS) and have mis-read the man page where that quoted text exists, but explicitly DOES NOT describe setgroups().
--
Bill Cole bill@scconsult.com
On Sat, 2008-01-05 at 09:39 -0800, Anil wrote:
I am trying to debug some core dump problems. I should be able to run imap by itself right? How to fix?
# ./imap imap(root): Fatal: setgroups() failed: Too many extra groups
I am using latest nightly code.
participants (3)
-
Anil
-
Bill Cole
-
Timo Sirainen