]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Log at verbose level when we couldn't write to the pipe 9211/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 10 Jun 2020 08:48:10 +0000 (10:48 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 10 Jun 2020 08:48:10 +0000 (10:48 +0200)
pdns/dnsdist.cc
pdns/dnsdistdist/doh.cc

index ebc9d88bc3d8e0ece7a9c703594c604a817f4d96..b7c3832b2613f86e2bc7ab1db75d046e80a8e9d1 100644 (file)
@@ -643,6 +643,10 @@ try {
             if (sent != sizeof(du)) {
               if (errno == EAGAIN || errno == EWOULDBLOCK) {
                 ++g_stats.dohResponsePipeFull;
+                vinfolog("Unable to pass a DoH response to the DoH worker thread because the pipe is full");
+              }
+              else {
+                vinfolog("Unable to pass a DoH response to the DoH worker thread because we couldn't write to the pipe: %s", stringerror());
               }
 
               /* at this point we have the only remaining pointer on this
index bc623435c89de8870ba66675ca9c4f79a36b914e..af80eb8d9b3db5f5a1cc410264db782e5da527b9 100644 (file)
@@ -246,6 +246,10 @@ void handleDOHTimeout(DOHUnit* oldDU)
   if (sent != sizeof(oldDU)) {
     if (errno == EAGAIN || errno == EWOULDBLOCK) {
       ++g_stats.dohResponsePipeFull;
+      vinfolog("Unable to pass a DoH timeout to the DoH worker thread because the pipe is full");
+    }
+    else {
+      vinfolog("Unable to pass a DoH timeout to the DoH worker thread because we couldn't write to the pipe: %s", stringerror());
     }
 
     oldDU->release();
@@ -464,6 +468,10 @@ static int processDOHQuery(DOHUnit* du)
       if (sent != sizeof(du)) {
         if (errno == EAGAIN || errno == EWOULDBLOCK) {
           ++g_stats.dohResponsePipeFull;
+          vinfolog("Unable to pass a DoH self-answered response to the DoH worker thread because the pipe is full");
+        }
+        else {
+          vinfolog("Unable to pass a DoH self-answered to the DoH worker thread because we couldn't write to the pipe: %s", stringerror());
         }
 
         du->release();
@@ -677,6 +685,10 @@ static void doh_dispatch_query(DOHServerConfig* dsc, h2o_handler_t* self, h2o_re
       if (sent != sizeof(ptr)) {
         if (errno == EAGAIN || errno == EWOULDBLOCK) {
           ++g_stats.dohQueryPipeFull;
+          vinfolog("Unable to pass a DoH query to the DoH worker thread because the pipe is full");
+        }
+        else {
+          vinfolog("Unable to pass a DoH query to the DoH worker thread because we couldn't write to the pipe: %s", stringerror());
         }
         ptr->release();
         ptr = nullptr;
@@ -1056,6 +1068,10 @@ static void dnsdistclient(int qsock)
         if (sent != sizeof(du)) {
           if (errno == EAGAIN || errno == EWOULDBLOCK) {
             ++g_stats.dohResponsePipeFull;
+            vinfolog("Unable to pass a DoH internal error to the DoH worker thread because the pipe is full");
+          }
+          else {
+            vinfolog("Unable to pass a DoH internal error to the DoH worker thread because we couldn't write to the pipe: %s", stringerror());
           }
 
           // XXX but now what - will h2o time this out for us?