Re: [PATCH] resolv: Disable TCP servers in tst-resolv-res_init-failure
"Andreas K. Huettel" <[email protected]>
| Newsgroups | gmane.comp.lib.glibc.alpha |
|---|---|
| Organization | Gentoo Linux |
| Message-ID | <[email protected]> |
Am Montag, 20. Juli 2026, 23:27:46 Japanische Normalzeit schrieben Sie:
> This avoids spurious xaccept errors on slow systems.
>
Well, I cannot confirm with certainty that this does what it's advertised to
do, but the code makes sense and looks correct to exclude the TCP path...
> ---
> resolv/tst-resolv-res_init-failure.c | 15 ++++++++++++++-
> 1 file changed, 14 insertions(+), 1 deletion(-)
>
> diff --git a/resolv/tst-resolv-res_init-failure.c b/resolv/tst-resolv-res_init-failure.c
> index d20348acf2..ae782c3f12 100644
> --- a/resolv/tst-resolv-res_init-failure.c
> +++ b/resolv/tst-resolv-res_init-failure.c
> @@ -66,7 +66,20 @@ static int
> do_test (void)
> {
> struct resolv_test *aux = resolv_test_start
> - ((struct resolv_redirect_config) { .response_callback = response });
> + ((struct resolv_redirect_config)
> + {
> + .response_callback = response,
> + /* Disable TCP servers. The kernel pre-allocates the client FD
> + in the accept system call, leading to accept failures if
> + setrlimit below completes before TCP accept setup on the TCP
> + DNS server threads. */
> + .servers =
> + {
> + { .disable_tcp = true, },
> + { .disable_tcp = true, },
> + { .disable_tcp = true, },
> + },
> + });
>
> /* Initial lookup. This drives __res_context_send through its init
> block, which allocates _u._ext.nsaddrs[] and sets
>
> base-commit: 249639137ed360d1827d9e663261ba26d2b01d81
>
>
--
PD Dr. Andreas K. Hüttel
[email protected]
Gentoo Linux developer
(council, comrel, toolchain, base-system, perl, libreoffice)
https://wiki.gentoo.org/wiki/User:Dilfridge
signature.asc
(application/pgp-signature, 870 B)
-----BEGIN PGP SIGNATURE----- iQJPBAABCAA5FiEE/Rnm0xsZLuTcY+rT3CsWIV7VQSoFAmpeOUUbFIAAAAAABAAO bWFudTIsMi41KzEuMTIsMiwyAAoJENwrFiFe1UEq0ucP/2aOklMzMSX7JwTDOsaw 7GPSmDknDFG3iMOGuPMUh0ps0GdAgJtjajesIDZ1NUZRRdwU5cEj8rt7+ACCc68B j+oprXTGOlf9O5wg/HpiWa/fugZFxd94l4yOzx5bRDBM3572JrIJqydp8UJXmt0u bVphJeLQRK19DseeWk5RZ3404NsFaUhJRJ58rd3PHTMkNMtBjjWOYIzfE9tZACl+ TrCvPQy8dzvKQDLhYamItk+35ve/bawM0vc1mqsuOl3TpvOJXm2KN9i8toV0Fk+G NcR8YWQPk67EJ9JteL998onIOtLHkxsVBB+y8qUOuB3HxQ8FMZWKDvjhffWv9emo UcxiBoUk1vaKEYxKj0W0h2TK/GIu/OBtQPDl/DYu1lAd9+8hWoWgGJTEhlqJmkTB swdqTFZkU4dPxyFrboex2FM3whHeVZP0P6dW3xUVa9LxUD625hr178zfXZ4Tkqe6 Sj9h7tSA1k/f4IU4goahC8iWqiseBueZWfkGwFT9H0uc4gicGPowv5GxNAg/4gWb YU0dEJU4gIyXVnu5P385asj2SYyjyaVyke9VeAJ+Ns8dGxG56we6NsLEdvSm0rzh QiVoyhCXJi42rsxDqeZpxtapDLn6+xY1F5SjhUMC5QbIxo75FcwP4/VrsRPdjbIj bBRBS0DhF3zp3LuonmepMSb8 =5c6l -----END PGP SIGNATURE-----