<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/haproxy.git, branch next</title>
<subtitle>github.com: haproxy/haproxy.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/haproxy.git/'/>
<entry>
<title>MINOR: debug: add a balance of alloc - free at the end of the memstats dump</title>
<updated>2022-12-01T06:09:57+00:00</updated>
<author>
<name>Willy Tarreau</name>
<email>w@1wt.eu</email>
</author>
<published>2022-11-30T16:16:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/haproxy.git/commit/?id=ed0c2c16c2f480fa22b9efd9f6327207f529e26d'/>
<id>ed0c2c16c2f480fa22b9efd9f6327207f529e26d</id>
<content type='text'>
When digging into suspected memory leaks, it's cumbersome to count the
number of allocations and free calls. Here we're adding a summary at the
end of the sum of allocs minus the sum of frees, excluding realloc since
we can't know how much it releases upon each call. This means that when
doing many realloc+free the count may be negative but in practice there
are very few reallocs so that's not a problem. Also the size/call is signed
and corresponds to the average size allocated (e.g. leaked) per call.

It seems to work reasonably well for now:

  &gt; debug dev memstats match buf
  quic_conn.c:2978       P_FREE  size:   1239547904  calls:     75656  size/call:  16384 buffer
  quic_conn.c:2960      P_ALLOC  size:   1239547904  calls:     75656  size/call:  16384 buffer
  mux_quic.c:393        P_ALLOC  size:   9112780800  calls:    556200  size/call:  16384 buffer
  mux_quic.c:383        P_ALLOC  size:  17783193600  calls:   1085400  size/call:  16384 buffer
  mux_quic.c:159         P_FREE  size:   8935833600  calls:    545400  size/call:  16384 buffer
  mux_quic.c:142         P_FREE  size:   9112780800  calls:    556200  size/call:  16384 buffer
  h3.c:776              P_ALLOC  size:   8935833600  calls:    545400  size/call:  16384 buffer
  quic_stream.c:166      P_FREE  size:    975241216  calls:     59524  size/call:  16384 buffer
  quic_stream.c:127      P_FREE  size:   7960592384  calls:    485876  size/call:  16384 buffer
  stream.c:772           P_FREE  size:      8798208  calls:       537  size/call:  16384 buffer
  stream.c:768           P_FREE  size:      2424832  calls:       148  size/call:  16384 buffer
  stream.c:751          P_ALLOC  size:   8852062208  calls:    540287  size/call:  16384 buffer
  stream.c:641           P_FREE  size:   8849162240  calls:    540110  size/call:  16384 buffer
  stream.c:640           P_FREE  size:   8847360000  calls:    540000  size/call:  16384 buffer
  channel.h:850         P_ALLOC  size:      2441216  calls:       149  size/call:  16384 buffer
  channel.h:850         P_ALLOC  size:      5914624  calls:       361  size/call:  16384 buffer
  dynbuf.c:55            P_FREE  size:        32768  calls:         2  size/call:  16384 buffer
  Total                 BALANCE  size:            0  calls:   5606906  size/call:      0 (excl. realloc)

Let's see how useful this becomes over time.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When digging into suspected memory leaks, it's cumbersome to count the
number of allocations and free calls. Here we're adding a summary at the
end of the sum of allocs minus the sum of frees, excluding realloc since
we can't know how much it releases upon each call. This means that when
doing many realloc+free the count may be negative but in practice there
are very few reallocs so that's not a problem. Also the size/call is signed
and corresponds to the average size allocated (e.g. leaked) per call.

