Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package haproxy for openSUSE:Factory checked 
in at 2022-03-15 19:04:17
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/haproxy (Old)
 and      /work/SRC/openSUSE:Factory/.haproxy.new.25692 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "haproxy"

Tue Mar 15 19:04:17 2022 rev:114 rq:961725 version:2.5.5+git0.384c5c59a

Changes:
--------
--- /work/SRC/openSUSE:Factory/haproxy/haproxy.changes  2022-02-26 
17:02:35.375540731 +0100
+++ /work/SRC/openSUSE:Factory/.haproxy.new.25692/haproxy.changes       
2022-03-15 19:04:56.140948754 +0100
@@ -1,0 +2,45 @@
+Mon Mar 14 17:11:09 UTC 2022 - mrueck...@suse.de
+
+- Update to version 2.5.5+git0.384c5c59a:
+  * [RELEASE] Released version 2.5.5
+  * REGTESTS: fix the race conditions in be2hex.vtc
+  * BUG/MEDIUM: httpclient: must manipulate head, not first
+  * BUG/MINOR: httpclient: remove the UNUSED block when parsing headers
+  * BUG/MINOR: httpclient: consume partly the blocks when necessary
+  * CLEANUP: htx: remove unused co_htx_remove_blk()
+  * BUG/MEDIUM: httpclient: don't consume data before it was analyzed
+  * BUG/MINOR: session: fix theoretical risk of memleak in session_accept_fd()
+  * BUG/MAJOR: mux-pt: Always destroy the backend connection on detach
+  * DEBUG: stream: Fix stream trace message to print response buffer state
+  * DEBUG: stream: Add the missing descriptions for stream trace events
+  * BUG/MEDIUM: mcli: Properly handle errors and timeouts during reponse 
processing
+  * DEBUG: cache: Update underlying buffer when loading HTX message in cache 
applet
+  * BUG/MEDIUM: stream: Use the front analyzers for new listener-less streams
+  * BUG/MINOR: promex: Set conn-stream/channel EOI flags at the end of request
+  * BUG/MINOR: cache: Set conn-stream/channel EOI flags at the end of request
+  * BUG/MINOR: stats: Set conn-stream/channel EOI flags at the end of request
+  * BUG/MINOR: hlua: Set conn-stream/channel EOI flags at the end of request
+  * BUG/MINOR: httpclient: Set conn-stream/channel EOI flags at the end of 
request
+  * BUG/MINOR: cli: shows correct mode in "show sess"
+  * BUG/MINOR: add missing modes in proxy_mode_str()
+  * BUILD: fix recent build breakage of freebsd caused by kFreeBSD build fix
+  * BUILD: pools: fix backport of no-memory-trimming on non-linux OS
+  * MINOR: stats: Add dark mode support for socket rows
+  * MINOR: pools: add a new global option "no-memory-trimming"
+  * BUILD: fix kFreeBSD build.
+  * BUG/MEDIUM: pools: fix ha_free() on area in the process of being freed
+  * BUG/MINOR: pool: always align pool_heads to 64 bytes
+  * BUG/MEDIUM: httpclient/lua: infinite appctx loop with POST
+  * REGTESTS: fix the race conditions in secure_memcmp.vtc
+  * REGTESTS: fix the race conditions in normalize_uri.vtc
+  * BUG/MEDIUM: htx: Fix a possible null derefs in htx_xfer_blks()
+  * BUG/MEDIUM: mux-fcgi: Don't rely on SI src/dst addresses for FCGI 
health-checks
+  * BUILD: tree-wide: mark a few numeric constants as explicitly long long
+  * BUILD: atomic: make the old HA_ATOMIC_LOAD() support const pointers
+  * CI: Consistently use actions/checkout@v2
+  * CI: github actions: use cache for SSL libs
+  * CI: refactor OpenTracing build script
+  * CI: github actions: use cache for OpenTracing
+  * CI: github actions: add the output of $CC -dM -E-
+
+-------------------------------------------------------------------

Old:
----
  haproxy-2.5.4+git0.e55ab4208.tar.gz

New:
----
  haproxy-2.5.5+git0.384c5c59a.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ haproxy.spec ++++++
--- /var/tmp/diff_new_pack.DA3TG5/_old  2022-03-15 19:04:56.936949294 +0100
+++ /var/tmp/diff_new_pack.DA3TG5/_new  2022-03-15 19:04:56.940949297 +0100
@@ -55,7 +55,7 @@
 %endif
 
 Name:           haproxy
-Version:        2.5.4+git0.e55ab4208
+Version:        2.5.5+git0.384c5c59a
 Release:        0
 #
 #

++++++ _service ++++++
--- /var/tmp/diff_new_pack.DA3TG5/_old  2022-03-15 19:04:56.976949321 +0100
+++ /var/tmp/diff_new_pack.DA3TG5/_new  2022-03-15 19:04:56.980949324 +0100
@@ -6,7 +6,7 @@
     <param name="versionformat">@PARENT_TAG@+git@TAG_OFFSET@.%h</param>
     <param name="versionrewrite-pattern">v(.*)</param>
     <param name="versionrewrite-replacement">\1</param>
-    <param name="revision">v2.5.4</param>
+    <param name="revision">v2.5.5</param>
     <param name="changesgenerate">enable</param>
   </service>
 

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.DA3TG5/_old  2022-03-15 19:04:56.996949335 +0100
+++ /var/tmp/diff_new_pack.DA3TG5/_new  2022-03-15 19:04:57.000949338 +0100
@@ -1,7 +1,7 @@
 <servicedata>
   <service name="tar_scm">
     <param name="url">http://git.haproxy.org/git/haproxy-2.5.git</param>
-    <param 
name="changesrevision">e55ab42089ee38f5db1f1b3dd9d7072691b2a068</param>
+    <param 
name="changesrevision">384c5c59adcb5ba1e2ba8f4264b2df6239dd39ff</param>
   </service>
 </servicedata>
 (No newline at EOF)

