DNS Service not running every day

Hi all. I set up a few days ago Pi-hole on hyper-v virtual machine at home.
Everyday Pi-hole down.
I found here is on forum good advice:

service pihole-FTL stop
mv /etc/pihole/pihole-FTL.db /etc/pihole/pihole-FTL-hold.db
service pihole-FTL start

And this helps.
But I don't want to do this every day.
What do I need to fix? Thanks a lot.

My Debug:
https://tricorder.pi-hole.net/LXh5akRu/

Look in the following logs (and the previous day logs with a .1 suffix) for errors around the time Pi-hole stopped working:

/var/log/pihole.log

/var/log/pihole-FTL.log

/var/log/syslog

Hi and thanks.
I try increase virtual machine memory to 8Gb but no luck.

[2022-05-10 02:31:09.684 704/T709] Resizing "FTL-dns-cache" from 22261760 to (1391616 * 16) == 22265856 (/dev/shm: 313.6MB used, 4.1GB total, FTL uses 313.6MB)
[2022-05-10 02:31:20.247 704M] Resizing "FTL-strings" from 27484160 to (27525120 * 1) == 27525120 (/dev/shm: 313.6MB used, 4.1GB total, FTL uses 313.6MB)
[2022-05-10 02:31:22.057 704M] Resizing "FTL-domains" from 33816576 to (1409536 * 24) == 33828864 (/dev/shm: 313.6MB used, 4.1GB total, FTL uses 313.6MB)
[2022-05-10 02:31:28.225 704M] Resizing "FTL-queries" from 229605376 to (4104192 * 56) == 229834752 (/dev/shm: 313.6MB used, 4.1GB total, FTL uses 313.6MB)
[2022-05-10 02:31:34.381 704M] Resizing "FTL-dns-cache" from 22265856 to (1391872 * 16) == 22269952 (/dev/shm: 313.9MB used, 4.1GB total, FTL uses 313.8MB)
[2022-05-10 02:31:38.616 704M] WARNING in dnsmasq core: reducing DNS packet size for nameserver 1.1.1.1 to 1232
[2022-05-10 02:31:51.416 704M] Resizing "FTL-dns-cache" from 22269952 to (1392128 * 16) == 22274048 (/dev/shm: 313.9MB used, 4.1GB total, FTL uses 313.8MB)
[2022-05-10 02:32:02.171 704M] Resizing "FTL-domains" from 33828864 to (1410048 * 24) == 33841152 (/dev/shm: 313.9MB used, 4.1GB total, FTL uses 313.9MB)
[2022-05-10 02:32:15.617 704M] Resizing "FTL-dns-cache" from 22274048 to (1392384 * 16) == 22278144 (/dev/shm: 313.9MB used, 4.1GB total, FTL uses 313.9MB)
[2022-05-10 02:32:19.331 704M] ERR: Port mismatch for 9.9.9.9: we derived 53, dnsmasq told us 43
[2022-05-10 02:32:19.336 704M] ERR: Port mismatch for 149.112.112.112: we derived 53, dnsmasq told us 43
[2022-05-10 02:32:19.343 704M] ERR: Port mismatch for 1.1.1.1: we derived 53, dnsmasq told us 43
[2022-05-10 02:32:19.348 704M] ERR: Port mismatch for 1.0.0.1: we derived 53, dnsmasq told us 43
[2022-05-10 02:32:25.690 704M] WARNING in dnsmasq core: reducing DNS packet size for nameserver 1.0.0.1 to 1232
[2022-05-10 02:32:31.292 704M] Resizing "FTL-dns-cache" from 22278144 to (1392640 * 16) == 22282240 (/dev/shm: 313.9MB used, 4.1GB total, FTL uses 313.9MB)
[2022-05-10 02:32:37.750 704M] Resizing "FTL-domains" from 33841152 to (1410560 * 24) == 33853440 (/dev/shm: 313.9MB used, 4.1GB total, FTL uses 313.9MB)
[2022-05-10 02:32:45.155 704M] Resizing "FTL-queries" from 229834752 to (4108288 * 56) == 230064128 (/dev/shm: 313.9MB used, 4.1GB total, FTL uses 313.9MB)
[2022-05-10 02:32:59.164 704M] Resizing "FTL-dns-cache" from 22282240 to (1392896 * 16) == 22286336 (/dev/shm: 314.1MB used, 4.1GB total, FTL uses 314.1MB)
[2022-05-10 02:33:03.145 704/T13503] !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[2022-05-10 02:33:03.145 704/T13503] ---------------------------->  FTL crashed!  <----------------------------
[2022-05-10 02:33:03.145 704/T13503] !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[2022-05-10 02:33:03.145 704/T13503] Please report a bug at https://github.com/pi-hole/FTL/issues
[2022-05-10 02:33:03.145 704/T13503] and include in your report already the following details:
[2022-05-10 02:33:03.145 704/T13503] FTL has been running for 55748 seconds
[2022-05-10 02:33:03.145 704/T13503] FTL branch: master
[2022-05-10 02:33:03.145 704/T13503] FTL version: v5.15
[2022-05-10 02:33:03.145 704/T13503] FTL commit: 4bb0bfe
[2022-05-10 02:33:03.145 704/T13503] FTL date: 2022-04-20 19:35:19 +0100
[2022-05-10 02:33:03.145 704/T13503] FTL user: started as root, ended as root
[2022-05-10 02:33:03.145 704/T13503] Compiled for x86_64 (compiled on CI) using gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516
[2022-05-10 02:33:03.145 704/T13503] Process details: MID: 704
[2022-05-10 02:33:03.145 704/T13503]                  PID: 704
[2022-05-10 02:33:03.145 704/T13503]                  TID: 13503
[2022-05-10 02:33:03.145 704/T13503]                  Name: telnet-15
[2022-05-10 02:33:03.145 704/T13503] Received signal: Segmentation fault
[2022-05-10 02:33:03.145 704/T13503]      at address: 0x7fa5f27b7000
[2022-05-10 02:33:03.145 704/T13503]      with code:  SEGV_ACCERR (Invalid permissions for mapped object)
[2022-05-10 02:33:03.145 704/T13503] Backtrace:
[2022-05-10 02:33:03.146 704/T13503] B[0000]: /usr/bin/pihole-FTL(generate_backtrace+0x41) [0x55e9ca45ed11]
[2022-05-10 02:33:03.146 704/T13503] L[0000]: N/A (0x5ed11 -> addr2line 0x5ed11 -e /usr/bin/pihole-FTL)
[2022-05-10 02:33:03.146 704/T13503] B[0001]: /usr/bin/pihole-FTL(+0x5f218) [0x55e9ca45f218]
[2022-05-10 02:33:03.146 704/T13503] L[0001]: N/A (0x5f218 -> addr2line 0x5f218 -e /usr/bin/pihole-FTL)
[2022-05-10 02:33:03.146 704/T13503] B[0002]: /lib/x86_64-linux-gnu/libpthread.so.0(+0x14140) [0x7fa5f667f140]
[2022-05-10 02:33:03.146 704/T13503] B[0003]: /usr/bin/pihole-FTL(getTopDomains+0x135) [0x55e9ca460495]
[2022-05-10 02:33:03.147 704/T13503] L[0003]: N/A (0x60495 -> addr2line 0x60495 -e /usr/bin/pihole-FTL)
[2022-05-10 02:33:03.147 704/T13503] B[0004]: /usr/bin/pihole-FTL(process_request+0x1bd) [0x55e9ca463d1d]
[2022-05-10 02:33:03.147 704/T13503] L[0004]: N/A (0x63d1d -> addr2line 0x63d1d -e /usr/bin/pihole-FTL)
[2022-05-10 02:33:03.147 704/T13503] B[0005]: /usr/bin/pihole-FTL(+0x64487) [0x55e9ca464487]
[2022-05-10 02:33:03.147 704/T13503] L[0005]: N/A (0x64487 -> addr2line 0x64487 -e /usr/bin/pihole-FTL)
[2022-05-10 02:33:03.147 704/T13503] B[0006]: /lib/x86_64-linux-gnu/libpthread.so.0(+0x8ea7) [0x7fa5f6673ea7]
[2022-05-10 02:33:03.147 704/T13503] B[0007]: /lib/x86_64-linux-gnu/libc.so.6(clone+0x3f) [0x7fa5f65a3def]
[2022-05-10 02:33:03.147 704/T13503] ------ Listing content of directory /dev/shm ------
[2022-05-10 02:33:03.147 704/T13503] File Mode User:Group      Size  Filename
[2022-05-10 02:33:03.147 704/T13503] rwxrwxrwx root:root       260   .
[2022-05-10 02:33:03.147 704/T13503] rwxr-xr-x root:root         3K  ..
[2022-05-10 02:33:03.147 704/T13503] rw------- root:root         4K  FTL-per-client-regex
[2022-05-10 02:33:03.147 704/T13503] rw------- root:root        22M  FTL-dns-cache
[2022-05-10 02:33:03.147 704/T13503] rw------- root:root         8K  FTL-overTime
[2022-05-10 02:33:03.147 704/T13503] rw------- root:root       230M  FTL-queries
[2022-05-10 02:33:03.147 704/T13503] rw------- root:root        20K  FTL-upstreams
[2022-05-10 02:33:03.147 704/T13503] rw------- root:root       356K  FTL-clients
[2022-05-10 02:33:03.147 704/T13503] rw------- root:root        34M  FTL-domains
[2022-05-10 02:33:03.147 704/T13503] rw------- root:root        28M  FTL-strings
[2022-05-10 02:33:03.148 704/T13503] rw------- root:root        12   FTL-settings
[2022-05-10 02:33:03.148 704/T13503] rw------- root:root       240   FTL-counters
[2022-05-10 02:33:03.148 704/T13503] rw------- root:root        88   FTL-lock
[2022-05-10 02:33:03.148 704/T13503] ---------------------------------------------------
[2022-05-10 02:33:03.148 704/T13503] Please also include some lines from above the !!!!!!!!! header.
[2022-05-10 02:33:03.148 704/T13503] Thank you for helping us to improve our FTL engine!
[2022-05-10 02:33:03.148 704/T13503] Waiting for threads to join
[2022-05-10 02:33:03.148 704/T13503] Thread telnet-IPv4 (0) is idle, terminating it.
[2022-05-10 02:33:03.148 704/T13503] Thread telnet-IPv6 (1) is idle, terminating it.
[2022-05-10 02:33:03.148 704/T13503] Thread telnet-socket (2) is idle, terminating it.
[2022-05-10 02:33:03.148 704/T13503] Thread database (3) is idle, terminating it.
[2022-05-10 02:33:03.148 704/T13503] Thread housekeeper (4) is idle, terminating it.
[2022-05-10 02:33:03.148 704/T13503] Thread DNS client (5) is idle, terminating it.
[2022-05-10 02:33:03.148 704/T13503] All threads joined
[2022-05-10 02:33:03.148 704/T13503] Joining API worker thread 0

