DNS cannot function during Filter update #856

Closed
opened 2026-03-04 00:52:49 -05:00 by deekerman · 27 comments
Owner

Originally created by @ghost on GitHub (Aug 11, 2019).

Originally assigned to: @szolin on GitHub.

Issue Details

Whilst AdGuard Home is updating filters, all DNS traffic is halted until the update is complete.
This is very obvious when using a large filter, and having slow internet speeds.

  • Version of AdGuard Home server:
    • v0.97.1-54-ga59b
  • How did you setup DNS configuration:
    • IoT
  • If it's a router or IoT, please write device model:
    • Raspberry Pi 3 Model B+
  • Operating system and version:
    • Raspbian (Latest)

Expected Behavior

DNS traffic can continue to work whilst updates are running.

Actual Behavior

All DNS traffic cannot work, until the update is fully complete.

Additional Information

Pi-hole is able to run gravity updates separately, allowing all traffic to continue as expected and then restarts the DNS server once the download is complete and the filter updates are applied.

Originally created by @ghost on GitHub (Aug 11, 2019). Originally assigned to: @szolin on GitHub. ### Issue Details Whilst AdGuard Home is updating filters, all DNS traffic is halted until the update is complete. This is very obvious when using a large filter, and having slow internet speeds. <!--- Please include all relevant details about the environment you experienced the bug in --> * **Version of AdGuard Home server:** * <!-- (e.g. v1.0) -->v0.97.1-54-ga59b * **How did you setup DNS configuration:** * <!-- (System/Router/IoT) -->IoT * **If it's a router or IoT, please write device model:** * <!-- (e.g. Raspberry Pi 3 Model B) -->Raspberry Pi 3 Model B+ * **Operating system and version:** * <!-- (e.g. Ubuntu 18.04.1) -->Raspbian (Latest) ### Expected Behavior <!-- A clear and concise description of what you expected to happen. --> DNS traffic can continue to work whilst updates are running. ### Actual Behavior <!-- A clear and concise description of what actually happened. --> All DNS traffic cannot work, until the update is fully complete. ### Additional Information <!-- Add any other context about the problem here. --> Pi-hole is able to run gravity updates separately, allowing all traffic to continue as expected and then restarts the DNS server once the download is complete and the filter updates are applied.
deekerman 2026-03-04 00:52:49 -05:00
Author
Owner

@ilya-fedin commented on GitHub (Aug 16, 2019):

I have the same issue. For now adtidy.org is down, Aguard Home tries to update safebrowsing list in loop, while updating DNS doesnt't work:

2019/08/17 02:56:49 [info] Failed to do safebrowsing HTTP lookup, ignoring check: Get https://sb.adtidy.org/safebrowsing-lookup-hash.html?prefixes=4D2AF688/9B541B2D/EE240335/BBA06DD3/7F428118/: couldn't dial to 176.103.133.133:443, cause: dial tcp 176.103.133.133:443: connect: connection timed out

So, all users with enabled safebrowsing should have problems with DNS resolving.
I think, this issue should have high priority.

