You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2019/05/13 19:00:50 UTC

[Bug 63169] MPM event, stuck process after graceful: no (old gen)

https://bz.apache.org/bugzilla/show_bug.cgi?id=63169

--- Comment #5 from akhil.jaggarwal@gmail.com ---
I believe it is change introduced in 2.4.34 to run cleanups on exit in single
process mode:

http://svn.apache.org/viewvc/httpd/httpd/trunk/os/unix/unixd.c?view=diff&r1=1830743&r2=1830744&pathrev=1830744

httpd drops privileges to switch to a non-root user if the User directive is
defined in
httpd.conf. If httpd is required to started as root to bind to well known
ports, and if 
the User directive is defined in the conf, piped logs remain running as root
while http
d runs as a non-privileged user. This causes graceful restarts on receipt of a
SIGTERM to
fail, causing both httpd and the piped log processes to remain stuck and not
respond to
SIGTERMs.

A possible fix within apache would be to add code to drop privilges or any sub
processes
registered with the server (for e.g., the piped log processes) like it is done
for httpd. 

A workaround is to setuid the piped log processes to that of the User in
httpd.conf using 
something like ap_uname2id() so as to make the owner of the piped logs same as
the parent
httpd process.

Additionally, after making the setuid change in our piped log binaries, we've
seen core dumps
around free() in apr_pool_destroy when cleaning up the apr pool. I'm still
investigating
these but meanhile any help from the apache team would be well appreciated.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org