Package: release.debian.org
Severity: normal
Tags: wheezy
User: [email protected]
Usertags: pu
X-Debbugs-CC: Luigi Gangitano <[email protected]>

Dear release team,

I intend to NMU squid3/3.1.20-2.2+deb7u1 to stable to fix #712754. The
bug is about squid3 occasionally dieing from an assertion failure. The
bug is hard to trigger and the only parameter that is known to have an
influence is load. After the main squid worker dies it is automatically
restarted by its supervisor process. Still this bug causes pages to be
truncated when squid crashes.

Please find the proposed .debdiff attached. I am running it on my
wheezy/amd64 server for testing and did not observe similar crashes or
regressions since switching to the patched package.

Can I go ahead an upload the fixed package?

Helmut
diff -Nru squid3-3.1.20/debian/changelog squid3-3.1.20/debian/changelog
--- squid3-3.1.20/debian/changelog      2013-02-23 15:07:26.000000000 +0100
+++ squid3-3.1.20/debian/changelog      2014-06-12 23:21:22.000000000 +0200
@@ -1,3 +1,11 @@
+squid3 (3.1.20-2.2+deb7u1) stable-proposed-updates; urgency=medium
+
+  * Non-maintainer upload.
+  * Add fix-712754-assertion-failure-commHandleRead.patch. Fix sporadic
+    assertion failure under high load. (Closes: #712754)
+
+ -- Helmut Grohne <[email protected]>  Thu, 12 Jun 2014 23:02:19 +0200
+
 squid3 (3.1.20-2.2) unstable; urgency=low
 
   * Non-maintainer upload.
diff -Nru 
squid3-3.1.20/debian/patches/fix-712754-assertion-failure-commHandleRead.patch 
squid3-3.1.20/debian/patches/fix-712754-assertion-failure-commHandleRead.patch
--- 
squid3-3.1.20/debian/patches/fix-712754-assertion-failure-commHandleRead.patch  
    1970-01-01 01:00:00.000000000 +0100
+++ 
squid3-3.1.20/debian/patches/fix-712754-assertion-failure-commHandleRead.patch  
    2014-06-12 22:59:34.000000000 +0200
@@ -0,0 +1,36 @@
+Description: fix assertion failure in commHandleRead
+Origin: upstream, http://bugs.squid-cache.org/attachment.cgi?id=2276
+Bug: http://bugs.squid-cache.org/show_bug.cgi?id=3048
+Bug-Debian: http://bugs.debian.org/712754
+Author: Alex Rousskov
+Last-Update: 2014-06-12
+Applied-Upstream: yes
+
+Fix for comm.cc:322 "commio_has_callback(fd, IOCB_READ, ccb)" assertion
+may also be applicable to a similar IOCB_WITE assertion.
+
+When we start closing a descriptor, we call commio_finish_callback() to remove
+I/O callbacks. If this is not done from commHandleRead or commHandleWrite,
+then select(2) structures may still have our descriptor registration and will
+call Comm back to read or write before the descriptor is closed for good. This
+will trigger a commio_has_callback() assertion.
+
+=== modified file 'src/comm.cc'
+--- a/src/comm.cc      2010-05-06 05:01:14 +0000
++++ b/src/comm.cc      2010-05-09 21:32:23 +0000
+@@ -1635,11 +1635,13 @@
+         commStopHalfClosedMonitor(fd);
+     commSetTimeout(fd, -1, NULL, NULL);
+ 
+-    // notify read/write handlers
++    // notify read/write handlers after canceling select reservations, if any
+     if (commio_has_callback(fd, IOCB_WRITE, COMMIO_FD_WRITECB(fd))) {
++        commSetSelect(fd, COMM_SELECT_WRITE, NULL, NULL, 0);
+         commio_finish_callback(fd, COMMIO_FD_WRITECB(fd), COMM_ERR_CLOSING, 
errno);
+     }
+     if (commio_has_callback(fd, IOCB_READ, COMMIO_FD_READCB(fd))) {
++        commSetSelect(fd, COMM_SELECT_READ, NULL, NULL, 0);
+         commio_finish_callback(fd, COMMIO_FD_READCB(fd), COMM_ERR_CLOSING, 
errno);
+     }
+ 
+
diff -Nru squid3-3.1.20/debian/patches/series 
squid3-3.1.20/debian/patches/series
--- squid3-3.1.20/debian/patches/series 2013-02-23 15:07:26.000000000 +0100
+++ squid3-3.1.20/debian/patches/series 2014-06-12 22:56:57.000000000 +0200
@@ -4,3 +4,4 @@
 20-ipv6-fix
 30-CVE-2012-5643-CVE-2013-0189.patch
 fix-701123-regression-in-cachemgr.patch
+fix-712754-assertion-failure-commHandleRead.patch

Reply via email to