++++++ haproxy-2.5.4+git0.e55ab4208.tar.gz -> 
haproxy-2.5.5+git0.384c5c59a.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/haproxy-2.5.4+git0.e55ab4208/.github/matrix.py 
new/haproxy-2.5.5+git0.384c5c59a/.github/matrix.py
--- old/haproxy-2.5.4+git0.e55ab4208/.github/matrix.py  2022-02-25 
17:10:16.000000000 +0100
+++ new/haproxy-2.5.5+git0.384c5c59a/.github/matrix.py  2022-03-14 
17:27:37.000000000 +0100
@@ -74,8 +74,8 @@
             "FLAGS": [
                 "USE_ZLIB=1",
                 "USE_OT=1",
-                "OT_INC=${HOME}/opt/include",
-                "OT_LIB=${HOME}/opt/lib",
+                "OT_INC=${HOME}/opt-ot/include",
+                "OT_LIB=${HOME}/opt-ot/lib",
                 "OT_RUNPATH=1",
                 "USE_PCRE=1",
                 "USE_PCRE_JIT=1",
@@ -150,8 +150,8 @@
         + [
             "USE_ZLIB=1",
             "USE_OT=1",
-            "OT_INC=${HOME}/opt/include",
-            "OT_LIB=${HOME}/opt/lib",
+            "OT_INC=${HOME}/opt-ot/include",
+            "OT_LIB=${HOME}/opt-ot/lib",
             "OT_RUNPATH=1",
             "USE_PCRE=1",
             "USE_PCRE_JIT=1",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/haproxy-2.5.4+git0.e55ab4208/.github/workflows/compliance.yml 
new/haproxy-2.5.5+git0.384c5c59a/.github/workflows/compliance.yml
--- old/haproxy-2.5.4+git0.e55ab4208/.github/workflows/compliance.yml   
2022-02-25 17:10:16.000000000 +0100
+++ new/haproxy-2.5.5+git0.384c5c59a/.github/workflows/compliance.yml   
2022-03-14 17:27:37.000000000 +0100
@@ -21,7 +21,7 @@
     env:
       H2SPEC_VERSION: '2.6.0'
     steps:
-    - uses: actions/checkout@v1
+    - uses: actions/checkout@v2
     - name: Install h2spec
       run: |
         curl -fsSL 
https://github.com/summerwind/h2spec/releases/download/v${H2SPEC_VERSION}/h2spec_linux_amd64.tar.gz
 -o h2spec.tar.gz
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/haproxy-2.5.4+git0.e55ab4208/.github/workflows/musl.yml 
new/haproxy-2.5.5+git0.384c5c59a/.github/workflows/musl.yml
--- old/haproxy-2.5.4+git0.e55ab4208/.github/workflows/musl.yml 2022-02-25 
17:10:16.000000000 +0100
+++ new/haproxy-2.5.5+git0.384c5c59a/.github/workflows/musl.yml 2022-03-14 
17:27:37.000000000 +0100
@@ -13,7 +13,7 @@
       container:
         image: alpine:latest
       steps:
-      - uses: actions/checkout@master
+      - uses: actions/checkout@v2
       - name: Install dependencies
         run: apk add gcc make tar git python3 libc-dev linux-headers pcre-dev 
pcre2-dev openssl-dev lua5.3-dev grep socat curl
       - name: Install VTest
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/haproxy-2.5.4+git0.e55ab4208/.github/workflows/openssl-nodeprecated.yml 
new/haproxy-2.5.5+git0.384c5c59a/.github/workflows/openssl-nodeprecated.yml
--- old/haproxy-2.5.4+git0.e55ab4208/.github/workflows/openssl-nodeprecated.yml 
2022-02-25 17:10:16.000000000 +0100
+++ new/haproxy-2.5.5+git0.384c5c59a/.github/workflows/openssl-nodeprecated.yml 
2022-03-14 17:27:37.000000000 +0100
@@ -21,7 +21,7 @@
   test:
     runs-on: ubuntu-latest
     steps:
-    - uses: actions/checkout@v1
+    - uses: actions/checkout@v2
     - name: Install VTest
       run: |
         scripts/build-vtest.sh
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/haproxy-2.5.4+git0.e55ab4208/.github/workflows/vtest.yml 
new/haproxy-2.5.5+git0.384c5c59a/.github/workflows/vtest.yml
--- old/haproxy-2.5.4+git0.e55ab4208/.github/workflows/vtest.yml        
2022-02-25 17:10:16.000000000 +0100
+++ new/haproxy-2.5.5+git0.384c5c59a/.github/workflows/vtest.yml        
2022-03-14 17:27:37.000000000 +0100
@@ -42,10 +42,34 @@
       TMPDIR: /tmp
       # Force ASAN output into asan.log to make the output more readable.
       ASAN_OPTIONS: log_path=asan.log
+      OT_CPP_VERSION: 1.6.0
     steps:
     - uses: actions/checkout@v2
       with:
         fetch-depth: 100
+#
+# Github Action cache key cannot contain comma, so we calculate it based on 
job name
+#
+    - name: Generate cache key
+      id: generate-cache-key
+      run: |
+        echo "::set-output name=key::$(echo ${{ matrix.name }} | sha256sum | 
awk '{print $1}')"
+
+    - name: Cache SSL libs
+      if: ${{ matrix.ssl && matrix.ssl != 'stock' && matrix.ssl != 
'BORINGSSL=yes' && matrix.ssl != 'QUICTLS=yes' }}
+      id: cache_ssl
+      uses: actions/cache@v2
+      with:
+        path: '~/opt/'
+        key: ssl-${{ steps.generate-cache-key.outputs.key }}
+
+    - name: Cache OpenTracing
+      if: ${{ contains(matrix.FLAGS, 'USE_OT=1') }}
+      id: cache_ot
+      uses: actions/cache@v2
+      with:
+        path: '~/opt-ot/'
+        key: ot-${{ matrix.CC }}-${{ env.OT_CPP_VERSION }}-${{ 
contains(matrix.name, 'ASAN') }}
     - name: Install apt dependencies
       if: ${{ startsWith(matrix.os, 'ubuntu-') }}
       run: |
@@ -65,16 +89,20 @@
       run: |
         scripts/build-vtest.sh
     - name: Install SSL ${{ matrix.ssl }}
-      if: ${{ matrix.ssl && matrix.ssl != 'stock' }}
+      if: ${{ matrix.ssl && matrix.ssl != 'stock' && 
steps.cache_ssl.outputs.cache-hit != 'true' }}
       run: env ${{ matrix.ssl }} scripts/build-ssl.sh
     - name: Install OpenTracing libs
-      if: ${{ contains(matrix.FLAGS, 'USE_OT=1') }}
-      run: scripts/build-ot.sh
+      if: ${{ contains(matrix.FLAGS, 'USE_OT=1') && 
steps.cache_ot.outputs.cache-hit != 'true'  }}
+      run: |
+        OT_PREFIX=${HOME}/opt-ot scripts/build-ot.sh
     - name: Build WURFL
       if: ${{ contains(matrix.FLAGS, 'USE_WURFL=1') }}
       run: make -C addons/wurfl/dummy
     - name: Compile HAProxy with ${{ matrix.CC }}
       run: |
+        echo "::group::Show platform specific defines"
+        echo | ${{ matrix.CC }} -dM -xc -E -
+        echo "::endgroup::"
         make -j$(nproc) all \
           ERR=1 \
           TARGET=${{ matrix.TARGET }} \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/haproxy-2.5.4+git0.e55ab4208/.github/workflows/windows.yml 
new/haproxy-2.5.5+git0.384c5c59a/.github/workflows/windows.yml
--- old/haproxy-2.5.4+git0.e55ab4208/.github/workflows/windows.yml      
2022-02-25 17:10:16.000000000 +0100
+++ new/haproxy-2.5.5+git0.384c5c59a/.github/workflows/windows.yml      
2022-03-14 17:27:37.000000000 +0100
@@ -51,6 +51,9 @@
           zlib-devel
     - name: Compile HAProxy with ${{ matrix.CC }}
       run: |
+        echo "::group::Show platform specific defines"
+        echo | ${{ matrix.CC }} -dM -xc -E -
+        echo "::endgroup::"
         make -j$(nproc) all \
           ERR=1 \
           TARGET=${{ matrix.TARGET }} \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/haproxy-2.5.4+git0.e55ab4208/CHANGELOG 
new/haproxy-2.5.5+git0.384c5c59a/CHANGELOG
--- old/haproxy-2.5.4+git0.e55ab4208/CHANGELOG  2022-02-25 17:10:16.000000000 
+0100
+++ new/haproxy-2.5.5+git0.384c5c59a/CHANGELOG  2022-03-14 17:27:37.000000000 
+0100
@@ -1,6 +1,47 @@
 ChangeLog :
 ===========
 
+2022/03/14 : 2.5.5
+    - CI: github actions: add the output of $CC -dM -E-
+    - CI: github actions: use cache for OpenTracing
+    - CI: refactor OpenTracing build script
+    - CI: github actions: use cache for SSL libs
+    - CI: Consistently use actions/checkout@v2
+    - BUILD: atomic: make the old HA_ATOMIC_LOAD() support const pointers
+    - BUILD: tree-wide: mark a few numeric constants as explicitly long long
+    - BUG/MEDIUM: mux-fcgi: Don't rely on SI src/dst addresses for FCGI 
health-checks
+    - BUG/MEDIUM: htx: Fix a possible null derefs in htx_xfer_blks()
+    - REGTESTS: fix the race conditions in normalize_uri.vtc
+    - REGTESTS: fix the race conditions in secure_memcmp.vtc
+    - BUG/MEDIUM: httpclient/lua: infinite appctx loop with POST
+    - BUG/MINOR: pool: always align pool_heads to 64 bytes
+    - BUG/MEDIUM: pools: fix ha_free() on area in the process of being freed
+    - BUILD: fix kFreeBSD build.
+    - MINOR: pools: add a new global option "no-memory-trimming"
+    - MINOR: stats: Add dark mode support for socket rows
+    - BUILD: pools: fix backport of no-memory-trimming on non-linux OS
+    - BUILD: fix recent build breakage of freebsd caused by kFreeBSD build fix
+    - BUG/MINOR: add missing modes in proxy_mode_str()
+    - BUG/MINOR: cli: shows correct mode in "show sess"
+    - BUG/MINOR: httpclient: Set conn-stream/channel EOI flags at the end of 
request
+    - BUG/MINOR: hlua: Set conn-stream/channel EOI flags at the end of request
+    - BUG/MINOR: stats: Set conn-stream/channel EOI flags at the end of request
+    - BUG/MINOR: cache: Set conn-stream/channel EOI flags at the end of request
+    - BUG/MINOR: promex: Set conn-stream/channel EOI flags at the end of 
request
+    - BUG/MEDIUM: stream: Use the front analyzers for new listener-less streams
+    - DEBUG: cache: Update underlying buffer when loading HTX message in cache 
applet
+    - BUG/MEDIUM: mcli: Properly handle errors and timeouts during reponse 
processing
+    - DEBUG: stream: Add the missing descriptions for stream trace events
+    - DEBUG: stream: Fix stream trace message to print response buffer state
+    - BUG/MAJOR: mux-pt: Always destroy the backend connection on detach
+    - BUG/MINOR: session: fix theoretical risk of memleak in 
session_accept_fd()
+    - BUG/MEDIUM: httpclient: don't consume data before it was analyzed
+    - CLEANUP: htx: remove unused co_htx_remove_blk()
+    - BUG/MINOR: httpclient: consume partly the blocks when necessary
+    - BUG/MINOR: httpclient: remove the UNUSED block when parsing headers
+    - BUG/MEDIUM: httpclient: must manipulate head, not first
+    - REGTESTS: fix the race conditions in be2hex.vtc
+
 2022/02/25 : 2.5.4
     - BUG/MEDIUM: htx: Be sure to have a buffer to perform a raw copy of a 
message
     - BUG/MEDIUM: mux-h1: Don't wake h1s if mux is blocked on lack of output 
buffer
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/haproxy-2.5.4+git0.e55ab4208/Makefile 
new/haproxy-2.5.5+git0.384c5c59a/Makefile
--- old/haproxy-2.5.4+git0.e55ab4208/Makefile   2022-02-25 17:10:16.000000000 
+0100
+++ new/haproxy-2.5.5+git0.384c5c59a/Makefile   2022-03-14 17:27:37.000000000 
+0100
@@ -154,8 +154,8 @@
 #### TARGET system
 # Use TARGET=<target_name> to optimize for a specific target OS among the
 # following list (use the default "generic" if uncertain) :
-#    linux-glibc, linux-glibc-legacy, linux-musl, solaris, freebsd, dragonfly,
-#    openbsd, netbsd, cygwin, haiku, aix51, aix52, aix72-gcc, osx, generic,
+#    linux-glibc, linux-glibc-legacy, linux-musl, solaris, freebsd, 
freebsd-glibc,
+#    dragonfly, openbsd, netbsd, cygwin, haiku, aix51, aix52, aix72-gcc, osx, 
generic,
 #    custom
 TARGET =
 
@@ -389,6 +389,13 @@
     USE_ACCEPT4 USE_CLOSEFROM USE_GETADDRINFO USE_PROCCTL)
 endif
 
+# kFreeBSD glibc
+ifeq ($(TARGET),freebsd-glibc)
+  set_target_defaults = $(call default_opts, \
+    USE_POLL USE_TPROXY USE_LIBCRYPT USE_THREAD USE_CPU_AFFINITY USE_KQUEUE   \
+    USE_ACCEPT4 USE_GETADDRINFO USE_CRYPT_H USE_DL)
+endif
+
 # DragonFlyBSD 4.3 and above
 ifeq ($(TARGET),dragonfly)
   set_target_defaults = $(call default_opts, \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/haproxy-2.5.4+git0.e55ab4208/VERDATE 
new/haproxy-2.5.5+git0.384c5c59a/VERDATE
--- old/haproxy-2.5.4+git0.e55ab4208/VERDATE    2022-02-25 17:10:16.000000000 
+0100
+++ new/haproxy-2.5.5+git0.384c5c59a/VERDATE    2022-03-14 17:27:37.000000000 
+0100
@@ -1,2 +1,2 @@
 $Format:%ci$
-2022/02/25
+2022/03/14
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/haproxy-2.5.4+git0.e55ab4208/VERSION 
new/haproxy-2.5.5+git0.384c5c59a/VERSION
--- old/haproxy-2.5.4+git0.e55ab4208/VERSION    2022-02-25 17:10:16.000000000 
+0100
+++ new/haproxy-2.5.5+git0.384c5c59a/VERSION    2022-03-14 17:27:37.000000000 
+0100
@@ -1 +1 @@
-2.5.4
+2.5.5
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/haproxy-2.5.4+git0.e55ab4208/addons/promex/service-prometheus.c 
new/haproxy-2.5.5+git0.384c5c59a/addons/promex/service-prometheus.c
--- old/haproxy-2.5.4+git0.e55ab4208/addons/promex/service-prometheus.c 
2022-02-25 17:10:16.000000000 +0100
+++ new/haproxy-2.5.5+git0.384c5c59a/addons/promex/service-prometheus.c 
2022-03-14 17:27:37.000000000 +0100
@@ -1511,6 +1511,7 @@
                case PROMEX_ST_DONE:
                        /* no more data are expected. Don't add TLR because 
mux-h1 will take care of it */
                        res_htx->flags |= HTX_FL_EOM;
+                       res->flags |= CF_EOI;
                        appctx->st0 = PROMEX_ST_END;
                        /* fall through */
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/haproxy-2.5.4+git0.e55ab4208/doc/configuration.txt 
new/haproxy-2.5.5+git0.384c5c59a/doc/configuration.txt
--- old/haproxy-2.5.4+git0.e55ab4208/doc/configuration.txt      2022-02-25 
17:10:16.000000000 +0100
+++ new/haproxy-2.5.5+git0.384c5c59a/doc/configuration.txt      2022-03-14 
17:27:37.000000000 +0100
@@ -4,7 +4,7 @@
                          ----------------------
                               version 2.5
                              willy tarreau
-                              2022/02/25
+                              2022/03/14
 
 
 This document covers the configuration language as implemented in the version
@@ -1070,6 +1070,7 @@
    - maxsslconn
    - maxsslrate
    - maxzlibmem
+   - no-memory-trimming
    - noepoll
    - nokqueue
    - noevports
@@ -2379,6 +2380,22 @@
   with "show info" on the line "MaxZlibMemUsage", the memory used by zlib is
   "ZlibMemUsage" in bytes.
 
+no-memory-trimming
+  Disables memory trimming ("malloc_trim") at a few moments where attempts are
+  made to reclaim lots of memory (on memory shortage or on reload). Trimming
+  memory forces the system's allocator to scan all unused areas and to release
+  them. This is generally seen as nice action to leave more available memory to
+  a new process while the old one is unlikely to make significant use of it.
+  But some systems dealing with tens to hundreds of thousands of concurrent
+  connections may experience a lot of memory fragmentation, that may render
+  this release operation extremely long. During this time, no more traffic
+  passes through the process, new connections are not accepted anymore, some
+  health checks may even fail, and the watchdog may even trigger and kill the
+  unresponsive process, leaving a huge core dump. If this ever happens, then it
+  is suggested to use this option to disable trimming and stop trying to be
+  nice with the new process. Note that advanced memory allocators usually do
+  not suffer from such a problem.
+
 noepoll
   Disables the use of the "epoll" event polling system on Linux. It is
   equivalent to the command-line argument "-de". The next polling system
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/haproxy-2.5.4+git0.e55ab4208/include/haproxy/atomic.h 
new/haproxy-2.5.5+git0.384c5c59a/include/haproxy/atomic.h
--- old/haproxy-2.5.4+git0.e55ab4208/include/haproxy/atomic.h   2022-02-25 
17:10:16.000000000 +0100
+++ new/haproxy-2.5.5+git0.384c5c59a/include/haproxy/atomic.h   2022-03-14 
17:27:37.000000000 +0100
@@ -194,13 +194,12 @@
 #if defined(__GNUC__) && (__GNUC__ < 4 || __GNUC__ == 4 && __GNUC_MINOR__ < 7) 
&& !defined(__clang__)
 /* gcc < 4.7 */
 
-#define HA_ATOMIC_LOAD(val)                                            \
-        ({                                                             \
-               typeof(*(val)) ret;                                     \
-               __sync_synchronize();                                   \
-               ret = *(volatile typeof(val))val;                       \
-               __sync_synchronize();                                   \
-               ret;                                                    \
+#define HA_ATOMIC_LOAD(val)                                                  \
+        ({                                                                   \
+               typeof(*(val)) ret =                                          \
+                   ({ __sync_synchronize(); *(volatile typeof(val))val; });  \
+               __sync_synchronize();                                         \
+               ret;                                                          \
        })
 
 #define HA_ATOMIC_STORE(val, new)                                      \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/haproxy-2.5.4+git0.e55ab4208/include/haproxy/channel.h 
new/haproxy-2.5.5+git0.384c5c59a/include/haproxy/channel.h
--- old/haproxy-2.5.4+git0.e55ab4208/include/haproxy/channel.h  2022-02-25 
17:10:16.000000000 +0100
+++ new/haproxy-2.5.5+git0.384c5c59a/include/haproxy/channel.h  2022-03-14 
17:27:37.000000000 +0100
@@ -999,19 +999,6 @@
        return *co_head(chn);
 }
 
-/* Remove a block <blk> in a <htx> structure which is used by a channel <chn>
- * Update the channel output according to the size of the block removed
- * Return the size of the removed block*/
-static inline int32_t co_htx_remove_blk(struct channel *chn, struct htx *htx, 
struct htx_blk *blk)
-{
-       int32_t size = htx_get_blksz(blk);
-
-       htx_remove_blk(htx, blk);
-       co_set_data(chn, co_data(chn) - size);
-
-       return size;
-}
-
 #endif /* _HAPROXY_CHANNEL_H */
 
 /*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/haproxy-2.5.4+git0.e55ab4208/include/haproxy/cpuset-t.h 
new/haproxy-2.5.5+git0.384c5c59a/include/haproxy/cpuset-t.h
--- old/haproxy-2.5.4+git0.e55ab4208/include/haproxy/cpuset-t.h 2022-02-25 
17:10:16.000000000 +0100
+++ new/haproxy-2.5.5+git0.384c5c59a/include/haproxy/cpuset-t.h 2022-03-14 
17:27:37.000000000 +0100
@@ -15,7 +15,8 @@
 
 #include <haproxy/api-t.h>
 
-#if defined(__linux__) || defined(__DragonFly__)
+#if defined(__linux__) || defined(__DragonFly__) || \
+  (defined(__FreeBSD_kernel__) && defined(__GLIBC__))
 
 # define CPUSET_REPR cpu_set_t
 # define CPUSET_USE_CPUSET
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/haproxy-2.5.4+git0.e55ab4208/include/haproxy/h1.h 
new/haproxy-2.5.5+git0.384c5c59a/include/haproxy/h1.h
--- old/haproxy-2.5.4+git0.e55ab4208/include/haproxy/h1.h       2022-02-25 
17:10:16.000000000 +0100
+++ new/haproxy-2.5.5+git0.384c5c59a/include/haproxy/h1.h       2022-03-14 
17:27:37.000000000 +0100
@@ -278,7 +278,7 @@
                if (unlikely(++ptr >= end))
                        ptr = b_orig(buf);
                chunk = (chunk << 4) + c;
-               if (unlikely(chunk & 0xF0000000000000)) {
+               if (unlikely(chunk & 0xF0000000000000ULL)) {
                        /* Don't get more than 13 hexa-digit (2^52 - 1) to 
never fed possibly
                         * bogus values from languages that use floats for 
their integers
                         */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/haproxy-2.5.4+git0.e55ab4208/include/haproxy/intops.h 
new/haproxy-2.5.5+git0.384c5c59a/include/haproxy/intops.h
--- old/haproxy-2.5.4+git0.e55ab4208/include/haproxy/intops.h   2022-02-25 
17:10:16.000000000 +0100
+++ new/haproxy-2.5.5+git0.384c5c59a/include/haproxy/intops.h   2022-03-14 
17:27:37.000000000 +0100
@@ -396,15 +396,15 @@
 static inline int __varint_bytes(uint64_t v)
 {
        switch (v) {
-       case 0x0000000000000000 ... 0x00000000000000ef: return 1;
-       case 0x00000000000000f0 ... 0x00000000000008ef: return 2;
-       case 0x00000000000008f0 ... 0x00000000000408ef: return 3;
-       case 0x00000000000408f0 ... 0x00000000020408ef: return 4;
-       case 0x00000000020408f0 ... 0x00000001020408ef: return 5;
-       case 0x00000001020408f0 ... 0x00000081020408ef: return 6;
-       case 0x00000081020408f0 ... 0x00004081020408ef: return 7;
-       case 0x00004081020408f0 ... 0x00204081020408ef: return 8;
-       case 0x00204081020408f0 ... 0x10204081020408ef: return 9;
+       case 0x0000000000000000ULL ... 0x00000000000000efULL: return 1;
+       case 0x00000000000000f0ULL ... 0x00000000000008efULL: return 2;
+       case 0x00000000000008f0ULL ... 0x00000000000408efULL: return 3;
+       case 0x00000000000408f0ULL ... 0x00000000020408efULL: return 4;
+       case 0x00000000020408f0ULL ... 0x00000001020408efULL: return 5;
+       case 0x00000001020408f0ULL ... 0x00000081020408efULL: return 6;
+       case 0x00000081020408f0ULL ... 0x00004081020408efULL: return 7;
+       case 0x00004081020408f0ULL ... 0x00204081020408efULL: return 8;
+       case 0x00204081020408f0ULL ... 0x10204081020408efULL: return 9;
        default: return 10;
        }
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/haproxy-2.5.4+git0.e55ab4208/include/haproxy/pool-t.h 
new/haproxy-2.5.5+git0.384c5c59a/include/haproxy/pool-t.h
--- old/haproxy-2.5.4+git0.e55ab4208/include/haproxy/pool-t.h   2022-02-25 
17:10:16.000000000 +0100
+++ new/haproxy-2.5.5+git0.384c5c59a/include/haproxy/pool-t.h   2022-03-14 
17:27:37.000000000 +0100
@@ -84,9 +84,10 @@
        unsigned int failed;    /* failed allocations */
        /* 32-bit hole here */
        struct list list;       /* list of all known pools */
+       void *base_addr;        /* allocation address, for free() */
        char name[12];          /* name of the pool */
 #ifdef CONFIG_HAP_POOLS
-       struct pool_cache_head cache[MAX_THREADS]; /* pool caches */
+       struct pool_cache_head cache[MAX_THREADS] THREAD_ALIGNED(64); /* pool 
caches */
 #endif
 } __attribute__((aligned(64)));
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/haproxy-2.5.4+git0.e55ab4208/reg-tests/converter/be2hex.vtc 
new/haproxy-2.5.5+git0.384c5c59a/reg-tests/converter/be2hex.vtc
--- old/haproxy-2.5.4+git0.e55ab4208/reg-tests/converter/be2hex.vtc     
2022-02-25 17:10:16.000000000 +0100
+++ new/haproxy-2.5.5+git0.384c5c59a/reg-tests/converter/be2hex.vtc     
2022-03-14 17:27:37.000000000 +0100
@@ -5,7 +5,7 @@
 
 server s1 {
        rxreq
-       txresp
+       txresp -hdr "Connection: close"
 } -repeat 3 -start
 
 haproxy h1 -conf {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/haproxy-2.5.4+git0.e55ab4208/reg-tests/converter/secure_memcmp.vtc 
new/haproxy-2.5.5+git0.384c5c59a/reg-tests/converter/secure_memcmp.vtc
--- old/haproxy-2.5.4+git0.e55ab4208/reg-tests/converter/secure_memcmp.vtc      
2022-02-25 17:10:16.000000000 +0100
+++ new/haproxy-2.5.5+git0.384c5c59a/reg-tests/converter/secure_memcmp.vtc      
2022-03-14 17:27:37.000000000 +0100
@@ -7,12 +7,12 @@
 
 server s1 {
        rxreq
-       txresp
+       txresp -hdr "Connection: close"
 } -repeat 4 -start
 
 server s2 {
        rxreq
-       txresp
+       txresp -hdr "Connection: close"
 } -repeat 7 -start
 
 haproxy h1 -conf {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/haproxy-2.5.4+git0.e55ab4208/reg-tests/http-rules/normalize_uri.vtc 
new/haproxy-2.5.5+git0.384c5c59a/reg-tests/http-rules/normalize_uri.vtc
--- old/haproxy-2.5.4+git0.e55ab4208/reg-tests/http-rules/normalize_uri.vtc     
2022-02-25 17:10:16.000000000 +0100
+++ new/haproxy-2.5.5+git0.384c5c59a/reg-tests/http-rules/normalize_uri.vtc     
2022-03-14 17:27:37.000000000 +0100
@@ -7,7 +7,7 @@
 
 server s1 {
     rxreq
-    txresp
+    txresp -hdr "connection: close"
 } -repeat 70 -start
 
 haproxy h1 -conf {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/haproxy-2.5.4+git0.e55ab4208/scripts/build-ot.sh 
new/haproxy-2.5.5+git0.384c5c59a/scripts/build-ot.sh
--- old/haproxy-2.5.4+git0.e55ab4208/scripts/build-ot.sh        2022-02-25 
17:10:16.000000000 +0100
+++ new/haproxy-2.5.5+git0.384c5c59a/scripts/build-ot.sh        2022-03-14 
17:27:37.000000000 +0100
@@ -6,29 +6,22 @@
 
 set -e
 
-export OT_CPP_VERSION=1.5.0
+OT_CPP_VERSION="${OT_CPP_VERSION:-1.6.0}"
+OT_PREFIX="${OT_PREFIX:-${HOME}/opt}"
 
-if [ ! -f "download-cache/v${OT_CPP_VERSION}.tar.gz" ]; then
-    wget -P download-cache/ \
-        
"https://github.com/opentracing/opentracing-cpp/archive/v${OT_CPP_VERSION}.tar.gz";
-fi
+wget -P download-cache/ 
"https://github.com/opentracing/opentracing-cpp/archive/v${OT_CPP_VERSION}.tar.gz";
 
-if [ "$(cat ${HOME}/opt/.ot-cpp-version)" != "${OT_CPP_VERSION}" ]; then
-    tar xf download-cache/v${OT_CPP_VERSION}.tar.gz
-    cd opentracing-cpp-${OT_CPP_VERSION}
-    mkdir build
-    cd build
-    cmake -DCMAKE_INSTALL_PREFIX=${HOME}/opt -DBUILD_STATIC_LIBS=OFF 
-DBUILD_MOCKTRACER=OFF -DBUILD_TESTING=OFF ..
-    make -j$(nproc)
-    make install
-    echo "${OT_CPP_VERSION}" > "${HOME}/opt/.ot-cpp-version"
-fi
+tar xf download-cache/v${OT_CPP_VERSION}.tar.gz
+cd opentracing-cpp-${OT_CPP_VERSION}
+mkdir build
+cd build
+cmake -DCMAKE_INSTALL_PREFIX=${OT_PREFIX} -DBUILD_STATIC_LIBS=OFF 
-DBUILD_MOCKTRACER=OFF -DBUILD_TESTING=OFF ..
+make -j$(nproc)
+make install
 
 git clone https://github.com/haproxytech/opentracing-c-wrapper.git
 cd opentracing-c-wrapper
  ./scripts/bootstrap
- ./configure --prefix=${HOME}/opt --with-opentracing=${HOME}/opt
+ ./configure --prefix=${OT_PREFIX} --with-opentracing=${OT_PREFIX}
  make -j$(nproc)
  make install
-
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/haproxy-2.5.4+git0.e55ab4208/src/cache.c 
new/haproxy-2.5.5+git0.384c5c59a/src/cache.c
--- old/haproxy-2.5.4+git0.e55ab4208/src/cache.c        2022-02-25 
17:10:16.000000000 +0100
+++ new/haproxy-2.5.5+git0.384c5c59a/src/cache.c        2022-03-14 
17:27:37.000000000 +0100
@@ -1437,7 +1437,7 @@
        unsigned int len;
        size_t ret, total = 0;
 
-       res_htx = htxbuf(&res->buf);
+       res_htx = htx_from_buf(&res->buf);
        total = res_htx->data;
 
        if (unlikely(si->state == SI_ST_DIS || si->state == SI_ST_CLO))
@@ -1500,6 +1500,7 @@
        if (appctx->st0 == HTX_CACHE_EOM) {
                 /* no more data are expected. */
                res_htx->flags |= HTX_FL_EOM;
+               res->flags |= CF_EOI;
                appctx->st0 = HTX_CACHE_END;
        }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/haproxy-2.5.4+git0.e55ab4208/src/cli.c 
new/haproxy-2.5.5+git0.384c5c59a/src/cli.c
--- old/haproxy-2.5.4+git0.e55ab4208/src/cli.c  2022-02-25 17:10:16.000000000 
+0100
+++ new/haproxy-2.5.5+git0.384c5c59a/src/cli.c  2022-03-14 17:27:37.000000000 
+0100
@@ -2538,7 +2538,8 @@
        struct proxy *fe = strm_fe(s);
        struct proxy *be = s->be;
 
-       if (rep->flags & CF_READ_ERROR) {
+       if ((rep->flags & 
(CF_READ_ERROR|CF_READ_TIMEOUT|CF_WRITE_ERROR|CF_WRITE_TIMEOUT)) ||
+           ((rep->flags & CF_SHUTW) && (rep->to_forward || co_data(rep)))) {
                pcli_reply_and_close(s, "Can't connect to the target CLI!\n");
                s->req.analysers &= ~AN_REQ_WAIT_CLI;
                s->res.analysers &= ~AN_RES_WAIT_CLI;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/haproxy-2.5.4+git0.e55ab4208/src/h1_htx.c 
new/haproxy-2.5.5+git0.384c5c59a/src/h1_htx.c
--- old/haproxy-2.5.4+git0.e55ab4208/src/h1_htx.c       2022-02-25 
17:10:16.000000000 +0100
+++ new/haproxy-2.5.5+git0.384c5c59a/src/h1_htx.c       2022-03-14 
17:27:37.000000000 +0100
@@ -642,7 +642,7 @@
                        /* Update current chunk size */
                        chksz = (chksz << 4) + c;
 
-                       if (unlikely(chksz & 0xF0000000000000)) {
+                       if (unlikely(chksz & 0xF0000000000000ULL)) {
                                /* Don't get more than 13 hexa-digit (2^52 - 1)
                                 * to never fed possibly bogus values from
                                 * languages that use floats for their integers
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/haproxy-2.5.4+git0.e55ab4208/src/hlua.c 
new/haproxy-2.5.5+git0.384c5c59a/src/hlua.c
--- old/haproxy-2.5.4+git0.e55ab4208/src/hlua.c 2022-02-25 17:10:16.000000000 
+0100
+++ new/haproxy-2.5.5+git0.384c5c59a/src/hlua.c 2022-03-14 17:27:37.000000000 
+0100
@@ -7256,6 +7256,8 @@
 
        hlua_hc = hlua_checkhttpclient(L, 1);
 
+       hlua_hc->sent = 0;
+
        hlua_hc->hc->req.url = istdup(ist(url_str));
        hlua_hc->hc->req.meth = meth;
 
@@ -9537,6 +9539,7 @@
 
                /* no more data are expected. Don't add TLR because mux-h1 will 
take care of it */
                res_htx->flags |= HTX_FL_EOM;
+               res->flags |= CF_EOI;
                strm->txn->status = ctx->ctx.hlua_apphttp.status;
                ctx->ctx.hlua_apphttp.flags |= APPLET_RSP_SENT;
        }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/haproxy-2.5.4+git0.e55ab4208/src/http_client.c 
new/haproxy-2.5.5+git0.384c5c59a/src/http_client.c
--- old/haproxy-2.5.4+git0.e55ab4208/src/http_client.c  2022-02-25 
17:10:16.000000000 +0100
+++ new/haproxy-2.5.5+git0.384c5c59a/src/http_client.c  2022-03-14 
17:27:37.000000000 +0100
@@ -22,6 +22,7 @@
 #include <haproxy/istbuf.h>
 #include <haproxy/h1_htx.h>
 #include <haproxy/http.h>
+#include <haproxy/http_ana-t.h>
 #include <haproxy/http_client.h>
 #include <haproxy/http_htx.h>
 #include <haproxy/htx.h>
@@ -591,11 +592,13 @@
        struct stream *s = si_strm(si);
        struct channel *req = &s->req;
        struct channel *res = &s->res;
+       struct http_msg *msg = &s->txn->rsp;
        struct htx_blk *blk = NULL;
        struct htx *htx;
        struct htx_sl *sl = NULL;
        int32_t pos;
        uint32_t hdr_num;
+       uint32_t sz;
        int ret;
 
 
@@ -667,8 +670,10 @@
                                                goto more;
 
                                        /* if the request contains the 
HTX_FL_EOM, we finished the request part. */
-                                       if (htx->flags & HTX_FL_EOM)
+                                       if (htx->flags & HTX_FL_EOM) {
+                                               req->flags |= CF_EOI;
                                                appctx->st0 = 
HTTPCLIENT_S_RES_STLINE;
+                                       }
 
                                        goto more; /* we need to leave the IO 
handler once we wrote the request */
                                }
@@ -676,12 +681,12 @@
 
                        case HTTPCLIENT_S_RES_STLINE:
                                /* copy the start line in the hc structure,then 
remove the htx block */
-                               if (!b_data(&res->buf))
+                               if (!co_data(res) || (msg->msg_state < 
HTTP_MSG_DATA))
                                        goto more;
                                htx = htxbuf(&res->buf);
                                if (!htx)
                                        goto more;
-                               blk = htx_get_first_blk(htx);
+                               blk = htx_get_head_blk(htx);
                                if (blk && (htx_get_blk_type(blk) == 
HTX_BLK_RES_SL))
                                        sl = htx_get_blk_ptr(htx, blk);
                                if (!sl || (!(sl->flags & HTX_SL_F_IS_RESP)))
@@ -691,7 +696,9 @@
                                hc->res.status = sl->info.res.status;
                                hc->res.vsn = istdup(htx_sl_res_vsn(sl));
                                hc->res.reason = istdup(htx_sl_res_reason(sl));
-                               co_htx_remove_blk(res, htx, blk);
+                               sz = htx_get_blksz(blk);
+                               co_set_data(res, co_data(res) - sz);
+                               htx_remove_blk(htx, blk);
                                /* caller callback */
                                if (hc->ops.res_stline)
                                        hc->ops.res_stline(hc);
@@ -713,7 +720,7 @@
                                {
                                        struct http_hdr 
hdrs[global.tune.max_http_hdr];
 
-                                       if (!b_data(&res->buf))
+                                       if (!co_data(res) || (msg->msg_state < 
HTTP_MSG_DATA))
                                                goto more;
                                        htx = htxbuf(&res->buf);
                                        if (!htx)
@@ -721,26 +728,34 @@
 
                                        hdr_num = 0;
 
-                                       for (pos = htx_get_first(htx);  pos != 
-1; pos = htx_get_next(htx, pos)) {
+                                       for (pos = htx_get_head(htx);  pos != 
-1; pos = htx_get_next(htx, pos)) {
                                                struct htx_blk *blk = 
htx_get_blk(htx, pos);
                                                enum htx_blk_type type = 
htx_get_blk_type(blk);
+                                               uint32_t sz = 
htx_get_blksz(blk);
+
+                                               if (type == HTX_BLK_UNUSED) {
+                                                       c_rew(res, sz);
+                                                       htx_remove_blk(htx, 
blk);
+                                               }
+
+                                               if (type == HTX_BLK_HDR) {
+                                                       hdrs[hdr_num].n = 
istdup(htx_get_blk_name(htx, blk));
+                                                       hdrs[hdr_num].v = 
istdup(htx_get_blk_value(htx, blk));
+                                                       if 
(!isttest(hdrs[hdr_num].v) || !isttest(hdrs[hdr_num].n))
+                                                               goto end;
+                                                       c_rew(res, sz);
+                                                       htx_remove_blk(htx, 
blk);
+                                                       hdr_num++;
+                                               }
 
+                                               /* create a NULL end of array 
and leave the loop */
                                                if (type == HTX_BLK_EOH) {
                                                        hdrs[hdr_num].n = 
IST_NULL;
                                                        hdrs[hdr_num].v = 
IST_NULL;
-                                                       co_htx_remove_blk(res, 
htx, blk);
+                                                       c_rew(res, sz);
+                                                       htx_remove_blk(htx, 
blk);
                                                        break;
                                                }
-
-                                               if (type != HTX_BLK_HDR)
-                                                       continue;
-
-                                               hdrs[hdr_num].n = 
istdup(htx_get_blk_name(htx, blk));
-                                               hdrs[hdr_num].v = 
istdup(htx_get_blk_value(htx, blk));
-                                               if (!isttest(hdrs[hdr_num].v) 
|| !isttest(hdrs[hdr_num].n))
-                                                       goto end;
-                                               co_htx_remove_blk(res, htx, 
blk);
-                                               hdr_num++;
                                        }
 
                                        if (hdr_num) {
@@ -770,6 +785,9 @@
                                 * The IO handler removes the htx blocks in the 
response buffer and
                                 * push them in the hc->res.buf buffer in a raw 
format.
                                 */
+                               if (!co_data(res) || (msg->msg_state < 
HTTP_MSG_DATA))
+                                       goto more;
+
                                htx = htxbuf(&res->buf);
                                if (!htx || htx_is_empty(htx))
                                        goto more;
@@ -781,31 +799,55 @@
                                        goto process_data;
 
                                /* decapsule the htx data to raw data */
-                               for (pos = htx_get_first(htx); pos != -1; pos = 
htx_get_next(htx, pos)) {
-                                       enum htx_blk_type type;
+                               for (pos = htx_get_head(htx); pos != -1; pos = 
htx_get_next(htx, pos)) {
+                                       struct htx_blk *blk = htx_get_blk(htx, 
pos);
+                                       enum htx_blk_type type = 
htx_get_blk_type(blk);
+                                       size_t count = co_data(res);
+                                       uint32_t blksz = htx_get_blksz(blk);
+                                       uint32_t room = b_room(&hc->res.buf);
+                                       uint32_t vlen;
+
+                                       /* we should try to copy the maximum 
output data in a block, which fit
+                                        * the destination buffer */
+                                       vlen = MIN(count, blksz);
+                                       vlen = MIN(vlen, room);
+
+                                       if (vlen == 0)
+                                               goto process_data;
 
-                                       blk = htx_get_blk(htx, pos);
-                                       type = htx_get_blk_type(blk);
                                        if (type == HTX_BLK_DATA) {
                                                struct ist v = 
htx_get_blk_value(htx, blk);
 
-                                               if ((b_room(&hc->res.buf) < 
v.len) )
-                                                       goto process_data;
+                                               __b_putblk(&hc->res.buf, v.ptr, 
vlen);
+                                               c_rew(res, vlen);
+
+                                               if (vlen == blksz)
+                                                       htx_remove_blk(htx, 
blk);
+                                               else
+                                                       htx_cut_data_blk(htx, 
blk, vlen);
 
-                                               __b_putblk(&hc->res.buf, v.ptr, 
v.len);
-                                               co_htx_remove_blk(res, htx, 
blk);
                                                /* the data must be processed 
by the caller in the receive phase */
                                                if (hc->ops.res_payload)
                                                        hc->ops.res_payload(hc);
+
+                                               /* cannot copy everything, need 
to processs */
+                                               if (vlen != blksz)
+                                                       goto process_data;
                                        } else {
+                                               if (vlen != blksz)
+                                                       goto process_data;
+
                                                /* remove any block which is 
not a data block */
-                                               co_htx_remove_blk(res, htx, 
blk);
+                                               c_rew(res, blksz);
+                                               htx_remove_blk(htx, blk);
                                        }
                                }
+
                                /* if not finished, should be called again */
-                               if (!(htx->flags & HTX_FL_EOM))
+                               if (!(htx_is_empty(htx) && (htx->flags & 
HTX_FL_EOM)))
                                        goto more;
 
+
                                /* end of message, we should quit */
                                appctx->st0 = HTTPCLIENT_S_RES_END;
                        break;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/haproxy-2.5.4+git0.e55ab4208/src/htx.c 
new/haproxy-2.5.5+git0.384c5c59a/src/htx.c
--- old/haproxy-2.5.4+git0.e55ab4208/src/htx.c  2022-02-25 17:10:16.000000000 
+0100
+++ new/haproxy-2.5.5+git0.384c5c59a/src/htx.c  2022-03-14 17:27:37.000000000 
+0100
@@ -336,7 +336,7 @@
        enum htx_blk_type type;
        uint32_t pos, addr, sz;
 
-       BUG_ON(htx->head == -1);
+       BUG_ON(!blk || htx->head == -1);
 
        /* This is the last block in use */
        if (htx->head == htx->tail) {
@@ -739,12 +739,14 @@
        }
 
        if (unlikely(dstref)) {
-               /* Headers or trailers part was partially xferred, so rollback 
the copy
-                * by removing all block between <dstref> and <dstblk>, both 
included.
+               /* Headers or trailers part was partially xferred, so rollback
+                * the copy by removing all block between <dstref> and <dstblk>,
+                * both included. <dstblk> may be NULL.
                 */
                while (dstref && dstref != dstblk)
                        dstref = htx_remove_blk(dst, dstref);
-               htx_remove_blk(dst, dstblk);
+               if (dstblk)
+                       htx_remove_blk(dst, dstblk);
 
                /* <dst> HTX message is empty, it means the headers or trailers
                 * part is too big to be copied at once.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/haproxy-2.5.4+git0.e55ab4208/src/mux_fcgi.c 
new/haproxy-2.5.5+git0.384c5c59a/src/mux_fcgi.c
--- old/haproxy-2.5.4+git0.e55ab4208/src/mux_fcgi.c     2022-02-25 
17:10:16.000000000 +0100
+++ new/haproxy-2.5.5+git0.384c5c59a/src/mux_fcgi.c     2022-03-14 
17:27:37.000000000 +0100
@@ -1229,8 +1229,8 @@
                                  struct fcgi_strm_params *params)
 {
        struct connection *cli_conn = objt_conn(fstrm->sess->origin);
-       const struct sockaddr_storage *src = 
si_src(si_opposite(fstrm->cs->data));
-       const struct sockaddr_storage *dst = 
si_dst(si_opposite(fstrm->cs->data));
+        const struct sockaddr_storage *src = (objt_check(fstrm->sess->origin) 
? conn_src(fconn->conn) : si_src(si_opposite(fstrm->cs->data)));
+        const struct sockaddr_storage *dst = (objt_check(fstrm->sess->origin) 
? conn_dst(fconn->conn) : si_dst(si_opposite(fstrm->cs->data)));
        struct ist p;
 
        if (!sl)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/haproxy-2.5.4+git0.e55ab4208/src/mux_pt.c 
new/haproxy-2.5.5+git0.384c5c59a/src/mux_pt.c
--- old/haproxy-2.5.4+git0.e55ab4208/src/mux_pt.c       2022-02-25 
17:10:16.000000000 +0100
+++ new/haproxy-2.5.5+git0.384c5c59a/src/mux_pt.c       2022-03-14 
17:27:37.000000000 +0100
@@ -420,7 +420,7 @@
        TRACE_ENTER(PT_EV_STRM_END, conn, cs);
 
        /* Subscribe, to know if we got disconnected */
-       if (conn->owner != NULL &&
+       if (!conn_is_back(conn) && conn->owner != NULL &&
            !(conn->flags & (CO_FL_ERROR | CO_FL_SOCK_RD_SH | 
CO_FL_SOCK_WR_SH))) {
                ctx->cs = NULL;
                conn->xprt->subscribe(conn, conn->xprt_ctx, SUB_RETRY_RECV, 
&ctx->wait_event);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/haproxy-2.5.4+git0.e55ab4208/src/pool.c 
new/haproxy-2.5.5+git0.384c5c59a/src/pool.c
--- old/haproxy-2.5.4+git0.e55ab4208/src/pool.c 2022-02-25 17:10:16.000000000 
+0100
+++ new/haproxy-2.5.5+git0.384c5c59a/src/pool.c 2022-03-14 17:27:37.000000000 
+0100
@@ -44,6 +44,7 @@
 
 #if defined(HA_HAVE_MALLOC_TRIM)
 static int using_libc_allocator = 0;
+static int disable_trim __read_mostly = 0;
 
 /* ask the allocator to trim memory pools.
  * This must run under thread isolation so that competing threads trying to
@@ -55,6 +56,9 @@
 {
        int isolated = thread_isolated();
 
+       if (disable_trim)
+               return;
+
        if (!isolated)
                thread_isolate();
 
@@ -175,11 +179,16 @@
        }
 
        if (!pool) {
-               if (!pool)
-                       pool = calloc(1, sizeof(*pool));
+               void *pool_addr;
 
-               if (!pool)
+               pool_addr = calloc(1, sizeof(*pool) + __alignof__(*pool));
+               if (!pool_addr)
                        return NULL;
+
+               /* always provide an aligned pool */
+               pool = (struct pool_head*)((((size_t)pool_addr) + 
__alignof__(*pool)) & -(size_t)__alignof__(*pool));
+               pool->base_addr = pool_addr; // keep it, it's the address to 
free later
+
                if (name)
                        strlcpy2(pool->name, name, sizeof(pool->name));
                pool->size = size;
@@ -518,7 +527,7 @@
                if (!pool->users) {
                        LIST_DELETE(&pool->list);
                        /* note that if used == 0, the cache is empty */
-                       free(pool);
+                       free(pool->base_addr);
                }
        }
        return NULL;
@@ -719,11 +728,27 @@
 }
 #endif
 
+#if defined(HA_HAVE_MALLOC_TRIM)
+/* config parser for global "no-memory-trimming" */
+static int mem_parse_global_no_mem_trim(char **args, int section_type, struct 
proxy *curpx,
+                                       const struct proxy *defpx, const char 
*file, int line,
+                                       char **err)
+{
+       if (too_many_args(0, args, err, NULL))
+               return -1;
+       disable_trim = 1;
+       return 0;
+}
+#endif
+
 /* register global config keywords */
 static struct cfg_kw_list mem_cfg_kws = {ILH, {
 #ifdef DEBUG_FAIL_ALLOC
        { CFG_GLOBAL, "tune.fail-alloc", mem_parse_global_fail_alloc },
 #endif
+#if defined(HA_HAVE_MALLOC_TRIM)
+       { CFG_GLOBAL, "no-memory-trimming", mem_parse_global_no_mem_trim },
+#endif
        { 0, NULL, NULL }
 }};
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/haproxy-2.5.4+git0.e55ab4208/src/proxy.c 
new/haproxy-2.5.5+git0.384c5c59a/src/proxy.c
--- old/haproxy-2.5.4+git0.e55ab4208/src/proxy.c        2022-02-25 
17:10:16.000000000 +0100
+++ new/haproxy-2.5.5+git0.384c5c59a/src/proxy.c        2022-03-14 
17:27:37.000000000 +0100
@@ -378,6 +378,10 @@
                return "http";
        else if (mode == PR_MODE_CLI)
                return "cli";
+       else if (mode == PR_MODE_SYSLOG)
+               return "syslog";
+       else if (mode == PR_MODE_PEERS)
+               return "peers";
        else
                return "unknown";
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/haproxy-2.5.4+git0.e55ab4208/src/session.c 
new/haproxy-2.5.5+git0.384c5c59a/src/session.c
--- old/haproxy-2.5.4+git0.e55ab4208/src/session.c      2022-02-25 
17:10:16.000000000 +0100
+++ new/haproxy-2.5.5+git0.384c5c59a/src/session.c      2022-03-14 
17:27:37.000000000 +0100
@@ -188,7 +188,7 @@
        }
        /* TCP rules may flag the connection as needing proxy protocol, now 
that it's done we can start ourxprt */
        if (conn_xprt_start(cli_conn) < 0)
-               goto out_free_conn;
+               goto out_free_sess;
 
        /* Adjust some socket options */
        if (l->rx.addr.ss_family == AF_INET || l->rx.addr.ss_family == 
AF_INET6) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/haproxy-2.5.4+git0.e55ab4208/src/stats.c 
new/haproxy-2.5.5+git0.384c5c59a/src/stats.c
--- old/haproxy-2.5.4+git0.e55ab4208/src/stats.c        2022-02-25 
17:10:16.000000000 +0100
+++ new/haproxy-2.5.5+git0.384c5c59a/src/stats.c        2022-03-14 
17:27:37.000000000 +0100
@@ -3331,6 +3331,7 @@
                      " .hr { border-color: #8c8273; }\n"
                      " .titre { background-color: #1aa6a6; color: #e8e6e3; }\n"
                      " .frontend {background: #2f3437;}\n"
+                     " .socket {background: #2a2d2f;}\n"
                      " .backend {background: #2f3437;}\n"
                      " .active_down {background: #760000;}\n"
                      " .active_going_up {background: #b99200;}\n"
@@ -4316,6 +4317,7 @@
        if (appctx->st0 == STAT_HTTP_DONE) {
                /* no more data are expected. Don't add TLR because mux-h1 will 
take care of it */
                res_htx->flags |= HTX_FL_EOM;
+               res->flags |= CF_EOI;
                appctx->st0 = STAT_HTTP_END;
        }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/haproxy-2.5.4+git0.e55ab4208/src/stream.c 
new/haproxy-2.5.5+git0.384c5c59a/src/stream.c
--- old/haproxy-2.5.4+git0.e55ab4208/src/stream.c       2022-02-25 
17:10:16.000000000 +0100
+++ new/haproxy-2.5.5+git0.384c5c59a/src/stream.c       2022-03-14 
17:27:37.000000000 +0100
@@ -99,6 +99,9 @@
 
        { .mask = STRM_EV_TCP_ANA,      .name = "tcp_ana",      .desc = "TCP 
analyzers" },
        { .mask = STRM_EV_TCP_ERR,      .name = "tcp_err",      .desc = "error 
during TCP analyzis" },
+
+       { .mask = STRM_EV_FLT_ANA,      .name = "flt_ana",      .desc = "Filter 
analyzers" },
+       { .mask = STRM_EV_FLT_ERR,      .name = "flt_err",      .desc = "error 
during filter analyzis" },
        {}
 };
 
@@ -247,8 +250,8 @@
                chunk_appendf(&trace_buf, " buf=(%u@%p+%u/%u, %u@%p+%u/%u)",
                              (unsigned int)b_data(&req->buf), 
b_orig(&req->buf),
                              (unsigned int)b_head_ofs(&req->buf), (unsigned 
int)b_size(&req->buf),
-                             (unsigned int)b_data(&req->buf), 
b_orig(&req->buf),
-                             (unsigned int)b_head_ofs(&req->buf), (unsigned 
int)b_size(&req->buf));
+                             (unsigned int)b_data(&res->buf), 
b_orig(&res->buf),
+                             (unsigned int)b_head_ofs(&res->buf), (unsigned 
int)b_size(&res->buf));
        }
 
        /* If msg defined, display htx info if defined (level > USER) */
@@ -504,7 +507,7 @@
 
        channel_init(&s->req);
        s->req.flags |= CF_READ_ATTACHED; /* the producer is already connected 
*/
-       s->req.analysers = sess->listener ? sess->listener->analysers : 0;
+       s->req.analysers = sess->listener ? sess->listener->analysers : 
sess->fe->fe_req_ana;
 
        if (IS_HTX_STRM(s)) {
                /* Be sure to have HTTP analysers because in case of
@@ -3174,7 +3177,7 @@
 
                chunk_appendf(&trash,
                             "  frontend=%s (id=%u mode=%s), listener=%s 
(id=%u)",
-                            strm_fe(strm)->id, strm_fe(strm)->uuid, 
strm_fe(strm)->mode ? "http" : "tcp",
+                            strm_fe(strm)->id, strm_fe(strm)->uuid, 
proxy_mode_str(strm_fe(strm)->mode),
                             strm_li(strm) ? strm_li(strm)->name ? 
strm_li(strm)->name : "?" : "?",
                             strm_li(strm) ? strm_li(strm)->luid : 0);
 
@@ -3197,7 +3200,7 @@
                        chunk_appendf(&trash,
                                     "  backend=%s (id=%u mode=%s)",
                                     strm->be->id,
-                                    strm->be->uuid, strm->be->mode ? "http" : 
"tcp");
+                                    strm->be->uuid, 
proxy_mode_str(strm->be->mode));
                else
                        chunk_appendf(&trash, "  backend=<NONE> (id=-1 
mode=-)");
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/haproxy-2.5.4+git0.e55ab4208/src/tools.c 
new/haproxy-2.5.5+git0.384c5c59a/src/tools.c
--- old/haproxy-2.5.4+git0.e55ab4208/src/tools.c        2022-02-25 
17:10:16.000000000 +0100
+++ new/haproxy-2.5.5+git0.384c5c59a/src/tools.c        2022-03-14 
17:27:37.000000000 +0100
@@ -43,7 +43,7 @@
 #include <netinet/in.h>
 #include <arpa/inet.h>
 
-#if defined(__GLIBC__) && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ 
>= 16))
+#if defined(__linux__) && defined(__GLIBC__) && (__GLIBC__ > 2 || (__GLIBC__ 
== 2 && __GLIBC_MINOR__ >= 16))
 #include <sys/auxv.h>
 #endif
 
@@ -4791,7 +4791,7 @@
 {
        const char *ret = NULL;
 
-#if defined(__GLIBC__) && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ 
>= 16))
+#if defined(__linux__) && defined(__GLIBC__) && (__GLIBC__ > 2 || (__GLIBC__ 
== 2 && __GLIBC_MINOR__ >= 16))
        long execfn = getauxval(AT_EXECFN);
 
        if (execfn && execfn != ENOENT)

Reply via email to