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

100% CPU load #4042

Closed
3 tasks done
SCP-155 opened this issue Dec 29, 2021 · 16 comments
Closed
3 tasks done

100% CPU load #4042

SCP-155 opened this issue Dec 29, 2021 · 16 comments
Assignees
Milestone

Comments

@SCP-155
Copy link

SCP-155 commented Dec 29, 2021

Prerequisites

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

  • I am running the latest version
  • I checked the documentation and found no answer
  • 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.

@ainar-g
Copy link
Contributor

ainar-g commented Dec 29, 2021

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

@ainar-g ainar-g added the waiting for data Waiting for users to provide more data. label Dec 29, 2021
@SCP-155
Copy link
Author

SCP-155 commented Dec 29, 2021

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

@CordoWEB
Copy link

CordoWEB commented Dec 29, 2021

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).

@ainar-g ainar-g mentioned this issue Dec 29, 2021
3 tasks
adguard pushed a commit to AdguardTeam/dnsproxy that referenced this issue Dec 29, 2021
Updates AdguardTeam/AdGuardHome#4042.

Squashed commit of the following:

commit 42f92b4
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Wed Dec 29 21:56:42 2021 +0300

    proxy: fix logs

commit a5b56fa
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Wed Dec 29 21:54:21 2021 +0300

    proxy: fix tcp conn loop
@ainar-g ainar-g added bug P1: Critical and removed waiting for data Waiting for users to provide more data. labels Dec 29, 2021
@ainar-g ainar-g self-assigned this Dec 29, 2021
@ainar-g ainar-g mentioned this issue Dec 29, 2021
3 tasks
@ainar-g ainar-g pinned this issue Dec 29, 2021
@ainar-g ainar-g added this to the v0.107.2 milestone Dec 29, 2021
adguard pushed a commit that referenced this issue Dec 29, 2021
Updates #4042.

Squashed commit of the following:

commit 7531b97
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Wed Dec 29 22:01:54 2021 +0300

    all: upd dnsproxy
@trenchcoatjedi
Copy link

trenchcoatjedi commented Dec 29, 2021

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.

@ainar-g
Copy link
Contributor

ainar-g commented Dec 29, 2021

@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.

@trenchcoatjedi
Copy link

trenchcoatjedi commented Dec 29, 2021

@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.

@ainar-g
Copy link
Contributor

ainar-g commented Dec 29, 2021

@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

@SCP-155
Copy link
Author

SCP-155 commented Dec 29, 2021

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.

adguard pushed a commit that referenced this issue Dec 29, 2021
Updates #4042.

Squashed commit of the following:

commit 7531b97
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Wed Dec 29 22:01:54 2021 +0300

    all: upd dnsproxy
@Tinuz97
Copy link

Tinuz97 commented Dec 29, 2021

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

@t3dium
Copy link

t3dium commented Dec 29, 2021

same

@SCP-155
Copy link
Author

SCP-155 commented Dec 29, 2021

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!

@Tinuz97
Copy link

Tinuz97 commented Dec 29, 2021

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

@ainar-g
Copy link
Contributor

ainar-g commented Dec 29, 2021

Thanks for testing and providing logs to all!

@ainar-g ainar-g closed this as completed Dec 29, 2021
@trenchcoatjedi
Copy link

@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!

@tuday2
Copy link

tuday2 commented Dec 29, 2021

Fixed with 0.107.2 for me as well.

@ainar-g ainar-g unpinned this issue Dec 30, 2021
@wsltshh
Copy link

wsltshh commented Dec 31, 2021

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

heyxkhoa pushed a commit to heyxkhoa/AdGuardHome that referenced this issue Mar 20, 2023
Updates AdguardTeam#4042.

Squashed commit of the following:

commit 7531b97
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Wed Dec 29 22:01:54 2021 +0300

    all: upd dnsproxy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants