Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dnsdist on s390x: check shard->respRing.size() > entriesPerShard * 0.95 has failed #6430

Closed
zeha opened this issue Apr 1, 2018 · 4 comments
Closed
Labels
Milestone

Comments

@zeha
Copy link
Collaborator

@zeha zeha commented Apr 1, 2018

  • Program: dnsdist 1.3.0
  • Issue type: Bug report

On Debian s390x, the tests fail with:

test-dnsdistrings_cc.cc(243): error: in "dnsdistrings_cc/test_Rings_Threaded": check shard->respRing.size() > entriesPerShard * 0.95 has failed [18924 <= 19000]

Havent looked myself what this means yet.

@zeha zeha added the dnsdist label Apr 1, 2018
@rgacogne
Copy link
Member

@rgacogne rgacogne commented Apr 3, 2018

It means that the shard distribution was not really uniform, probably because the contention was a lot worse than expected. I'll turn that into a warning since it only matters when the corresponding code has been altered.

@rgacogne rgacogne added this to the dnsdist-1.3.x milestone Apr 3, 2018
@zeha
Copy link
Collaborator Author

@zeha zeha commented Apr 3, 2018

i'll be testing this on the buildds:

diff --git a/pdns/dnsdistdist/test-dnsdistrings_cc.cc b/pdns/dnsdistdist/test-dnsdistrings_cc.cc
index c98016c72..8e76e0836 100644
--- a/pdns/dnsdistdist/test-dnsdistrings_cc.cc
+++ b/pdns/dnsdistdist/test-dnsdistrings_cc.cc
@@ -230,7 +230,10 @@ BOOST_AUTO_TEST_CASE(test_Rings_Threaded) {
   size_t totalResponses = 0;
   for (const auto& shard : rings.d_shards) {
     BOOST_CHECK_LE(shard->queryRing.size(), entriesPerShard);
-    BOOST_CHECK_GT(shard->queryRing.size(), entriesPerShard * 0.95);
+    // verify that the shard is not empty
+    BOOST_CHECK_GT(shard->queryRing.size(), (entriesPerShard * 0.5) + 1);
+    // this would be optimal
+    BOOST_WARN_GT(shard->queryRing.size(), entriesPerShard * 0.95);
     totalQueries += shard->queryRing.size();
     for (const auto& entry : shard->queryRing) {
       BOOST_CHECK_EQUAL(entry.name, qname);
@@ -240,7 +243,10 @@ BOOST_AUTO_TEST_CASE(test_Rings_Threaded) {
       BOOST_CHECK_EQUAL(entry.requestor.toStringWithPort(), requestor.toStringWithPort());
     }
     BOOST_CHECK_LE(shard->respRing.size(), entriesPerShard);
-    BOOST_CHECK_GT(shard->respRing.size(), entriesPerShard * 0.95);
+    // verify that the shard is not empty
+    BOOST_CHECK_GT(shard->queryRing.size(), (entriesPerShard * 0.5) + 1);
+    // this would be optimal
+    BOOST_WARN_GT(shard->respRing.size(), entriesPerShard * 0.95);
     totalResponses += shard->respRing.size();
     for (const auto& entry : shard->respRing) {
       BOOST_CHECK_EQUAL(entry.name, qname);
@zeha
Copy link
Collaborator Author

@zeha zeha commented Apr 3, 2018

Needs more on s390x, current diff:
master...zeha:dnsdist-shard-test

Not sure why this is only a problem on s390x.

@Habbie
Copy link
Member

@Habbie Habbie commented Apr 19, 2018

Not sure why this is only a problem on s390x.

I just saw it happen in Travis.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

3 participants