Bug #2838


.47 always kills git-http-backend

Added by sdaoden about 3 years ago. Updated about 3 years ago.

Target version:


i use .47 on ArchLinux edge and since the update git-http-backend is always killed with SIGTERM:

Nov  2 09:45:59 lighttpd[4751]: (mod_cgi.c.1031) CGI pid 6621 died with signal 15

I see in the source this is kill(2)ed if the.. cgi does not exit? ..but manually tried git just closes fine. It may not in the particular situation though. It may be a git issue, of course, but nothing like this on the git list?
Thanks for lighttpd and any hint, ciao.


Updated by gstrauss about 3 years ago

  • Category set to mod_cgi

lighttpd 1.4.46 and later is more efficient at cleaning up CGI processes after the CGI process closes stdout. If the close of stdout is caused by CGI process exit, then there should be no need to send SIGTERM from lighttpd to the CGI process. However, if the backend closes stdout (of the CGI process, then it should be prepared to receive a SIGTERM from lighttpd as lighttpd tries to ensure that the CGI exits.

Would you please share your lighttpd and git configs to make this easier to try to reproduce?


Updated by gstrauss about 3 years ago

  • Status changed from New to Patch Pending
  • Target version changed from 1.4.x to 1.4.48

Looks like the trace is a spurious warning due to a logic inversion in the condition which determines whether or not to issue trace (added in 9030cfae) This should restore the prior behavior of no trace:

--- a/src/mod_cgi.c
+++ b/src/mod_cgi.c
@@ -1027,7 +1027,7 @@ static handler_t cgi_waitpid_cb(server *srv, void *p_d, pid_t pid, int status) {
         else if (WIFSIGNALED(status)) {
             /* ignore SIGTERM if sent by cgi_connection_close() (NULL == hctx)*/
-            if (WTERMSIG(status) != SIGTERM || NULL == hctx) {
+            if (WTERMSIG(status) != SIGTERM || NULL != hctx) {
                 log_error_write(srv, __FILE__, __LINE__, "sdsd", "CGI pid", pid,
                                 "died with signal", WTERMSIG(status));


Updated by gstrauss about 3 years ago

  • Status changed from Patch Pending to Fixed
  • % Done changed from 0 to 100

Also available in: Atom