Sorry for the delay in replying! The last two weeks have been very busy again...

This sounds like your virtual machine has access issues for shared memory objects in /dev/shm/

Could you check the permissions? They should be similar to

me@ubuntu-server:~$ ls -lh /dev/shm/
total 1,4M
-rw------- 1 pihole pihole  84K Mai 19 08:22 FTL-clients
-rw------- 1 pihole pihole  244 Mai 19 08:22 FTL-counters
-rw------- 1 pihole pihole 8,0K Mai 19 08:22 FTL-dns-cache
-rw------- 1 pihole pihole  12K Mai 19 08:34 FTL-domains
-rw------- 1 pihole pihole   88 Mai 19 08:22 FTL-lock
-rw------- 1 pihole pihole 8,0K Mai 19 08:22 FTL-overTime
-rw------- 1 pihole pihole 4,0K Mai 19 08:22 FTL-per-client-regex
-rw------- 1 pihole pihole 896K Mai 19 08:29 FTL-queries
-rw------- 1 pihole pihole   12 Mai 19 08:22 FTL-settings
-rw------- 1 pihole pihole  80K Mai 19 08:22 FTL-strings
-rw------- 1 pihole pihole 308K Mai 19 08:22 FTL-upstreams

Also, the mount point of /dev/shm will be of interest here:

me@ubuntu-server:~$ mount | grep shm
tmpfs  on  /dev/shm type tmpfs (rw,nosuid,nodev)

and

me@ubuntu-server:~$ df -h /dev/shm
Filesystem         Size  Used  Avail  Use%  Mounted on
tmpfs              1,9G  1,4M   1,9G    1%  /dev/shm

Do you do anything fancy with shared memory in your virtualization?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.