From owner-freebsd-apache@FreeBSD.ORG Tue Mar 19 15:48:30 2013 Return-Path: Delivered-To: apache@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id EC8968E3 for ; Tue, 19 Mar 2013 15:48:30 +0000 (UTC) (envelope-from ohauer@gmx.de) Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) by mx1.freebsd.org (Postfix) with ESMTP id 96743A1 for ; Tue, 19 Mar 2013 15:48:30 +0000 (UTC) Received: from mailout-de.gmx.net ([10.1.76.17]) by mrigmx.server.lan (mrigmx001) with ESMTP (Nemesis) id 0Mfl1O-1U5yCf0auq-00NBus for ; Tue, 19 Mar 2013 16:48:29 +0100 Received: (qmail invoked by alias); 19 Mar 2013 15:48:29 -0000 Received: from p578be941.dip0.t-ipconnect.de (EHLO [192.168.0.100]) [87.139.233.65] by mail.gmx.net (mp017) with SMTP; 19 Mar 2013 16:48:29 +0100 X-Authenticated: #1956535 X-Provags-ID: V01U2FsdGVkX1/ch+IR0Gzcr/3TirYAndvDsGCLSImiWR8A+QeU3r UMSwQ3PPh8Rdcs Message-ID: <514888FC.8080708@gmx.de> Date: Tue, 19 Mar 2013 16:49:16 +0100 From: olli hauer User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20130307 Thunderbird/17.0.4 MIME-Version: 1.0 To: apache@FreeBSD.org Subject: Re: Upgrade of mod_fastcgi References: <514348DE.9000701@devclic.fr> In-Reply-To: <514348DE.9000701@devclic.fr> X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 Cc: Lilian - Devclic X-BeenThere: freebsd-apache@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Support of apache-related ports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Mar 2013 15:48:31 -0000 Hi Lilian, It seems the fix is included in the last mod_fastcgi snap. Please can you test the following diff. Index: Makefile =================================================================== --- Makefile (revision 314644) +++ Makefile (working copy) @@ -2,10 +2,10 @@ # $FreeBSD$ PORTNAME= mod_fastcgi -PORTVERSION= 2.4.6 -PORTREVISION= 3 +PORTVERSION= 2.4.7 CATEGORIES= www MASTER_SITES= http://www.fastcgi.com/dist/ +DISTNAME= mod_fastcgi-SNAP-0910052141 MAINTAINER= apache@FreeBSD.org COMMENT= A fast-cgi module for Apache Index: distinfo =================================================================== --- distinfo (revision 314644) +++ distinfo (working copy) @@ -1,2 +1,2 @@ -SHA256 (mod_fastcgi-2.4.6.tar.gz) = a5a887eecc8fe13e4cb1cab4d140188a3d2b5e6f337f8a1cce88ca441ddbe689 -SIZE (mod_fastcgi-2.4.6.tar.gz) = 100230 +SHA256 (mod_fastcgi-SNAP-0910052141.tar.gz) = e6564ae206284806c781834e9e89aa4b0a4dd647b45c6da5cc389c65a984bdc7 +SIZE (mod_fastcgi-SNAP-0910052141.tar.gz) = 103255 -- Regards, olli On 2013-03-15 17:14, Lilian - Devclic wrote: > Hello, > > We had an issue with mod_fasctcgi. Some requests failed with no reason and these errors appears in the apache error log file : > > > [Fri Mar 15 15:38:57 2013] [error] [client 91.198.44.22] (4)Interrupted system call: FastCGI: comm with server "/usr/local/sbin/php-fpm" aborted: select() failed, referer: https://sql.devclic.fr/db_structure.php?token=b9b99b544a46d355583070251708d948&db=devclic_si > [Fri Mar 15 15:38:57 2013] [error] [client 91.198.44.22] FastCGI: incomplete headers (0 bytes) received from server "/usr/local/sbin/php-fpm", referer: https://sql.devclic.fr/db_structure.php?token=b9b99b544a46d355583070251708d948&db=devclic_si > > We had the same issue on Ubuntu and Debian system and we update the version to the latest 2.4.7. > > So, can you update the port to this version ? Or can you put this fix in the source code : > > http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=504132 > >> Index: libapache-mod-fastcgi-2.4.2/mod_fastcgi.c >> =================================================================== >> --- libapache-mod-fastcgi-2.4.2.orig/mod_fastcgi.c 2008-11-02 16:42:49.000000000 +0000 >> +++ libapache-mod-fastcgi-2.4.2/mod_fastcgi.c 2008-11-02 16:50:46.000000000 +0000 >> @@ -2178,12 +2178,15 @@ >> } >> >> /* wait on the socket */ >> - select_status = ap_select(nfds, &read_set, &write_set, NULL, &timeout); >> + /* Interrupted system calls do happen now and then, so retry on EINTR */ >> + do { >> + select_status = ap_select(nfds, &read_set, &write_set, NULL, &timeout); >> + } while (select_status < 0 && errno == EINTR); >> >> if (select_status < 0) >> { >> ap_log_rerror(FCGI_LOG_ERR_ERRNO, r, "FastCGI: comm with server " >> - "\"%s\" aborted: select() failed", fr->fs_path); >> + "\"%s\" aborted: select() failed: \"%s\"", fr->fs_path, strerror(errno)); >> state = STATE_ERROR; >> break; >> } >> @@ -2246,11 +2249,19 @@ >> } >> >> rv = fcgi_buf_socket_recv(fr->serverInputBuffer, fr->fd); >> + /* >> + * select(2) states: Under Linux, select() may report a socket >> + * file descriptor as "ready for reading", while nevertheless a >> + * subsequent read blocks. >> + * Act as if the FD was not set if socket_recv returns EAGAIN. >> + */ >> + if (rv < 0 && errno == EAGAIN) >> + break; >> >> if (rv < 0) >> { >> ap_log_rerror(FCGI_LOG_ERR, r, "FastCGI: comm with server " >> - "\"%s\" aborted: read failed", fr->fs_path); >> + "\"%s\" aborted: read failed: \"%s\"", fr->fs_path, strerror(errno)); >> state = STATE_ERROR; >> break; >> } > > We test it on a production server and at this moment no more problem. > Thanks a lot. > Best Regards. >