public inbox for libc-stable@sourceware.org
 help / color / mirror / Atom feed
* [2.32 COMMITTED] resolv: Serialize processing in resolv/tst-resolv-txnid-collision
@ 2020-11-10 16:02 Florian Weimer
  0 siblings, 0 replies; only message in thread
From: Florian Weimer @ 2020-11-10 16:02 UTC (permalink / raw)
  To: libc-stable

When switching name servers, response processing by two server
threads clobbers the global test state.  (There is still some
risk that this test is negatively impact by packet drops and
packet reordering, but this applies to many of the resolver tests
and is difficult to avoid.)

Fixes commit f1f00c072138af90ae6da180f260111f09afe7a3 ("resolv:
Handle transaction ID collisions in parallel queries (bug 26600)").

(cherry picked from commit b8b53b338f6da91e86d115a39da860cefac736ad)

---
 resolv/tst-resolv-txnid-collision.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/resolv/tst-resolv-txnid-collision.c b/resolv/tst-resolv-txnid-collision.c
index 611d37362f..189b76f126 100644
--- a/resolv/tst-resolv-txnid-collision.c
+++ b/resolv/tst-resolv-txnid-collision.c
@@ -309,6 +309,11 @@ do_test (void)
     ((struct resolv_redirect_config)
      {
        .response_callback = response,
+
+       /* The response callback use global state (the previous_*
+          variables), and query processing must therefore be
+          serialized.  */
+       .single_thread_udp = true,
      });
 
   for (int rcode = 0; rcode <= 5; ++rcode)

-- 
Red Hat GmbH, https://de.redhat.com/ , Registered seat: Grasbrunn,
Commercial register: Amtsgericht Muenchen, HRB 153243,
Managing Directors: Charles Cachera, Brian Klemm, Laurie Krebs, Michael O'Neill


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-11-10 16:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-10 16:02 [2.32 COMMITTED] resolv: Serialize processing in resolv/tst-resolv-txnid-collision Florian Weimer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).