Hi all,

We're currently using haproxy in our project PacketFence (https://packetfence.org) and are currently experiencing an issue with haproxy segfaulting when TCP splicing is enabled.

We're currently running version 1.8.9 and are occasionally getting segfaults on this specific line in stream.c (line 2131): (objt_cs(si_b->end) && __objt_cs(si_b->end)->conn->xprt && __objt_cs(si_b->end)->conn->xprt->snd_pipe) &&

I wasn't too bright when I found it through gdb and forgot to copy the backtrace, so I'm hoping that the issue can be found with this limited information.

After commenting out the code for TCP splicing with the patch attached to the email, then the issue stopped happening.

Best Regards,

--
Julien Semaan
jsem...@inverse.ca   ::  +1 (866) 353-6153 *155  ::www.inverse.ca
Inverse inc. :: Leaders behind SOGo (www.sogo.nu) and PacketFence 
(www.packetfence.org)

diff -ruN haproxy-1.8.9.orig/src/stream.c haproxy-1.8.9/src/stream.c
--- haproxy-1.8.9.orig/src/stream.c	2018-05-18 09:10:29.000000000 -0400
+++ haproxy-1.8.9/src/stream.c	2018-07-20 13:06:41.861913134 -0400
@@ -2122,8 +2122,9 @@
 		if (s->txn)
 			s->txn->req.sov = s->txn->req.eoh + s->txn->req.eol - req->buf->o;
 	}
-
 	/* check if it is wise to enable kernel splicing to forward request data */
+  /* DON'T ENABLE TCP SPLICING AT ALL BECAUSE OF OCCASIONNAL SEGFAULTS WE'VE SEEN
+   * jsem...@inverse.ca
 	if (!(req->flags & (CF_KERN_SPLICING|CF_SHUTR)) &&
 	    req->to_forward &&
 	    (global.tune.options & GTUNE_USE_SPLICE) &&
@@ -2135,7 +2136,7 @@
 	      (req->flags & CF_STREAMER_FAST)))) {
 		req->flags |= CF_KERN_SPLICING;
 	}
-
+  */
 	/* reflect what the L7 analysers have seen last */
 	rqf_last = req->flags;
 
@@ -2306,6 +2307,8 @@
 	}
 
 	/* check if it is wise to enable kernel splicing to forward response data */
+  /* DON'T ENABLE TCP SPLICING AT ALL BECAUSE OF OCCASIONNAL SEGFAULTS WE'VE SEEN
+   * jsem...@inverse.ca
 	if (!(res->flags & (CF_KERN_SPLICING|CF_SHUTR)) &&
 	    res->to_forward &&
 	    (global.tune.options & GTUNE_USE_SPLICE) &&
@@ -2318,6 +2321,7 @@
 		res->flags |= CF_KERN_SPLICING;
 	}
 
+  */
 	/* reflect what the L7 analysers have seen last */
 	rpf_last = res->flags;
 

Reply via email to