Jan,

On Wed, Jul 22, 2015 at 02:50:12PM +0200, Willy Tarreau wrote:
> It would be nice also if you were able to reproduce the issues with the
> smallest possible config (eg: just a backend and a server line or something
> like this). But I suspect that at some point we'll have to try to reproduce
> with your exact hostname at least to see if it does something abnormal in
> the code :-/

Thanks to the config you sent me offline, I could reproduce it and narrow
it down a such a simple config :

  backend b_media_http
    server r  www.master.haproxy.org:80 check
    server w  www.master.haproxy.org:80 check

The name's length is critical, the change of port or check changes the error,
but in all cases we are facing a memory corruption. I'm guessing it's related
to a +/-1 in a name length (typically a trailing zero overwriting the malloc
structure). As supposed it came with the DNS changes (the only ones affecting
that area). I could bisect it to this commit :

  commit a68ca96375b76389322af877c32a9c47b5b6a3e0
  Author: Baptiste Assmann <bed...@gmail.com>
  Date:   Tue Apr 14 01:15:08 2015 +0200

    MAJOR: server: add DNS-based server name resolution
    
    Relies on the DNS protocol freshly implemented in HAProxy.
    It performs a server IP addr resolution based on a server hostname.

The patch is not that small but is still readable so now I'm debugging.

Thanks for your detailed report!

Willy


Reply via email to