It seems to work reasonably well for now:

  &gt; debug dev memstats match buf
  quic_conn.c:2978       P_FREE  size:   1239547904  calls:     75656  size/call:  16384 buffer
  quic_conn.c:2960      P_ALLOC  size:   1239547904  calls:     75656  size/call:  16384 buffer
  mux_quic.c:393        P_ALLOC  size:   9112780800  calls:    556200  size/call:  16384 buffer
  mux_quic.c:383        P_ALLOC  size:  17783193600  calls:   1085400  size/call:  16384 buffer
  mux_quic.c:159         P_FREE  size:   8935833600  calls:    545400  size/call:  16384 buffer
  mux_quic.c:142         P_FREE  size:   9112780800  calls:    556200  size/call:  16384 buffer
  h3.c:776              P_ALLOC  size:   8935833600  calls:    545400  size/call:  16384 buffer
  quic_stream.c:166      P_FREE  size:    975241216  calls:     59524  size/call:  16384 buffer
  quic_stream.c:127      P_FREE  size:   7960592384  calls:    485876  size/call:  16384 buffer
  stream.c:772           P_FREE  size:      8798208  calls:       537  size/call:  16384 buffer
  stream.c:768           P_FREE  size:      2424832  calls:       148  size/call:  16384 buffer
  stream.c:751          P_ALLOC  size:   8852062208  calls:    540287  size/call:  16384 buffer
  stream.c:641           P_FREE  size:   8849162240  calls:    540110  size/call:  16384 buffer
  stream.c:640           P_FREE  size:   8847360000  calls:    540000  size/call:  16384 buffer
  channel.h:850         P_ALLOC  size:      2441216  calls:       149  size/call:  16384 buffer
  channel.h:850         P_ALLOC  size:      5914624  calls:       361  size/call:  16384 buffer
  dynbuf.c:55            P_FREE  size:        32768  calls:         2  size/call:  16384 buffer
  Total                 BALANCE  size:            0  calls:   5606906  size/call:      0 (excl. realloc)

Let's see how useful this becomes over time.
</pre>
</div>
</content>
</entry>
<entry>
<title>MINOR: debug: support pool filtering on "debug dev memstats"</title>
<updated>2022-12-01T06:09:56+00:00</updated>
<author>
<name>Willy Tarreau</name>
<email>w@1wt.eu</email>
</author>
<published>2022-11-30T15:42:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/haproxy.git/commit/?id=7e3f1f2130b2381207753a37955046382a8125d7'/>
<id>7e3f1f2130b2381207753a37955046382a8125d7</id>
<content type='text'>
Sometimes when debugging it's convenient to be able to focus only on
certain pools. Just like we did for "show pools", let's add a filter
based on a prefix on "debug dev memstats match &lt;prefix&gt;".
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Sometimes when debugging it's convenient to be able to focus only on
certain pools. Just like we did for "show pools", let's add a filter
based on a prefix on "debug dev memstats match &lt;prefix&gt;".
</pre>
</div>
</content>
</entry>
<entry>
<title>MEDIUM: 51d: add support for 51Degrees V4 with Hash algorithm</title>
<updated>2022-12-01T06:09:11+00:00</updated>
<author>
<name>Dragan Dosen</name>
<email>ddosen@haproxy.com</email>
</author>
<published>2022-02-14T12:05:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/haproxy.git/commit/?id=154688fa48cd8e8e3d8c389bfba65e962a5ef257'/>
<id>154688fa48cd8e8e3d8c389bfba65e962a5ef257</id>
<content type='text'>
This patch also adds a set of new global options:

- 51degrees-use-performance-graph { on | off }
- 51degrees-use-predictive-graph { on | off }
- 51degrees-drift &lt;number&gt;
- 51degrees-difference &lt;number&gt;
- 51degrees-allow-unmatched { on | off }

To build using the latest 51Degrees V4 engine with Hash algorithm, set
USE_51DEGREES_V4=1.

Other supported build options are 51DEGREES_INC, 51DEGREES_LIB and
51DEGREES_SRC which needs to be set to the directory that contains
headers and C files. For example:

make TARGET=&lt;target&gt; USE_51DEGREES_V4=1 51DEGREES_SRC='51D_REPO_PATH'/src
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch also adds a set of new global options:

- 51degrees-use-performance-graph { on | off }
- 51degrees-use-predictive-graph { on | off }
- 51degrees-drift &lt;number&gt;
- 51degrees-difference &lt;number&gt;
- 51degrees-allow-unmatched { on | off }

To build using the latest 51Degrees V4 engine with Hash algorithm, set
USE_51DEGREES_V4=1.

Other supported build options are 51DEGREES_INC, 51DEGREES_LIB and
51DEGREES_SRC which needs to be set to the directory that contains
headers and C files. For example:

make TARGET=&lt;target&gt; USE_51DEGREES_V4=1 51DEGREES_SRC='51D_REPO_PATH'/src
</pre>
</div>
</content>
</entry>
<entry>
<title>SCRIPTS: run-regtests: add a version check</title>
<updated>2022-11-30T17:44:33+00:00</updated>
<author>
<name>Willy Tarreau</name>
<email>w@1wt.eu</email>
</author>
<published>2022-11-30T17:44:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/haproxy.git/commit/?id=9d5e11682cd48ba93195b9cd7797d22c9f518247'/>
<id>9d5e11682cd48ba93195b9cd7797d22c9f518247</id>
<content type='text'>
It happens from time to time while switching between branches and/or
updating after someone else's changes that regtests are run by accident
on the wrong binary, typically the one the tests were run on during
development and not with the latest adaptations. And obviously it's
when this happens that we break the CI. There are various causes to
this but they all come down to humans context-switching a lot, and
there's no real fix for this that doesn't add even more burden hence
increases the overhead. However we can help the human detect such
mistakes very easily.

