]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
debuginfod: Use MHD_USE_ITC in MHD_start_daemon flags
authorMark Wielaard <mark@klomp.org>
Sun, 24 Apr 2022 10:16:58 +0000 (12:16 +0200)
committerMark Wielaard <mark@klomp.org>
Sun, 24 Apr 2022 10:16:58 +0000 (12:16 +0200)
This prevents the "Server reached connection limit. Closing inbound
connection." issue we have been seeing in the
run-debuginfod-webapi-concurrency.sh testcase. From the manual:

    If the connection limit is reached, MHD’s behavior depends a bit
    on other options. If MHD_USE_ITC was given, MHD will stop
    accepting connections on the listen socket. This will cause the
    operating system to queue connections (up to the listen() limit)
    above the connection limit. Those connections will be held until
    MHD is done processing at least one of the active connections. If
    MHD_USE_ITC is not set, then MHD will continue to accept() and
    immediately close() these connections.

https://sourceware.org/bugzilla/show_bug.cgi?id=28708

Signed-off-by: Mark Wielaard <mark@klomp.org>
debuginfod/ChangeLog
debuginfod/debuginfod.cxx
tests/ChangeLog
tests/run-debuginfod-webapi-concurrency.sh

index d6f7b2822f258faa9d7fe9c996b032c46c5cade4..0f1bca6f25fe7e688f6d7a8fcff7cdf28d9b41b2 100644 (file)
@@ -1,3 +1,7 @@
+2022-04-24  Mark Wielaard  <mark@klomp.org>
+
+       * debuginfod.cxx (main): Add MHD_USE_ITC to MHD_start_daemon flags.
+
 2022-04-13  Aaron Merey  <amerey@redhat.com>
 
        * debuginfod-client.c (debuginfod_query_server):
index 9c0217f6d3cbd2d9c597a5c1610564bb56a3427f..adca820800774d40c023aeea3991b10ad0c0035a 100644 (file)
@@ -3910,6 +3910,9 @@ main (int argc, char *argv[])
                                      | MHD_USE_EPOLL
 #endif
                                      | MHD_USE_DUAL_STACK
+#if MHD_VERSION >= 0x00095200
+                                     | MHD_USE_ITC
+#endif
                                      | MHD_USE_DEBUG, /* report errors to stderr */
                                      http_port,
                                      NULL, NULL, /* default accept policy */
index 2286f53f5ad62b5c5db8b7f83e45d295e398aa66..44b8df885ab9800eca3d2f3235fac0f769a9d7e4 100644 (file)
@@ -1,3 +1,7 @@
+2022-04-24  Mark Wielaard  <mark@klomp.org>
+
+       * run-debuginfod-webapi-concurrency.sh: Fix PR number in xfail.
+
 2022-04-23  Mark Wielaard  <mark@klomp.org>
 
        * run-debuginfod-webapi-concurrency.sh: Lower parallel lookups.
index 4928f6d00381fa4dc44239d7dc7e364bbe95a277..47dcadcced7e87f05f1b54453c36a03463837de0 100755 (executable)
@@ -62,6 +62,8 @@ do
     PID1=0
 done
 
-xfail "grep Server.reached.connection vlog$PORT1" # PR18661
+# Note this xfail comes too late, the above wait_ready for
+# http_responses_transfer_bytes_count will have failed.
+xfail "grep Server.reached.connection vlog$PORT1" # PR28661
 
 exit 0