Disabling Pi-Hole Breaks DNS for ~1 min

FTL crashing on the test branch. It will run fine until it gets queried then it crashes.

[2020-02-04 22:00:33.674 26682] Reloading DNS cache
[2020-02-04 22:00:33.684 26682] Blocking status is enabled
[2020-02-04 22:00:33.985 26682] INFO: No regex whitelist entries found
[2020-02-04 22:00:34.119 26682] Compiled 0 whitelist and 7 blacklist regex filters in 162.0 msec
[2020-02-04 22:00:40.931 26682] !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[2020-02-04 22:00:40.944 26682] ---------------------------->  FTL crashed!  <----------------------------
[2020-02-04 22:00:40.946 26682] !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[2020-02-04 22:00:40.947 26682] Please report a bug at https://github.com/pi-hole/FTL/issues
[2020-02-04 22:00:40.949 26682] and include in your report already the following details:
[2020-02-04 22:00:40.950 26682] FTL has been running for 9 seconds
[2020-02-04 22:00:40.953 26682] FTL branch: tweak/gravity_count
[2020-02-04 22:00:40.959 26682] FTL version: vDev-1af4748
[2020-02-04 22:00:40.961 26682] FTL commit: 1af4748
[2020-02-04 22:00:40.962 26682] FTL date: 2020-02-03 08:43:06 +0100
[2020-02-04 22:00:40.964 26682] FTL user: started as pihole, ended as pihole
[2020-02-04 22:00:40.968 26682] Compiled for arm (compiled on CI) using arm-linux-gnueabihf-gcc (crosstool-NG crosstool-ng-1.22.0-88-g8460611) 4.9.3
[2020-02-04 22:00:40.971 26682] Received signal: Segmentation fault
[2020-02-04 22:00:40.974 26682]      at address: 0x226
[2020-02-04 22:00:40.976 26682]      with code: SEGV_MAPERR (Address not mapped to object)
[2020-02-04 22:00:40.981 26682] Backtrace:
[2020-02-04 22:00:40.983 26682] B[0000]: 0x483a34, /usr/bin/pihole-FTL(+0x2ba34) [0x483a34]
[2020-02-04 22:00:40.993 26682] B[0001]: 0xb6dbe130, /lib/arm-linux-gnueabihf/libc.so.6(__default_rt_sa_restorer+0) [0xb6dbe130]
[2020-02-04 22:00:40.995 26682] ------ Listing content of directory /dev/shm ------
[2020-02-04 22:00:40.996 26682] File Mode User:Group  Filesize Filename
[2020-02-04 22:00:40.998 26682] rwxrwxrwx root:root 260 .
[2020-02-04 22:00:41.000 26682] rwxr-xr-x root:root 3K ..
[2020-02-04 22:00:41.003 26682] rw------- pihole:pihole 4K FTL-per-client-regex
[2020-02-04 22:00:41.006 26682] rw------- pihole:pihole 12K FTL-dns-cache
[2020-02-04 22:00:41.010 26682] rw------- pihole:pihole 53K FTL-overTime
[2020-02-04 22:00:41.014 26682] rw------- pihole:pihole 1M FTL-queries
[2020-02-04 22:00:41.018 26682] rw------- pihole:pihole 20K FTL-forwarded
[2020-02-04 22:00:41.022 26682] rw------- pihole:pihole 20K FTL-clients
[2020-02-04 22:00:41.027 26682] rw------- pihole:pihole 66K FTL-domains
[2020-02-04 22:00:41.035 26682] rw------- pihole:pihole 45K FTL-strings
[2020-02-04 22:00:41.037 26682] rw------- pihole:pihole 12 FTL-settings
[2020-02-04 22:00:41.041 26682] rw------- pihole:pihole 120 FTL-counters
[2020-02-04 22:00:41.047 26682] rw------- pihole:pihole 28 FTL-lock
[2020-02-04 22:00:41.052 26682] ---------------------------------------------------
[2020-02-04 22:00:41.053 26682] Thank you for helping us to improve our FTL engine!
[2020-02-04 22:00:41.057 26682] FTL terminated!

