From: Remi Gacogne Date: Wed, 10 Jun 2020 08:48:10 +0000 (+0200) Subject: dnsdist: Log at verbose level when we couldn't write to the pipe X-Git-Tag: dnsdist-1.5.0-rc3~8^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F9211%2Fhead;p=thirdparty%2Fpdns.git dnsdist: Log at verbose level when we couldn't write to the pipe --- diff --git a/pdns/dnsdist.cc b/pdns/dnsdist.cc index ebc9d88bc3..b7c3832b26 100644 --- a/pdns/dnsdist.cc +++ b/pdns/dnsdist.cc @@ -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 diff --git a/pdns/dnsdistdist/doh.cc b/pdns/dnsdistdist/doh.cc index bc623435c8..af80eb8d9b 100644 --- a/pdns/dnsdistdist/doh.cc +++ b/pdns/dnsdistdist/doh.cc @@ -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?