AdGuardHome icon indicating copy to clipboard operation
AdGuardHome copied to clipboard

100% CPU load

Open SCP-155 opened this issue 4 years ago • 16 comments

Prerequisites

Please answer the following questions for yourself before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.

  • [X] I am running the latest version
  • [X] I checked the documentation and found no answer
  • [X] I checked to make sure that this issue has not already been filed

Issue Details

  • Version of AdGuard Home server:
    • v0.107.1
  • How did you install AdGuard Home:
    • GitHub releases
  • How did you setup DNS configuration:
    • DoT Resolver with static IPv4 & IPv6 on vServer
  • If it's a router or IoT, please write device model:
  • CPU architecture:
    • AMD64
  • Operating system and version:
    • Ubuntu 20.04.3 LTS

Expected Behavior

Not utilizing 100% CPU power from .../AdGuardHome -s run process.

Actual Behavior

AdGuardHome process is constantly using 100% CPU power (in my case 200% because the VM has 2 Cores). After manually restarting the process (./AdGuardHome -s restart) its using normal resources. After ~60 seconds its jumping back to 100% CPU load. RAM usage seems normal.

Screenshots

Screenshot:

cpu-usage

Additional Information

Problem only occurred after updating to v0.107.1 Please let me know if I can post any further information like logs, etc.

Edit: Restarting the whole Server does not help. CPU usage jumps to full utilization again.

SCP-155 avatar Dec 29 '21 18:12 SCP-155

Hello and thank you for your report! Can you please enable verbose logs and either attach them here or send them to [email protected]? There's been a few reports about that recently, and we're already investigating.

ainar-g avatar Dec 29 '21 18:12 ainar-g

Here is the log. Containing the start of AdGuardHome and a spike to 100% CPU usage after a few seconds. log.txt

SCP-155 avatar Dec 29 '21 18:12 SCP-155

I have the same issue on (x64 architecture) :

  • Ubuntu 20.04.3 LTS
  • Windows Server 2016

All seems to be OK on Raspberry (Pi 4B & Pi Zero W).

CordoWEB avatar Dec 29 '21 18:12 CordoWEB

Exact same issue started today for me after upgrading to v0.108.0-a.20+380cff07 arm64 version on Edge Channel.

OpenWRT 21.02.1 running on Raspberry Pi 4B. Investigation with htop indicates that AdGuardHome is using nearly 100% of CPU on all four cores.

Edit: As others have mentioned, rebooting or restarting the AGH service does not fix the issue. CPU utilization spikes to around 100% again after several minutes.

trenchcoatjedi avatar Dec 29 '21 19:12 trenchcoatjedi

@SCP-155, @CordoWEB, @trenchcoatjedi, @tuday2, we were able to reproduce the issue and posted a fix to the edge channel. Direct link to the edge Linux build for the AMD64 arch:

https://static.adguard.com/adguardhome/edge/AdGuardHome_linux_amd64.tar.gz

Could any of you please verify that the fix works for you? If so, we'll release v0.107.2 in an hour or so.

ainar-g avatar Dec 29 '21 19:12 ainar-g

@ainar-g

EDIT: Of course it didn't work for me. I'm not using AMD64 architecture and therefore can't test this. Will test an ARM64 version if you post a link.

trenchcoatjedi avatar Dec 29 '21 19:12 trenchcoatjedi

@trenchcoatjedi, that was a link for an AMD64 binary. Links to all edge builds are in the README. Here's a direct one for 64-bit ARM:

https://static.adguard.com/adguardhome/edge/AdGuardHome_linux_arm64.tar.gz

ainar-g avatar Dec 29 '21 19:12 ainar-g

Now running v0.108.0-a.23+a0bb5ce8 on AMD64. Seems to be fixed now. At least in the short period of time watching it. Will have my eyes on it for longer. But no issues so far.

SCP-155 avatar Dec 29 '21 19:12 SCP-155

No log, but same issue here after the update (v0.107.1)

Tinuz97 avatar Dec 29 '21 19:12 Tinuz97

same

t3dium avatar Dec 29 '21 19:12 t3dium

Update for me after 20 minutes: Still no issues. Tried restarting the service after 20 minutes just to play around with it. Still no issues. Looks like its fixed for me. Thanks for the blazing fast support!

SCP-155 avatar Dec 29 '21 20:12 SCP-155

Fixed with the new update v0.107.2 here also, normal CPU now.

Tinuz97 avatar Dec 29 '21 20:12 Tinuz97

Thanks for testing and providing logs to all!

ainar-g avatar Dec 29 '21 20:12 ainar-g

@trenchcoatjedi, that was a link for an AMD64 binary. Links to all edge builds are in the README. Here's a direct one for 64-bit ARM:

https://static.adguard.com/adguardhome/edge/AdGuardHome_linux_arm64.tar.gz

Now running v0.108.0-a.23+a0bb5ce8 ARM64 version. After 30 min, usual metrics (mainly CPU utilization, IRQs and thermal) are back to baseline. Will report back if anything changes. Thanks for the help and support!

trenchcoatjedi avatar Dec 29 '21 20:12 trenchcoatjedi

Fixed with 0.107.2 for me as well.

tuday2 avatar Dec 29 '21 20:12 tuday2

v0.107.2 When using tcp to call adguard home dns service Three error logs will appear every time adguard home is re-run, regardless of whether the communication with https://dns-family.adguard.com is normal or not If the communication with https://dns-family.adguard.com is abnormal, the error log will be output continuously

[error] handling tcp: handling tcp request: talking to dns upstream: failed to check host "lati-af.opera.com": safe browsing: requesting https://dns-family.adguard.com:443/dns-query: Get "https://dns-family.adguard.com:443/dns-query?dns=_***": context deadline exceeded (Client.Timeout exceeded while awaiting headers) [error] handling tcp: setting deadline: set tcp 192.168.1.6:53: use of closed network connection [error] handling tcp: closing conn: close tcp 192.168.1.6:53->192.168.1.112:4587: use of closed network connection

wsltshh avatar Dec 31 '21 00:12 wsltshh