Hi Lukas,

On Thu, Aug 04, 2016 at 07:02:50PM +0200, Lukas Tribus wrote:
> > I'm wondering if anything changed recently in the way zlib does its
> > buffer management (ie: maybe they slightly inflated the buffers for
> > various maintenance and the current allocator now returns too small
> > ones).
> 
> But zlib 1.2.3 was released in 2005, and zlib 1.2.8 (the most recent
> release) is from 2013 [2]. In fact CentOS 6.7 (from your report) is based on
> old software releases, so it seems unlikely that this is a recent regression
> (if those 2 reports really are the same bug).

But we all know that enterprise distros tend to backport lots of stuff, so
if there's a fix for specific bug that introduces this behaviour it could
be in RH's zlib.

> > It may be very useful to build with libslz instead of building without
> > zlib. It would stress the exact same code paths in haproxy, you would
> > still get compression and we'd see if the issue can be reproduced.
> 
> While googling around I found another report [3], a similar/same crash in
> memcpy() while using zlib. Apparently switching to libslz fixed the issue
> for them.

Yes, it seems so. The article is very instructive by the way. Unfortunately
we don't know the root cause there. I trust zlib which is used everywhere,
but its use in haproxy is quite tricky, maybe sometimes we manage to upset
it, I don't know :-/

James, do you know if sometimes you may be running low on memory ? We could
imagine a failed memory allocation. Also, did you configure maxzlibmem in
your global section ? Just trying to spot what might be happening...

Regards,
Willy

Reply via email to