Second try (okay... maybe 3rd/4th)

pihole.log

Feb  4 22:09:51 dnsmasq[28510]: started, version pi-hole-2.80 cachesize 10000
Feb  4 22:09:51 dnsmasq[28510]: DNS service limited to local subnets
Feb  4 22:09:51 dnsmasq[28510]: compile time options: IPv6 GNU-getopt no-DBus no-i18n no-IDN DHCP DHCPv6 no-Lua TFTP no-conntrack ipset auth DNSSEC loop-detect inotify dumpfile
Feb  4 22:09:51 dnsmasq[28510]: using local addresses only for domain use-application-dns.net
Feb  4 22:09:51 dnsmasq[28510]: using nameserver 192.168.1.1#53 for domain 1.168.192.in-addr.arpa
Feb  4 22:09:51 dnsmasq[28510]: using nameserver 192.168.1.1#53 for domain lan
Feb  4 22:09:51 dnsmasq[28510]: using nameserver 127.0.0.1#5353
Feb  4 22:09:52 dnsmasq[28510]: read /etc/hosts - 11 addresses
Feb  4 22:09:52 dnsmasq[28510]: read /etc/pihole/custom.list - 0 addresses
Feb  4 22:09:52 dnsmasq[28510]: read /etc/pihole/local.list - 2 addresses
Feb  4 22:10:16 dnsmasq[28510]: query[A] app-measurement.com from 192.168.1.x
Feb  4 22:10:16 dnsmasq[28510]: gravity blocked app-measurement.com is 0.0.0.0
Feb  4 22:10:53 dnsmasq[28510]: query[A] pi.hole from 192.168.1.x
Feb  4 22:10:53 dnsmasq[28510]: /etc/hosts pi.hole is 192.168.1.x
Feb  4 22:11:20 dnsmasq[28510]: query[A] www.youtube.com from 192.168.1.x

pihole-FTL.log

[2020-02-04 22:09:51.785 28510] Reloading DNS cache
[2020-02-04 22:09:51.792 28510] Blocking status is enabled
[2020-02-04 22:09:52.070 28510] INFO: No regex whitelist entries found
[2020-02-04 22:09:52.231 28510] Compiled 0 whitelist and 7 blacklist regex filters in 191.2 msec
[2020-02-04 22:11:20.795 28510] !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[2020-02-04 22:11:20.800 28510] ---------------------------->  FTL crashed!  <----------------------------
[2020-02-04 22:11:20.803 28510] !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[2020-02-04 22:11:20.806 28510] Please report a bug at https://github.com/pi-hole/FTL/issues
[2020-02-04 22:11:20.807 28510] and include in your report already the following details:
[2020-02-04 22:11:20.809 28510] FTL has been running for 92 seconds
[2020-02-04 22:11:20.811 28510] FTL branch: tweak/gravity_count
[2020-02-04 22:11:20.813 28510] FTL version: vDev-1af4748
[2020-02-04 22:11:20.815 28510] FTL commit: 1af4748
[2020-02-04 22:11:20.817 28510] FTL date: 2020-02-03 08:43:06 +0100
[2020-02-04 22:11:20.820 28510] FTL user: started as pihole, ended as pihole
[2020-02-04 22:11:20.821 28510] Compiled for arm (compiled on CI) using arm-linux-gnueabihf-gcc (crosstool-NG crosstool-ng-1.22.0-88-g8460611) 4.9.3
[2020-02-04 22:11:20.823 28510] Received signal: Segmentation fault
[2020-02-04 22:11:20.825 28510]      at address: 0x226
[2020-02-04 22:11:20.827 28510]      with code: SEGV_MAPERR (Address not mapped to object)
[2020-02-04 22:11:20.829 28510] Backtrace:
[2020-02-04 22:11:20.832 28510] B[0000]: 0x45ca34, /usr/bin/pihole-FTL(+0x2ba34) [0x45ca34]
[2020-02-04 22:11:20.834 28510] B[0001]: 0xb6d59130, /lib/arm-linux-gnueabihf/libc.so.6(__default_rt_sa_restorer+0) [0xb6d59130]
[2020-02-04 22:11:20.836 28510] ------ Listing content of directory /dev/shm ------
[2020-02-04 22:11:20.838 28510] File Mode User:Group  Filesize Filename
[2020-02-04 22:11:20.841 28510] rwxrwxrwx root:root 260 .
[2020-02-04 22:11:20.843 28510] rwxr-xr-x root:root 3K ..
[2020-02-04 22:11:20.846 28510] rw------- pihole:pihole 4K FTL-per-client-regex
[2020-02-04 22:11:20.847 28510] rw------- pihole:pihole 12K FTL-dns-cache
[2020-02-04 22:11:20.850 28510] rw------- pihole:pihole 53K FTL-overTime
[2020-02-04 22:11:20.852 28510] rw------- pihole:pihole 1M FTL-queries
[2020-02-04 22:11:20.855 28510] rw------- pihole:pihole 20K FTL-forwarded
[2020-02-04 22:11:20.858 28510] rw------- pihole:pihole 20K FTL-clients
[2020-02-04 22:11:20.860 28510] rw------- pihole:pihole 66K FTL-domains
[2020-02-04 22:11:20.863 28510] rw------- pihole:pihole 45K FTL-strings
[2020-02-04 22:11:20.866 28510] rw------- pihole:pihole 12 FTL-settings
[2020-02-04 22:11:20.869 28510] rw------- pihole:pihole 120 FTL-counters
[2020-02-04 22:11:20.871 28510] rw------- pihole:pihole 28 FTL-lock
[2020-02-04 22:11:20.873 28510] ---------------------------------------------------
[2020-02-04 22:11:20.874 28510] Thank you for helping us to improve our FTL engine!
[2020-02-04 22:11:20.876 28510] FTL terminated!

