AdGuardHome icon indicating copy to clipboard operation
AdGuardHome copied to clipboard

Wsarecvfrom error

Open Rootax opened this issue 1 year ago • 3 comments

Prerequisites

Platform (OS and CPU architecture)

Windows, AMD64 (aka x86_64)

Installation

GitHub releases or script from README

Setup

On one machine

AdGuard Home version

0.107/0.108

Action

Hi,

On 2 windows server (2019) computer, Adguardhome stop processing request, randomly, until I restart the service. GUI is still available, and the process is still running. But It seems like dnsproxy is not listening on any interface anymore. nslookup to adguard home ends in timeout.

In the log file, I see that when it happens : [error] dnsproxy: reading from udp err="read udp 10.X.X.X:53: wsarecvfrom The connection has been broken due to keep-alive activity detecting a failure while the operation was in progress.

I tried multiple 0.107 and beta/edge 0.108 versions, same thing, evin if it seems to occurs less frequently with 107, maybe it's just luck.

I search the machines events log, nothing suspicious when it happens.

In that situation, adguard home is still listening and do resolution on the tcp port (but of course most client are just trying on udp).

Thx.

Expected result

Still listening on udp.

Actual result

Additional information and/or screenshots

Windows 2019 server.

Rootax avatar Aug 18 '25 06:08 Rootax

Hello! Could you please provide the AdGuard Home logs related to this issue?

sofvaskina avatar Jun 22 '26 11:06 sofvaskina

There is a current listener-resilience defect behind this symptom. In dnsproxy, the UDP packet loop handles any socket read error by logging it and breaking out of the loop. Nothing in that path restarts the listener, so a nonterminal Windows WSARecvFrom error can leave the UDP socket bound while no goroutine continues reading requests.

The smallest fix belongs in dnsproxy: classify terminal versus transient read errors, continue or rebuild the listener for recoverable failures, and retain a deterministic injected-read-error regression proving that a later UDP query is still served. Before choosing the exact Windows error classification, the maintainer-requested full log is still needed, including the numeric WSA error, surrounding shutdown/reconfiguration events, current version, and whether TCP DNS continues working while UDP is unresponsive.

Sil3ntVip3r avatar Aug 05 '26 01:08 Sil3ntVip3r

We haven't received a response from you. I'm closing this issue. If it becomes relevant to you at some point, you can create a new one or reopen this one.

sofvaskina avatar Aug 27 '26 13:08 sofvaskina