Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Oct 2018 07:14:16 +0000 (UTC)
From:      Kurt Jaeger <pi@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r481788 - in head/www/squid: . files
Message-ID:  <201810110714.w9B7EGL2093287@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pi
Date: Thu Oct 11 07:14:16 2018
New Revision: 481788
URL: https://svnweb.freebsd.org/changeset/ports/481788

Log:
  www/squid: fix bug in 4.3, no connections are accepted after ECONNABORTED
  
  - without the fix, squid locks up every couple of hours, no longer
    accept(2)-ing new connections, and needs to be restarted.
  
  PR:		231950
  Submitted by:	Mark.Martinec@ijs.si
  Reviewed by:	Oleh Hushchenkov <gor@clogic.com.ua>
  Approved by:	Pavel Timofeev <timp87@gmail.com> (maintainer)
  Obtained from:	https://bugs.squid-cache.org/show_bug.cgi?id=4889

Added:
  head/www/squid/files/patch-src_comm_TcpAcceptor.cc   (contents, props changed)
Modified:
  head/www/squid/Makefile

Modified: head/www/squid/Makefile
==============================================================================
--- head/www/squid/Makefile	Thu Oct 11 06:56:56 2018	(r481787)
+++ head/www/squid/Makefile	Thu Oct 11 07:14:16 2018	(r481788)
@@ -2,6 +2,7 @@
 
 PORTNAME=	squid
 PORTVERSION=	4.3
+PORTREVISION=	1
 CATEGORIES=	www ipv6
 MASTER_SITES=	http://www.squid-cache.org/Versions/v4/ \
 		http://www2.us.squid-cache.org/Versions/v4/ \

Added: head/www/squid/files/patch-src_comm_TcpAcceptor.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/squid/files/patch-src_comm_TcpAcceptor.cc	Thu Oct 11 07:14:16 2018	(r481788)
@@ -0,0 +1,38 @@
+Bug 4889: No connections are accepted after ECONNABORTED
+
+Ignore ECONNABORTED errors when accepting connections. These "client
+decided not to wait for accept(2)" errors do not indicate a problem with
+the listening socket and should not lead to listening socket closure.
+
+Also polished errno checking code for non-ignored errors.
+
+Also documented a bug that prevents TcpAcceptor::acceptOne() from
+stopping to listen on non-ignored accept errors.
+
+Also documented ENFILE and EMFILE mishandling.
+
+--- src/comm/TcpAcceptor.cc.orig	2018-09-30 20:57:54.000000000 +0200
++++ src/comm/TcpAcceptor.cc	2018-10-10 18:10:05.897616000 +0200
+@@ -297,6 +297,7 @@
+         if (intendedForUserConnections())
+             logAcceptError(newConnDetails);
+         notify(flag, newConnDetails);
++        // XXX: Will not stop because doAccept() is not called asynchronously.
+         mustStop("Listener socket closed");
+         return;
+     }
+@@ -366,11 +367,12 @@
+ 
+         PROF_stop(comm_accept);
+ 
+-        if (ignoreErrno(errcode)) {
++        if (ignoreErrno(errcode) || errcode == ECONNABORTED) {
+             debugs(50, 5, status() << ": " << xstrerr(errcode));
+             return Comm::NOMESSAGE;
+-        } else if (ENFILE == errno || EMFILE == errno) {
++        } else if (errcode == ENFILE || errcode == EMFILE) {
+             debugs(50, 3, status() << ": " << xstrerr(errcode));
++            // XXX: These errors do not imply that we should stop listening.
+             return Comm::COMM_ERROR;
+         } else {
+             debugs(50, DBG_IMPORTANT, MYNAME << status() << ": " << xstrerr(errcode));



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201810110714.w9B7EGL2093287>