This change here will compare the version of the haproxy binary to
the version of the tree, and will emit a warning in the regtest output
if they do not match, regardless of the outcome of the test. This is
sufficient in case of failures because these are quickly glanced over,
and is sufficient as well in case of accidental success because the
warning is the last message. E.g:

  ########################## Starting vtest ##########################
  Testing with haproxy version: 2.7-dev10-cfcdbc-38
  Warning: version does not match the current tree (2.7-dev10-111c78-39)
  0 tests failed, 0 tests skipped, 182 tests passed

This should not affect builds made out of a git tree because the version
is retrieved using "make version", or exactly the same way as it's passd
to the haproxy binary. We just need to know what "make" command to run,
so $MAKE is used primarily, falling back to "make" then to "gmake". In
case all of these fail, we just ignore the version check. This should be
sufficient to catch human mistakes without affecting the CI.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It happens from time to time while switching between branches and/or
updating after someone else's changes that regtests are run by accident
on the wrong binary, typically the one the tests were run on during
development and not with the latest adaptations. And obviously it's
when this happens that we break the CI. There are various causes to
this but they all come down to humans context-switching a lot, and
there's no real fix for this that doesn't add even more burden hence
increases the overhead. However we can help the human detect such
mistakes very easily.

This change here will compare the version of the haproxy binary to
the version of the tree, and will emit a warning in the regtest output
if they do not match, regardless of the outcome of the test. This is
sufficient in case of failures because these are quickly glanced over,
and is sufficient as well in case of accidental success because the
warning is the last message. E.g:

  ########################## Starting vtest ##########################
  Testing with haproxy version: 2.7-dev10-cfcdbc-38
  Warning: version does not match the current tree (2.7-dev10-111c78-39)
  0 tests failed, 0 tests skipped, 182 tests passed