@ilya-fedin commented on GitHub (Aug 16, 2019): I have the same issue. For now adtidy.org is down, Aguard Home tries to update safebrowsing list in loop, while updating DNS doesnt't work: ``` 2019/08/17 02:56:49 [info] Failed to do safebrowsing HTTP lookup, ignoring check: Get https://sb.adtidy.org/safebrowsing-lookup-hash.html?prefixes=4D2AF688/9B541B2D/EE240335/BBA06DD3/7F428118/: couldn't dial to 176.103.133.133:443, cause: dial tcp 176.103.133.133:443: connect: connection timed out ``` So, all users with enabled safebrowsing should have problems with DNS resolving. I think, this issue should have high priority.
Author
Owner

@ameshkov commented on GitHub (Aug 18, 2019):

@ilya-fedin sorry for the late reply, please see the answer here: https://github.com/AdguardTeam/AdGuardHome/issues/936#issuecomment-522353903

@ameshkov commented on GitHub (Aug 18, 2019): @ilya-fedin sorry for the late reply, please see the answer here: https://github.com/AdguardTeam/AdGuardHome/issues/936#issuecomment-522353903
Author
Owner

@szolin commented on GitHub (Aug 20, 2019):

@planet0 I can't reproduce it. Can you show application logs?
The only reason I can think of that can cause the issue is that downloading a filter uses the whole available bandwidth and DNS packets can't pass through.

@szolin commented on GitHub (Aug 20, 2019): @planet0 I can't reproduce it. Can you show application logs? The only reason I can think of that can cause the issue is that downloading a filter uses the whole available bandwidth and DNS packets can't pass through.
Author
Owner

@szolin commented on GitHub (Sep 2, 2019):

@planet0 Does the issue persist?

@szolin commented on GitHub (Sep 2, 2019): @planet0 Does the issue persist?
Author
Owner

@ghost commented on GitHub (Sep 4, 2019):

@szolin Sorry about not responding sooner, I was hoping to have the chance to reproduce this issue for the application logs but I haven't.

Something in AGH's behaviour prevents any DNS filtering traffic to occur until the update process is done. Pi-hole runs the update procedure separately from the active DNS rules until they are complete, and then applies the new rules in 1 or 2 seconds which the same issue occurs. However, 1 second is a lot more tolerable instead of the entire time to update all the filters (20MB+) in AdGuard Home.

@ghost commented on GitHub (Sep 4, 2019): @szolin Sorry about not responding sooner, I was hoping to have the chance to reproduce this issue for the application logs but I haven't. Something in AGH's behaviour prevents any DNS filtering traffic to occur until the update process is done. Pi-hole runs the update procedure separately from the active DNS rules until they are complete, and then applies the new rules in 1 or 2 seconds which the same issue occurs. However, 1 second is a lot more tolerable instead of the entire time to update all the filters (20MB+) in AdGuard Home.
Author
Owner

@szolin commented on GitHub (Sep 4, 2019):

instead of the entire time to update all the filters (20MB+) in AdGuard Home

We don't lock DNS operations while we're downloading updates.
When I start filter update procedure, and while the filter data is being downloaded, DNS server responds just fine, without delays. That's why I want to look at the app logs - maybe we can find what causes the delays in your case.

@szolin commented on GitHub (Sep 4, 2019): > instead of the entire time to update all the filters (20MB+) in AdGuard Home We don't lock DNS operations while we're downloading updates. When I start filter update procedure, and while the filter data is being downloaded, DNS server responds just fine, without delays. That's why I want to look at the app logs - maybe we can find what causes the delays in your case.
Author
Owner

@ghost commented on GitHub (Sep 4, 2019):

Thanks for letting me know, it's hard as a user (non-developer) to understand what goes on in the background. Apologies for getting that wrong. 😅

The only other idea (if possible) is to imitate my slow internet connection, at 3 Megabits per second download and 1 Megabit upload speeds, then try to force update filters.

Otherwise I'll need to reinstall AdGuard Home and try it again soon for you.

@ghost commented on GitHub (Sep 4, 2019): Thanks for letting me know, it's hard as a user (non-developer) to understand what goes on in the background. Apologies for getting that wrong. 😅 The only other idea (if possible) is to imitate my slow internet connection, at 3 Megabits per second download and 1 Megabit upload speeds, then try to force update filters. Otherwise I'll need to reinstall AdGuard Home and try it again soon for you.
Author
Owner

@ameshkov commented on GitHub (Sep 10, 2019):

Well, unfortunately we cannot reproduce this. It'd be much easier to troubleshoot if we had debug level log.

@ameshkov commented on GitHub (Sep 10, 2019): Well, unfortunately we cannot reproduce this. It'd be much easier to troubleshoot if we had debug level log.
Author
Owner

@ghost commented on GitHub (Sep 10, 2019):

I think what @szolin assume is right.

The only reason I can think of that can cause the issue is that downloading a filter uses the whole available bandwidth and DNS packets can't pass through.

@planet0 said above, (actual speed mostly slower than it)

my slow internet connection, at 3 Megabits per second download and 1 Megabit upload speeds,

Just i didn't check the source code to see how the update works but prefer add a suggestion. AGHome able measure network speed before start download anything (filters or software updates) then activate a slow mode with optional notification to user then download filters one by one using low bandwidth such as few Kb/s (100-350) (however software update must be re-verify whether damaged or not prior install)

Measure network speed bit unwanted but it helps to exclude faster network connections and download all filters, software updates at once without delays.

@ghost commented on GitHub (Sep 10, 2019): I think what @szolin assume is right. > The only reason I can think of that can cause the issue is that downloading a filter uses the whole available bandwidth and DNS packets can't pass through. @planet0 said above, (actual speed mostly slower than it) > my slow internet connection, at 3 Megabits per second download and 1 Megabit upload speeds, Just i didn't check the source code to see how the update works but prefer add a suggestion. AGHome able measure network speed before start download anything (filters or software updates) then activate a slow mode with optional notification to user then download filters one by one using low bandwidth such as few Kb/s (100-350) (however software update must be re-verify whether damaged or not prior install) Measure network speed bit unwanted but it helps to exclude faster network connections and download all filters, software updates at once without delays.
Author
Owner

@ilya-fedin commented on GitHub (Sep 10, 2019):

Even if there are no problems with DNS filters updating, there is definitely a problem with safe-browsing lists updating - the recent incident with DDoS of the safe-browsing worksheet server proof that.

@ilya-fedin commented on GitHub (Sep 10, 2019): Even if there are no problems with DNS filters updating, there is definitely a problem with safe-browsing lists updating - the recent incident with DDoS of the safe-browsing worksheet server proof that.
Author
Owner

@ameshkov commented on GitHub (Sep 10, 2019):

Yeah, but this is not relevant to this particular issue:)

@ameshkov commented on GitHub (Sep 10, 2019): Yeah, but this is not relevant to this particular issue:)
Author
Owner

@ilya-fedin commented on GitHub (Sep 10, 2019):

@ameshkov where's issue about safe-browsing lists updating?

@ilya-fedin commented on GitHub (Sep 10, 2019): @ameshkov where's issue about safe-browsing lists updating?
Author
Owner
@ameshkov commented on GitHub (Sep 10, 2019): https://github.com/AdguardTeam/AdGuardHome/issues/525#issuecomment-520482071
Author
Owner

@szolin commented on GitHub (Sep 10, 2019):

download filters one by one using low bandwidth

We can let user to set a limit for filters downloading rate in configuration. I don't know if we can easily add this feature, but it's just a possible solution.

@szolin commented on GitHub (Sep 10, 2019): > download filters one by one using low bandwidth We can let user to set a limit for filters downloading rate in configuration. I don't know if we can easily add this feature, but it's just a possible solution.
Author
Owner

@ilya-fedin commented on GitHub (Sep 10, 2019):

@ameshkov thank you

@ilya-fedin commented on GitHub (Sep 10, 2019): @ameshkov thank you
Author
Owner

@ghost commented on GitHub (Sep 10, 2019):

We can let user to set a limit for filters downloading rate in configuration.

I believe no one will get benefit from this option except power users so it must be work automatically.

@ghost commented on GitHub (Sep 10, 2019): > We can let user to set a limit for filters downloading rate in configuration. I believe no one will get benefit from this option except power users so it must be work automatically.
Author
Owner

@szolin commented on GitHub (Sep 10, 2019):

Yes, but determining Internet speed automatically is a task of another complexity level, and it would require much time to implement.

@szolin commented on GitHub (Sep 10, 2019): Yes, but determining Internet speed automatically is a task of another complexity level, and it would require much time to implement.
Author
Owner

@ghost commented on GitHub (Sep 10, 2019):

We should always give something perfect by design and suitable for everyone to use without effort or thirdparty assistance however this issue so far affect for less users then able move for upcoming milestones.

@ghost commented on GitHub (Sep 10, 2019): We should always give something perfect by design and suitable for everyone to use without effort or thirdparty assistance however this issue so far affect for less users then able move for upcoming milestones.
Author
Owner

@ghost commented on GitHub (Sep 10, 2019):

Reading this discussion made me realise that I also had Browsing Security enabled as well. Would that have had any affect on the issue?

@ghost commented on GitHub (Sep 10, 2019): Reading this discussion made me realise that I also had Browsing Security enabled as well. Would that have had any affect on the issue?
Author
Owner

@ghost commented on GitHub (Sep 11, 2019):

@planet0 not that much. if you want to see this issue practically as easy to understand, just start to upload any large file to a cloud storage service that claims about offer fast upload and downloads meantime try to visit google.com or other website through browser then you'll see no internet notification or keep loading more time although certain file still uploading as well so that's what happening vise versa. you can check it without AGHome too.

@ghost commented on GitHub (Sep 11, 2019): @planet0 not that much. if you want to see this issue practically as easy to understand, just start to upload any large file to a cloud storage service that claims about offer fast upload and downloads meantime try to visit google.com or other website through browser then you'll see no internet notification or keep loading more time although certain file still uploading as well so that's what happening vise versa. you can check it without AGHome too.
Author
Owner

@ameshkov commented on GitHub (Sep 13, 2019):

@szolin the problem is not downloading filter lists but initializing the filtering engine. If you add a huge filter list (energized or dbl.oisd.nl) it takes a while to initialize the engine, and AGH is unresponsive when it happens.

This will be difficult to resolve.

@ameshkov commented on GitHub (Sep 13, 2019): @szolin the problem is not downloading filter lists but initializing the filtering engine. If you add a huge filter list (energized or dbl.oisd.nl) it takes a while to initialize the engine, and AGH is unresponsive when it happens. This will be difficult to resolve.
Author
Owner

@ghost commented on GitHub (Sep 23, 2019):

Thank you!

@ghost commented on GitHub (Sep 23, 2019): Thank you!
Author
Owner

@ameshkov commented on GitHub (Oct 3, 2019):

@planet0 have you checked out the beta version? Does it work okay now?

@ameshkov commented on GitHub (Oct 3, 2019): @planet0 have you checked out the beta version? Does it work okay now?
Author
Owner

@ghost commented on GitHub (Oct 3, 2019):

@ameshkov Just tested v0.98.1-136-g423d now with dbl.oisd.nl, can still browse the net whilst updating/downloading! 👍🏼

@ghost commented on GitHub (Oct 3, 2019): @ameshkov Just tested v0.98.1-136-g423d now with dbl.oisd.nl, can still browse the net whilst updating/downloading! 👍🏼
Author
Owner

@ameshkov commented on GitHub (Oct 3, 2019):

@planet0 awesome, thank you:)

@ameshkov commented on GitHub (Oct 3, 2019): @planet0 awesome, thank you:)
Author
Owner

@ghost commented on GitHub (Oct 3, 2019):

@ameshkov @szolin Only issue is, I just noticed the queries are not being blocked during update, they pass through. Noticed it with logs.roku.com for the SDNS Filter.

Before (blocked):

Screen Shot 2019-10-03 at 10 36 05 pm

During Update (notice dbl.oisd.nl entry as well):

Screen Shot 2019-10-03 at 10 36 20 pm

After Update (back to being blocked):

Screen Shot 2019-10-03 at 10 40 47 pm
@ghost commented on GitHub (Oct 3, 2019): @ameshkov @szolin Only issue is, I just noticed the queries are not being blocked during update, they pass through. Noticed it with logs.roku.com for the SDNS Filter. Before (blocked): <img width="672" alt="Screen Shot 2019-10-03 at 10 36 05 pm" src="https://user-images.githubusercontent.com/46271764/66127065-3eeb4180-e62e-11e9-9535-1f89c273ee97.png"> During Update (notice dbl.oisd.nl entry as well): <img width="684" alt="Screen Shot 2019-10-03 at 10 36 20 pm" src="https://user-images.githubusercontent.com/46271764/66127111-51657b00-e62e-11e9-9c21-f2c3de77a14c.png"> After Update (back to being blocked): <img width="687" alt="Screen Shot 2019-10-03 at 10 40 47 pm" src="https://user-images.githubusercontent.com/46271764/66127396-e5cfdd80-e62e-11e9-9643-d6fbaf43b445.png">
Author
Owner

@ameshkov commented on GitHub (Oct 3, 2019):

Hm, yeah, that's not ideal.

The prev filtering engine should continue to work while the updated one is being initialized

@ameshkov commented on GitHub (Oct 3, 2019): Hm, yeah, that's not ideal. The prev filtering engine should continue to work while the updated one is being initialized
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/AdGuardHome#856
No description provided.