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