Hi, I recently upgraded the squid cache at work to OpenBSD 6.5 (and thus squid 4.6). After this, squid started locking up (and not accepting new connections) every few hours with the error below logged in cache.log:
oldAccept FD 17, [::] [ job1]: ignoring: (53) Software caused connection abort After digging a bit in the source code and reading about ECONNREFUSED and accept(), I came out with the patch below, which fixes the issue for me. The patch was done on 6.5, but the squid port is the same in -current for now. Does this look ok ? Index: Makefile =================================================================== RCS file: /cvs/ports/www/squid/Makefile,v retrieving revision 1.213 diff -u -r1.213 Makefile --- Makefile 20 Feb 2019 16:23:27 -0000 1.213 +++ Makefile 10 May 2019 09:07:33 -0000 @@ -10,6 +10,7 @@ PKGNAME-main= squid-$V PKGNAME-ldap= squid-ldap-$V PKGNAME-ntlm= squid-ntlm-$V +REVISION= 0 CATEGORIES= www Index: patches/patch-src_comm_TcpAcceptor_cc =================================================================== RCS file: patches/patch-src_comm_TcpAcceptor_cc diff -N patches/patch-src_comm_TcpAcceptor_cc --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-src_comm_TcpAcceptor_cc 10 May 2019 09:07:33 -0000 @@ -0,0 +1,16 @@ +$OpenBSD$ + +Patch for locksup observed when accept() returns ECONNABORTED + +--- src/comm/TcpAcceptor.cc.orig Tue Feb 19 03:46:22 2019 ++++ src/comm/TcpAcceptor.cc Fri May 10 11:01:05 2019 +@@ -369,6 +369,9 @@ + if (ignoreErrno(errcode)) { + debugs(50, 5, status() << ": " << xstrerr(errcode)); + return Comm::NOMESSAGE; ++ } else if (ECONNABORTED == errno) { ++ debugs(50, DBG_IMPORTANT, MYNAME << status() << ": ignoring: " << xstrerr(errcode)); ++ return Comm::NOMESSAGE; + } else if (ENFILE == errno || EMFILE == errno) { + debugs(50, 3, status() << ": " << xstrerr(errcode)); + return Comm::COMM_ERROR; -- Matthieu Herrb