Meant to chime in on this yesterday morning but I could not get FTL to run after this patch. pihole -r did not fix anything

FTL crashes immediately with this branch on a pi 0.

[2020-02-04 06:18:34.788 15857] !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[2020-02-04 06:18:34.788 15857] ---------------------------->  FTL crashed!  <----------------------------
[2020-02-04 06:18:34.789 15857] !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[2020-02-04 06:18:34.789 15857] Please report a bug at https://github.com/pi-hole/FTL/issues
[2020-02-04 06:18:34.789 15857] and include in your report already the following details:
[2020-02-04 06:18:34.789 15857] FTL has been running for 8 seconds
[2020-02-04 06:18:34.789 15857] FTL branch: tweak/gravity_count
[2020-02-04 06:18:34.789 15857] FTL version: vDev-1af4748
[2020-02-04 06:18:34.790 15857] FTL commit: 1af4748
[2020-02-04 06:18:34.790 15857] FTL date: 2020-02-03 08:43:06 +0100
[2020-02-04 06:18:34.790 15857] FTL user: started as pihole, ended as pihole
[2020-02-04 06:18:34.790 15857] Compiled for arm (compiled on CI) using arm-linux-gnueabihf-gcc (crosstool-NG crosstool-ng-1.22.0-88-g8460611) 4.9.3
[2020-02-04 06:18:34.791 15857] Received signal: Segmentation fault
[2020-02-04 06:18:34.791 15857]      at address: 0x226
[2020-02-04 06:18:34.791 15857]      with code: SEGV_MAPERR (Address not mapped to object)
[2020-02-04 06:18:34.791 15857] Backtrace:
[2020-02-04 06:18:34.792 15857] B[0000]: 0x4bda34, /usr/bin/pihole-FTL(+0x2ba34) [0x4bda34]
[2020-02-04 06:18:34.803 15857] B[0001]: 0xb6d39130, /lib/arm-linux-gnueabihf/libc.so.6(__default_rt_sa_restorer+0) [0xb6d39130]
[2020-02-04 06:18:34.803 15857] ------ Listing content of directory /dev/shm ------
[2020-02-04 06:18:34.803 15857] File Mode User:Group  Filesize Filename
[2020-02-04 06:18:34.804 15857] rwxrwxrwx root:root 260 .
[2020-02-04 06:18:34.804 15857] rwxr-xr-x root:root 4K ..
[2020-02-04 06:18:34.805 15857] rw------- pihole:pihole 4K FTL-per-client-regex
[2020-02-04 06:18:34.805 15857] rw------- pihole:pihole 12K FTL-dns-cache
[2020-02-04 06:18:34.806 15857] rw------- pihole:pihole 53K FTL-overTime
[2020-02-04 06:18:34.806 15857] rw------- pihole:pihole 2M FTL-queries
[2020-02-04 06:18:34.807 15857] rw------- pihole:pihole 20K FTL-forwarded
[2020-02-04 06:18:34.808 15857] rw------- pihole:pihole 20K FTL-clients
[2020-02-04 06:18:34.808 15857] rw------- pihole:pihole 66K FTL-domains
[2020-02-04 06:18:34.809 15857] rw------- pihole:pihole 12K FTL-strings
[2020-02-04 06:18:34.809 15857] rw------- pihole:pihole 12 FTL-settings
[2020-02-04 06:18:34.810 15857] rw------- pihole:pihole 120 FTL-counters
[2020-02-04 06:18:34.811 15857] rw------- pihole:pihole 28 FTL-lock
[2020-02-04 06:18:34.811 15857] ---------------------------------------------------
[2020-02-04 06:18:34.811 15857] Thank you for helping us to improve our FTL engine!
[2020-02-04 06:18:34.811 15857] FTL terminated!

