Project

General

Profile

Bug #2838

.47 always kills git-http-backend

Added by sdaoden 10 months ago. Updated 10 months ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
Category:
mod_cgi
Target version:
Start date:
2017-11-03
Due date:
% Done:

100%

Estimated time:
Missing in 1.5.x:

Description

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.

Associated revisions

Revision d6e184ac (diff)
Added by gstrauss 10 months ago

[mod_cgi] quiet trace if mod_cgi sends SIGTERM (fixes #2838)

(spurious trace began in lighttpd 1.4.46)

x-ref:
".47 always kills git-http-backend"
https://redmine.lighttpd.net/issues/2838

History

#1

Updated by gstrauss 10 months 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?

#2

Updated by gstrauss 10 months 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));
             }

#3

Updated by gstrauss 10 months ago

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

Also available in: Atom