This should not affect builds made out of a git tree because the version
is retrieved using "make version", or exactly the same way as it's passd
to the haproxy binary. We just need to know what "make" command to run,
so $MAKE is used primarily, falling back to "make" then to "gmake". In
case all of these fail, we just ignore the version check. This should be
sufficient to catch human mistakes without affecting the CI.
</pre>
</div>
</content>
</entry>
<entry>
<title>MINOR: debug: relax access restrictions on "debug dev hash" and "memstats"</title>
<updated>2022-11-30T16:58:00+00:00</updated>
<author>
<name>Willy Tarreau</name>
<email>w@1wt.eu</email>
</author>
<published>2022-11-30T16:51:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/haproxy.git/commit/?id=111c78329e89965115f014b043a9695dc9a0bebd'/>
<id>111c78329e89965115f014b043a9695dc9a0bebd</id>
<content type='text'>
These two have absolutely zero impact on the process and do not need to
be restricted to the expert mode. The first one calculates a string hash
that can be used by anyone when checking a dump; the second one may be
used by anyone tracking a memory leak, and is cumbersome to use due to
the "expert-mode on" that needs to be prepended. In addition this gives
bad habits to users and needlessly taints the process. So let's drop
this restriction for these two commands.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These two have absolutely zero impact on the process and do not need to
be restricted to the expert mode. The first one calculates a string hash
that can be used by anyone when checking a dump; the second one may be
used by anyone tracking a memory leak, and is cumbersome to use due to
the "expert-mode on" that needs to be prepended. In addition this gives
bad habits to users and needlessly taints the process. So let's drop
this restriction for these two commands.
</pre>
</div>
</content>
</entry>
<entry>
<title>CLEANUP: anon: clarify the help message on "debug dev hash"</title>
<updated>2022-11-30T16:58:00+00:00</updated>
<author>
<name>Willy Tarreau</name>
<email>w@1wt.eu</email>
</author>
<published>2022-11-30T16:47:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/haproxy.git/commit/?id=50dd7e95c8c9c20994d2d6b64c3ab25177aa095e'/>
<id>50dd7e95c8c9c20994d2d6b64c3ab25177aa095e</id>
<content type='text'>
This command is used to hash a section name using the current anon key,
it was brought in 2.7 by commit 54966dffd ("MINOR: anon: store the
anonymizing key in the CLI's appctx"). However the help message only
says "return msg hashed" which is misleading because if anon mode is
not enabled, it returns the string as-is. Let's just mention this
condition in the help message, and also fix the alphabetical ordering
and alignment on the line.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This command is used to hash a section name using the current anon key,
it was brought in 2.7 by commit 54966dffd ("MINOR: anon: store the
anonymizing key in the CLI's appctx"). However the help message only
says "return msg hashed" which is misleading because if anon mode is
not enabled, it returns the string as-is. Let's just mention this
condition in the help message, and also fix the alphabetical ordering
and alignment on the line.
</pre>
</div>
</content>
</entry>
<entry>
<title>BUILD: quic: allow build with USE_QUIC and USE_OPENSSL_WOLFSSL</title>
<updated>2022-11-30T16:38:27+00:00</updated>
<author>
<name>Stefan Eissing</name>
<email>stefan@eissing.org</email>
</author>
<published>2022-11-30T14:16:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/haproxy.git/commit/?id=b82296c10e9a0bf8021a977a939d1073110e15ef'/>
<id>b82296c10e9a0bf8021a977a939d1073110e15ef</id>
<content type='text'>
WolfSSL does not implement the TLS1_3_CK_AES_128_CCM_SHA256 cipher as
well as the SSL_ERROR_WANT_ASYNC, SSL_ERROR_WANT_ASYNC_JOB and
SSL_ERROR_WANT_CLIENT_HELLO_CB error codes.

This patch disables them for WolfSSL.

Signed-off-by: William Lallemand &lt;wlallemand@haproxy.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
WolfSSL does not implement the TLS1_3_CK_AES_128_CCM_SHA256 cipher as
well as the SSL_ERROR_WANT_ASYNC, SSL_ERROR_WANT_ASYNC_JOB and
SSL_ERROR_WANT_CLIENT_HELLO_CB error codes.

This patch disables them for WolfSSL.

Signed-off-by: William Lallemand &lt;wlallemand@haproxy.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>MINOR: debug: improve error handling on the memstats command parser</title>
<updated>2022-11-30T16:24:29+00:00</updated>
<author>
<name>Willy Tarreau</name>
<email>w@1wt.eu</email>
</author>
<published>2022-11-30T15:50:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/haproxy.git/commit/?id=334d091b759b74bc45ec2c84de4f1ee40b3ed6ec'/>
<id>334d091b759b74bc45ec2c84de4f1ee40b3ed6ec</id>
<content type='text'>
"debug dev memstats" supports various options but silently ignores the
unknown ones. Let's make sure it returns indications about what it
expects, as the help message is quite limited otherwise.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
"debug dev memstats" supports various options but silently ignores the
unknown ones. Let's make sure it returns indications about what it
expects, as the help message is quite limited otherwise.
</pre>
</div>
</content>
</entry>
<entry>
<title>MINOR: mux-h1: add the expire task and its expiration date in "show fd"</title>
<updated>2022-11-30T13:49:56+00:00</updated>
<author>
<name>Christopher Faulet</name>
<email>cfaulet@haproxy.com</email>
</author>
<published>2022-11-30T13:49:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/haproxy.git/commit/?id=38f61351c390f139c694e40d69ebdccf1fab3792'/>
<id>38f61351c390f139c694e40d69ebdccf1fab3792</id>
<content type='text'>
Just like for the H2 multiplexer, info about the H1 connection task is now
displayed in "show fd" output. The task pointer is displayed and, if not
null, its expiration date.

It may be useful to backport it.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Just like for the H2 multiplexer, info about the H1 connection task is now
displayed in "show fd" output. The task pointer is displayed and, if not
null, its expiration date.

It may be useful to backport it.
</pre>
</div>
</content>
</entry>
<entry>
<title>CLEANUP: assorted typo fixes in the code and comments</title>
<updated>2022-11-30T13:02:36+00:00</updated>
<author>
<name>Ilya Shipitsin</name>
<email>chipitsine@gmail.com</email>
</author>
<published>2022-11-30T11:22:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/haproxy.git/commit/?id=6f86eaae4f5c2a2e5a12e1d54b159b4c9e2ed013'/>
<id>6f86eaae4f5c2a2e5a12e1d54b159b4c9e2ed013</id>
<content type='text'>
This is 33rd iteration of typo fixes
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is 33rd iteration of typo fixes
</pre>
</div>
</content>
</entry>
</feed>
