Welcome! Log In Create A New Profile

Advanced

Warning: do not use tune.bufsize until I fix it !

Posted by Willy Tarreau 
Willy Tarreau
Warning: do not use tune.bufsize until I fix it !
May 16, 2012 09:40AM
Hi,

in the traces Dmitry Sivachenko sent to me privately, I found that the
trash buffer was overflown by a rewriting of too large a request. The
reason is that the trash buffer is of size BUFSIZE while the buffer
size was increased in the global section using
tune.bufsize.

I thought we had fixed that issue long ago but it appears the problem is
still present both in 1.4.20 and 1.5-dev10. So please, be careful, don't
increase tune.bufsize beyond your default buffer size if you use reqrep
rules.

The default buffer size is 16384, unless you built haproxy with different
options in which case you'll find it in the output of "haproxy -vv" :

$ ./haproxy -vv
HA-Proxy version 1.4.20-3 2012/03/24
Copyright 2000-2012 Willy Tarreau <[email protected]>

Build options :
TARGET = linux24e
CPU = i586
CC = i586-flx-linux-gcc
CFLAGS = -O0 -g -fno-strict-aliasing -DBUFSIZE=8030 -DMAXREWRITE=1030
OPTIONS = USE_LINUX_SPLICE=1 USE_LINUX_TPROXY=1 USE_STATIC_PCRE=1

Default settings :
maxconn = 2000, bufsize = 8030, maxrewrite = 1030, maxpollevents = 200
^^^^^^^^^^^^^^
here

I'm checking where the patch for this issue has gone and am going to issue
a fixed version for 1.4 so that distro packagers can update their packages.

Sorry for the inconvenience,
Willy
Willy Tarreau
Re: Warning: do not use tune.bufsize until I fix it !
May 19, 2012 12:50AM
On Wed, May 16, 2012 at 09:35:36AM +0200, Willy Tarreau wrote:
> Hi,
>
> in the traces Dmitry Sivachenko sent to me privately, I found that the
> trash buffer was overflown by a rewriting of too large a request. The
> reason is that the trash buffer is of size BUFSIZE while the buffer
> size was increased in the global section using
> tune.bufsize.
>
> I thought we had fixed that issue long ago but it appears the problem is
> still present both in 1.4.20 and 1.5-dev10. So please, be careful, don't
> increase tune.bufsize beyond your default buffer size if you use reqrep
> rules.
>
> The default buffer size is 16384, unless you built haproxy with different
> options in which case you'll find it in the output of "haproxy -vv" :
>
> $ ./haproxy -vv
> HA-Proxy version 1.4.20-3 2012/03/24
> Copyright 2000-2012 Willy Tarreau <[email protected]>
>
> Build options :
> TARGET = linux24e
> CPU = i586
> CC = i586-flx-linux-gcc
> CFLAGS = -O0 -g -fno-strict-aliasing -DBUFSIZE=8030 -DMAXREWRITE=1030
> OPTIONS = USE_LINUX_SPLICE=1 USE_LINUX_TPROXY=1 USE_STATIC_PCRE=1
>
> Default settings :
> maxconn = 2000, bufsize = 8030, maxrewrite = 1030, maxpollevents = 200
> ^^^^^^^^^^^^^^
> here
>
> I'm checking where the patch for this issue has gone and am going to issue
> a fixed version for 1.4 so that distro packagers can update their packages.

I have merged the fix for this 1.5-dev (will appear in the snapshot in a few
hours) and am planning on issuing 1.4.21 with the fix this week-end after a
few tests.

Have a nice week-end,
Willy
Sorry, only registered users may post in this forum.

Click here to login