pi@pi0:~ $ pihole -v
  Pi-hole version is v4.3.2-392-g2a5cf22 (Latest: v4.3.2)
  AdminLTE version is v4.3.2-378-g4958ed2 (Latest: v4.3.2)
  FTL version is vDev-1af4748 (Latest: v4.3.1)

After little digging, seems like this test branch doesn't have the previous fix for pi zero... oh well... back to release for now. Will try again once it's updated.

1 Like

You're right. I'm very sorry for this, it seems my local release/v5.0 branch was lacking behind. I guess this is what you get when you're commute between two flats with independent Pi-holes... Should be fixes by now!

1 Like

Connected pull requests:

1 Like

Working fine... my pi zero is happily doing restartdns in a few sec.

1 Like

@DL6ER... Possible bug?

pihole -g
[i] Number of gravity domains: 2321402 (1656514 unique domains)

However, admin page is showing 1,656,891.

Not a bug. The first number is all domains pulled in from all your blocklists. The second is after duplicates are removed. The dashboard correctly shows the second number, since that is the gravity count.

Sorry but I'm not sure you noticed the numbers are not the same. There's a difference of 377 domains. My understanding was both numbers should be identical.

I ran another test. After restarting FTL service, dashboard now shows 1,656,514.

Then ran pihole -g

[i] Number of gravity domains: 2321696 (1656765 unique domains)

Dashboard still shows 1,656,514.

dnsrestart fixes it and now it shows 1,656,765.

Yes. I checked it and it works for me. Please try to following example:

sqlite3 /etc/pihole/gravity.db "UPDATE info SET value = value - 1 WHERE property = 'gravity_count'; SELECT value FROM info WHERE property = 'gravity_count';"
pihole restartdns reload-lists

This will (artificially) decrease the count of gravity domains by one and tells FTL to reload the lists from the database. Does the number shown on the dashboard with the number on the dashboard?

The code has been merged, all, please go back on track:

pihole checkout core release/v5.0
pihole checkout ftl release/v5.0
2 Likes

Cheers! Thanks for your support! I'm marking this resolved, as the issue as initially described has been fixed.

I am not seeing the (very slight) variation between # of "unique domains" and web dashboard "domains on blocklist". I see 1583196 on both.

Switched back to release. All working fine now. Thank you.