Bug 48045

Summary: Apache 2 initgroups alert, Max OS X, abnormal exit in error log
Product: Apache httpd-2 Reporter: scott
Component: AllAssignee: Apache HTTPD Bugs Mailing List <bugs>
Status: RESOLVED LATER    
Severity: normal Keywords: MassUpdate
Priority: P2    
Version: 2.2.13   
Target Milestone: ---   
Hardware: Macintosh   
OS: other   

Description scott 2009-10-23 20:14:27 UTC
I posted this to the Apache Users list, and bumped it with no additional replies.

The main trouble is this results in an exit of Apache, no sites will serve without a restart. This exit appers random, and can not be caused by any actions on my part.

This exit followed me from a base install, through the process of building up Apache to be used in a shared hosting environment.

Asking a few collegues to grep their logs shoes they too experience these issues but were not aware.

It appears this problem can be seen in the 1.x series as well, and also appers in my research, limited to OS X/BSD.

Apache 2 initgroups alert, Max OS X, abnormal exit in error log
$httpd -v
Server version: Apache/2.2.13 (Unix)

$grep '\[alert\]' error_log
[Thu Oct 08 16:23:24 2009] [alert] (22)Invalid argument: initgroups:
unable to set groups for User www and Group 70
[Thu Oct 08 16:23:24 2009] [alert] (22)Invalid argument: initgroups:
unable to set groups for User www and Group 70
[Thu Oct 08 16:23:24 2009] [alert] (22)Invalid argument: initgroups:
unable to set groups for User www and Group 70
[Thu Oct 08 16:23:24 2009] [alert] (22)Invalid argument: initgroups:
unable to set groups for User www and Group 70
[Thu Oct 08 16:23:24 2009] [alert] (22)Invalid argument: initgroups:
unable to set groups for User www and Group 70
[Thu Oct 08 16:23:25 2009] [alert] Child 13545 returned a Fatal
error... Apache is exiting!
[Thu Oct 08 17:29:48 2009] [alert] (36)Operation now in progress:
initgroups: unable to set groups for User www and Group 70
[Thu Oct 08 17:29:49 2009] [alert] Child 13782 returned a Fatal
error... Apache is exiting!

There is a little info on this, one which is in this list, but dates
back a year:
http://mail-archives.apache.org/mod_mbox/httpd-users/200810.mbox/%3C5249c07e0810091021s77d4f603y50c3fbb20cd4c181[at]mail.gmail.com%3E

There was no solution to that thread I could find.

Looking through a few changelogs, I see mention of initgroups, but I
am not versed in this enough to now if this was addressed, attempted
to be addressed, or was assumed to have been solved. I am not using
any LDAP as some googling will point to.

The only correlation I have, is I was playing with rotatelogs for the
first time. I removed the single pipe line for the error log
and issued apachectl graceful. That graceful was issued at Oct 8
16:23, but you can see, I had an exit afterward as well.

The pipe I added was put into a virtual host container, did make a log
after a graceful start, and followed the 300 second rotation schedule
I was testing. User was root and group was www.

My google searches on this seem to be mostly limited to Mac OS X, both
PPC and Intel, info is sparse.

More details below, but the meat of the exit issue is above.

This is a relatively new install, and was just put into production
after stable testing for a few weeks. I have not seen any other
unusual exits, but I am also staying away from rotatelogs for the time
being, though I am pretty sure that my end goals will need use of
rotatelogs.

I believe rotatelogs to be coincidental, as this has now appeared in my logs with no config changes for weeks.

I am running Mac OS X 10.5 on PPC.

Hardware Overview:
Model Name: Power Mac G5
Model Identifier: PowerMac7,2
Processor Name: PowerPC 970 (2.2)
Processor Speed: 2 GHz
Number Of CPUs: 2
L2 Cache (per CPU): 512 KB
Memory: 3.5 GB
Bus Speed: 1 GHz
Boot ROM Version: 5.1.4f0

I used MacPorts to install, which from what I can tell about the port install
description file, these are the configure args I used:

--prefix=/opt/local/apache2
--with-apr=/opt/local/bin/apr-1-config \
--with-apr-util=/opt/local/bin/apu-1-config \
--libdir=/opt/local/lib \
--with-expat=/opt/local \
--with-pcre=/opt/local \
--mandir=/opt/local/share/man \
--enable-mods-shared=all \
--enable-ssl \
--with-ssl=/opt/local \
--enable-cache \
--enable-disk_cache \
--enable-file_cache \
--enable-mem_cache \
--enable-deflate \
--enable-proxy \
--enable-proxy-connect \
--enable-proxy-http \
--enable-proxy-ftp

I've found log lines showing this issue from stock Apple builds on OS X Server and Client, as built by Apple.

I can not locate the OP's email address from the above tgread to follow up with him and see if he has resolution to this.

Deeper research into the code shows the call to initgroups where the exit happens. Comparing for -1, though I seem to recall a thread where this return was tested as -1 or otherwise, and the results were the same.

At this point, my lack of debugging understanding, and inability to be too agressive with a live server, as well as the sporadic and unrepeatable nature of this, lead me to post here.

I would love to work with someone to pin this down. I have plenty of access to test servers, assuming someone can show me how to repeat this exit code issue.

Thanks for a great server.
Comment 1 William A. Rowe Jr. 2018-11-07 21:08:53 UTC
Please help us to refine our list of open and current defects; this is a mass update of old and inactive Bugzilla reports which reflect user error, already resolved defects, and still-existing defects in httpd.

As repeatedly announced, the Apache HTTP Server Project has discontinued all development and patch review of the 2.2.x series of releases. The final release 2.2.34 was published in July 2017, and no further evaluation of bug reports or security risks will be considered or published for 2.2.x releases. All reports older than 2.4.x have been updated to status RESOLVED/LATER; no further action is expected unless the report still applies to a current version of httpd.

If your report represented a question or confusion about how to use an httpd feature, an unexpected server behavior, problems building or installing httpd, or working with an external component (a third party module, browser etc.) we ask you to start by bringing your question to the User Support and Discussion mailing list, see [https://httpd.apache.org/lists.html#http-users] for details. Include a link to this Bugzilla report for completeness with your question.

If your report was clearly a defect in httpd or a feature request, we ask that you retest using a modern httpd release (2.4.33 or later) released in the past year. If it can be reproduced, please reopen this bug and change the Version field above to the httpd version you have reconfirmed with.

Your help in identifying defects or enhancements still applicable to the current httpd server software release is greatly appreciated.