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

FTL v54b4ad93 crashes sometimes (several times today) for unknown reasons #2112

Closed
schuettecarsten opened this issue Nov 8, 2024 · 57 comments

Comments

@schuettecarsten
Copy link

FTL crashed for unknown reasons several times today.
Here is a full log;

  [i] Setting up user & group for the pihole user
  [i] PIHOLE_UID not set in environment, using default (100)
  [i] PIHOLE_GID not set in environment, using default (101)

  [i] Starting FTL configuration
  [i] Password already set in config file
  [i] Starting crond for scheduled scripts. Randomizing times for gravity and update checker

  [i] Ensuring logrotate script exists in /etc/pihole

  [i] Gravity migration checks
  [i] Existing gravity database found

  [i] pihole-FTL pre-start checks
  [i] Setting capabilities on pihole-FTL where possible
  [i] Applying the following caps to pihole-FTL:
        * CAP_CHOWN
        * CAP_NET_BIND_SERVICE
        * CAP_NET_RAW
        * CAP_NET_ADMIN
        * CAP_SYS_NICE

  [i] Starting pihole-FTL (no-daemon) as pihole

Core
    Version is 112b961 (Latest: null)
    Branch is development
    Hash is 112b9617 (Latest: 112b9617)
Web
    Version is c689fdc (Latest: null)
    Branch is development
    Hash is c689fdc7 (Latest: c689fdc7)
FTL
    Version is vDev-54b4ad9 (Latest: null)
    Branch is development
    Hash is 54b4ad93 (Latest: 54b4ad93)

2024-11-08 08:24:28.553 CET [52M] INFO: ########## FTL started on 2323f1bec446! ##########
2024-11-08 08:24:28.554 CET [52M] INFO: FTL branch: development
2024-11-08 08:24:28.554 CET [52M] INFO: FTL version: vDev-54b4ad9
2024-11-08 08:24:28.554 CET [52M] INFO: FTL commit: 54b4ad93
2024-11-08 08:24:28.554 CET [52M] INFO: FTL date: 2024-11-07 20:27:52 +0100
2024-11-08 08:24:28.554 CET [52M] INFO: FTL user: pihole
2024-11-08 08:24:28.554 CET [52M] INFO: Compiled for linux/arm64/v8 (compiled on CI) using cc (Alpine 13.2.1_git20240309) 13.2.1 20240309
2024-11-08 08:24:28.559 CET [52M] INFO: Wrote config file:
2024-11-08 08:24:28.559 CET [52M] INFO:  - 150 total entries
2024-11-08 08:24:28.559 CET [52M] INFO:  - 132 entries are default
2024-11-08 08:24:28.559 CET [52M] INFO:  - 18 entries are modified
2024-11-08 08:24:28.559 CET [52M] INFO:  - 0 entries are forced through environment
2024-11-08 08:24:28.561 CET [52M] INFO: Parsed config file /etc/pihole/pihole.toml successfully
2024-11-08 08:24:28.566 CET [52M] INFO: PID of FTL process: 52
2024-11-08 08:24:28.567 CET [52M] INFO: listening on 0.0.0.0 port 53
2024-11-08 08:24:28.567 CET [52M] INFO: listening on :: port 53
2024-11-08 08:24:28.569 CET [52M] INFO: PID of FTL process: 52
2024-11-08 08:24:28.571 CET [52M] INFO: Database version is 20
2024-11-08 08:24:28.572 CET [52M] INFO: Database successfully initialized
2024-11-08 08:24:33.978 CET [52M] INFO: Imported 172837 queries from the on-disk database (it has 17677658 rows)
2024-11-08 08:24:33.978 CET [52M] INFO: Parsing queries in database
2024-11-08 08:24:34.070 CET [52M] INFO:   10000 queries parsed...
2024-11-08 08:24:34.130 CET [52M] INFO:   20000 queries parsed...
2024-11-08 08:24:34.187 CET [52M] INFO:   30000 queries parsed...
2024-11-08 08:24:34.256 CET [52M] INFO:   40000 queries parsed...
2024-11-08 08:24:34.336 CET [52M] INFO:   50000 queries parsed...
2024-11-08 08:24:34.401 CET [52M] INFO:   60000 queries parsed...
2024-11-08 08:24:34.471 CET [52M] INFO:   70000 queries parsed...
2024-11-08 08:24:34.538 CET [52M] INFO:   80000 queries parsed...
2024-11-08 08:24:34.619 CET [52M] INFO:   90000 queries parsed...
2024-11-08 08:24:34.691 CET [52M] INFO:   100000 queries parsed...
2024-11-08 08:24:34.762 CET [52M] INFO:   110000 queries parsed...
2024-11-08 08:24:34.836 CET [52M] INFO:   120000 queries parsed...
2024-11-08 08:24:34.908 CET [52M] INFO:   130000 queries parsed...
2024-11-08 08:24:34.970 CET [52M] INFO:   140000 queries parsed...
2024-11-08 08:24:35.033 CET [52M] INFO:   150000 queries parsed...
2024-11-08 08:24:35.099 CET [52M] INFO:   160000 queries parsed...
2024-11-08 08:24:35.164 CET [52M] INFO:   170000 queries parsed...
2024-11-08 08:24:35.188 CET [52M] INFO: Imported 172835 queries from the long-term database
2024-11-08 08:24:35.188 CET [52M] INFO:  -> Total DNS queries: 172835
2024-11-08 08:24:35.188 CET [52M] INFO:  -> Cached DNS queries: 103540
2024-11-08 08:24:35.188 CET [52M] INFO:  -> Forwarded DNS queries: 29905
2024-11-08 08:24:35.188 CET [52M] INFO:  -> Blocked DNS queries: 35721
2024-11-08 08:24:35.188 CET [52M] INFO:  -> Unknown DNS queries: 0
2024-11-08 08:24:35.188 CET [52M] INFO:  -> Unique domains: 2394
2024-11-08 08:24:35.188 CET [52M] INFO:  -> Unique clients: 93
2024-11-08 08:24:35.188 CET [52M] INFO:  -> DNS cache records: 1119
2024-11-08 08:24:35.188 CET [52M] INFO:  -> Known forward destinations: 2
2024-11-08 08:24:35.430 CET [52M] INFO: NTP sync is disabled
2024-11-08 08:24:35.431 CET [52M] INFO: FTL is running as user pihole (UID 100)
2024-11-08 08:24:35.431 CET [52M] INFO: Reading certificate from /etc/pihole/tls.pem ...
2024-11-08 08:24:35.432 CET [52M] INFO: Using SSL/TLS certificate file /etc/pihole/tls.pem
2024-11-08 08:24:35.437 CET [52M] INFO: Restored 0 API sessions from the database
2024-11-08 08:24:35.442 CET [52M] INFO: Blocking status is enabled
2024-11-08 08:24:35.877 CET [52/T157] INFO: Compiled 5 allow and 3 deny regex for 93 clients in 338.9 msec
2024-11-08 08:24:35.883 CET [174/F52] INFO: Reloading externally changed regular expressions
2024-11-08 08:24:35.908 CET [174/F52] INFO: Compiled 5 allow and 3 deny regex for 93 clients in 25.2 msec
2024-11-08 08:24:35.916 CET [165/F52] INFO: Reloading externally changed regular expressions
2024-11-08 08:24:35.936 CET [165/F52] INFO: Compiled 5 allow and 3 deny regex for 93 clients in 19.8 msec
2024-11-08 08:24:35.937 CET [163/F52] INFO: Reloading externally changed regular expressions
2024-11-08 08:24:35.959 CET [163/F52] INFO: Compiled 5 allow and 3 deny regex for 93 clients in 21.8 msec
2024-11-08 08:24:35.960 CET [170/F52] INFO: Reloading externally changed regular expressions
2024-11-08 08:24:35.979 CET [170/F52] INFO: Compiled 5 allow and 3 deny regex for 93 clients in 19.6 msec
2024-11-08 08:24:35.980 CET [166/F52] INFO: Reloading externally changed regular expressions
2024-11-08 08:24:36.007 CET [166/F52] INFO: Compiled 5 allow and 3 deny regex for 93 clients in 27.3 msec
2024-11-08 08:24:36.009 CET [52M] INFO: Reloading externally changed regular expressions
2024-11-08 08:24:36.307 CET [52M] INFO: Compiled 5 allow and 3 deny regex for 93 clients in 297.0 msec
2024-11-08 08:24:36.308 CET [169/F52] INFO: Reloading externally changed regular expressions
2024-11-08 08:24:36.570 CET [169/F52] INFO: Compiled 5 allow and 3 deny regex for 93 clients in 262.3 msec
2024-11-08 08:24:36.571 CET [168/F52] INFO: Reloading externally changed regular expressions
2024-11-08 08:24:36.599 CET [168/F52] INFO: Compiled 5 allow and 3 deny regex for 93 clients in 27.9 msec
2024-11-08 08:24:36.600 CET [174/F52] INFO: Reloading externally changed regular expressions
2024-11-08 08:24:36.881 CET [174/F52] INFO: Compiled 5 allow and 3 deny regex for 93 clients in 280.6 msec
2024-11-08 08:24:36.883 CET [175/F52] INFO: Reloading externally changed regular expressions
2024-11-08 08:24:36.901 CET [175/F52] INFO: Compiled 5 allow and 3 deny regex for 93 clients in 18.4 msec
2024-11-08 08:24:36.914 CET [173/F52] INFO: Reloading externally changed regular expressions
2024-11-08 08:24:36.933 CET [173/F52] INFO: Compiled 5 allow and 3 deny regex for 93 clients in 18.6 msec
2024-11-08 08:24:36.933 CET [172/F52] INFO: Reloading externally changed regular expressions
2024-11-08 08:24:36.959 CET [172/F52] INFO: Compiled 5 allow and 3 deny regex for 93 clients in 24.7 msec
2024-11-08 08:24:36.959 CET [174/F52] INFO: Reloading externally changed regular expressions
2024-11-08 08:24:36.981 CET [174/F52] INFO: Compiled 5 allow and 3 deny regex for 93 clients in 21.5 msec
2024-11-08 08:24:36.981 CET [168/F52] INFO: Reloading externally changed regular expressions
2024-11-08 08:24:37.001 CET [168/F52] INFO: Compiled 5 allow and 3 deny regex for 93 clients in 19.3 msec
2024-11-08 08:24:37.002 CET [52M] INFO: Reloading externally changed regular expressions
2024-11-08 08:24:37.278 CET [52M] INFO: Compiled 5 allow and 3 deny regex for 93 clients in 276.0 msec
2024-11-08 08:24:37.279 CET [173/F52] INFO: Reloading externally changed regular expressions
2024-11-08 08:24:37.297 CET [173/F52] INFO: Compiled 5 allow and 3 deny regex for 93 clients in 18.1 msec
2024-11-08 08:24:37.297 CET [175/F52] INFO: Reloading externally changed regular expressions
2024-11-08 08:24:37.316 CET [175/F52] INFO: Compiled 5 allow and 3 deny regex for 93 clients in 18.1 msec
2024-11-08 08:24:37.317 CET [171/F52] INFO: Reloading externally changed regular expressions
2024-11-08 08:24:37.338 CET [171/F52] INFO: Compiled 5 allow and 3 deny regex for 93 clients in 21.5 msec
2024-11-08 08:24:37.343 CET [167/F52] INFO: Reloading externally changed regular expressions
2024-11-08 08:24:37.612 CET [167/F52] INFO: Compiled 5 allow and 3 deny regex for 93 clients in 268.0 msec
2024-11-08 08:24:37.619 CET [164/F52] INFO: Reloading externally changed regular expressions
2024-11-08 08:24:37.888 CET [164/F52] INFO: Compiled 5 allow and 3 deny regex for 93 clients in 268.7 msec
2024-11-08 08:24:37.893 CET [52M] INFO: Reloading externally changed regular expressions
2024-11-08 08:24:38.146 CET [52M] INFO: Compiled 5 allow and 3 deny regex for 93 clients in 253.1 msec
2024-11-08 08:37:21.212 CET [52M] INFO: Rate-limiting 192.168.11.1 for at least 4 seconds
2024-11-08 08:37:25.562 CET [52/T158] INFO: Ending rate-limitation of 192.168.11.1
2024-11-08 08:37:29.178 CET [52M] INFO: Rate-limiting 192.168.11.1 for at least 6 seconds
2024-11-08 08:37:35.562 CET [52/T158] INFO: Ending rate-limitation of 192.168.11.1
2024-11-08 08:37:42.262 CET [52M] INFO: Rate-limiting 192.168.11.1 for at least 3 seconds
2024-11-08 08:37:45.562 CET [52/T158] INFO: Ending rate-limitation of 192.168.11.1
2024-11-08 08:55:51.008 CET [52/T157] INFO: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2024-11-08 08:55:51.008 CET [52/T157] INFO: ---------------------------->  FTL crashed!  <----------------------------
2024-11-08 08:55:51.008 CET [52/T157] INFO: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2024-11-08 08:55:51.008 CET [52/T157] INFO: Please report a bug at https://github.com/pi-hole/FTL/issues
2024-11-08 08:55:51.008 CET [52/T157] INFO: and include in your report already the following details:
2024-11-08 08:55:51.008 CET [52/T157] INFO: FTL has been running for 1883 seconds
2024-11-08 08:55:51.009 CET [52/T157] INFO: FTL branch: development
2024-11-08 08:55:51.009 CET [52/T157] INFO: FTL version: vDev-54b4ad9
2024-11-08 08:55:51.009 CET [52/T157] INFO: FTL commit: 54b4ad93
2024-11-08 08:55:51.009 CET [52/T157] INFO: FTL date: 2024-11-07 20:27:52 +0100
2024-11-08 08:55:51.009 CET [52/T157] INFO: FTL user: started as pihole, ended as pihole
2024-11-08 08:55:51.009 CET [52/T157] INFO: Compiled for linux/arm64/v8 (compiled on CI) using cc (Alpine 13.2.1_git20240309) 13.2.1 20240309
2024-11-08 08:55:51.009 CET [52/T157] INFO: Process details: MID: 52
2024-11-08 08:55:51.009 CET [52/T157] INFO:                  PID: 52
2024-11-08 08:55:51.009 CET [52/T157] INFO:                  TID: 157
2024-11-08 08:55:51.010 CET [52/T157] INFO:                  Name: database
2024-11-08 08:55:51.010 CET [52/T157] INFO: Received signal: Segmentation fault
2024-11-08 08:55:51.010 CET [52/T157] INFO:      at address: 0x66540700000582
2024-11-08 08:55:51.010 CET [52/T157] INFO:      with code:  SEGV_MAPERR (Address not mapped to object)
2024-11-08 08:55:51.010 CET [52/T157] INFO: !!! INFO: pihole-FTL has not been compiled with glibc/backtrace support, not generating one !!!
2024-11-08 08:55:51.010 CET [52/T157] INFO: ------ Listing content of directory /dev/shm ------
2024-11-08 08:55:51.010 CET [52/T157] INFO: File Mode User:Group      Size  Filename
2024-11-08 08:55:51.010 CET [52/T157] INFO: rwxrwxrwx root:root       360   .
2024-11-08 08:55:51.011 CET [52/T157] INFO: rwxr-xr-x root:root       320   ..
2024-11-08 08:55:51.011 CET [52/T157] INFO: rw------- pihole:pihole    88   FTL-lock
2024-11-08 08:55:51.011 CET [52/T157] INFO: rw------- pihole:pihole   328   FTL-counters
2024-11-08 08:55:51.012 CET [52/T157] INFO: rw------- pihole:pihole   136   FTL-settings
2024-11-08 08:55:51.012 CET [52/T157] INFO: rw------- pihole:pihole   164K  FTL-strings
2024-11-08 08:55:51.012 CET [52/T157] INFO: rw------- pihole:pihole   102K  FTL-domains
2024-11-08 08:55:51.013 CET [52/T157] INFO: rw------- pihole:pihole   348K  FTL-clients
2024-11-08 08:55:51.013 CET [52/T157] INFO: rw------- pihole:pihole    29K  FTL-upstreams
2024-11-08 08:55:51.013 CET [52/T157] INFO: rw------- pihole:pihole    13M  FTL-queries
2024-11-08 08:55:51.013 CET [52/T157] INFO: rw------- pihole:pihole     8K  FTL-overTime
2024-11-08 08:55:51.014 CET [52/T157] INFO: rw------- pihole:pihole   102K  FTL-dns-cache
2024-11-08 08:55:51.014 CET [52/T157] INFO: rw------- pihole:pihole     4K  FTL-per-client-regex
2024-11-08 08:55:51.014 CET [52/T157] INFO: rw------- pihole:pihole   569K  FTL-fifo-log
2024-11-08 08:55:51.015 CET [52/T157] INFO: rw------- pihole:pihole     4K  FTL-clients-lookup
2024-11-08 08:55:51.015 CET [52/T157] INFO: rw------- pihole:pihole    29K  FTL-domains-lookup
2024-11-08 08:55:51.015 CET [52/T157] INFO: rw------- pihole:pihole    20K  FTL-dns-cache-lookup
2024-11-08 08:55:51.015 CET [52/T157] INFO: rw------- pihole:pihole   786K  FTL-recycler
2024-11-08 08:55:51.016 CET [52/T157] INFO: ---------------------------------------------------
2024-11-08 08:55:51.016 CET [52/T157] INFO: Please also include some lines from above the !!!!!!!!! header.
2024-11-08 08:55:51.016 CET [52/T157] INFO: Thank you for helping us to improve our FTL engine!
2024-11-08 08:55:51.016 CET [52/T157] INFO: Waiting for threads to join
2024-11-08 08:55:51.038 CET [52/T160] INFO: Terminating timer thread
2024-11-08 08:55:51.362 CET [52/T159] INFO: Terminating resolver thread
2024-11-08 08:55:51.682 CET [52/T158] INFO: Terminating GC thread
2024-11-08 08:55:53.016 CET [52/T157] INFO: Thread database (0) is still busy, cancelling it.
2024-11-08 08:55:53.017 CET [52M] ERROR: Error when obtaining outer SHM lock: Previous owner died
2024-11-08 08:55:53.017 CET [52M] ERROR: Error when obtaining inner SHM lock: Previous owner died
/bin/bash: line 1:    52 Segmentation fault      /usr/bin/pihole-FTL no-daemon > /dev/null
2024-11-08 08:58:41.583 CET [52/T224] INFO: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2024-11-08 08:58:41.583 CET [52/T224] INFO: ---------------------------->  FTL crashed!  <----------------------------
2024-11-08 08:58:41.583 CET [52/T224] INFO: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2024-11-08 08:58:41.583 CET [52/T224] INFO: Please report a bug at https://github.com/pi-hole/FTL/issues
2024-11-08 08:58:41.584 CET [52/T224] INFO: and include in your report already the following details:
2024-11-08 08:58:41.584 CET [52/T224] INFO: FTL has been running for 2053 seconds
2024-11-08 08:58:41.584 CET [52/T224] INFO: FTL branch: development
2024-11-08 08:58:41.584 CET [52/T224] INFO: FTL version: vDev-54b4ad9
2024-11-08 08:58:41.584 CET [52/T224] INFO: FTL commit: 54b4ad93
2024-11-08 08:58:41.584 CET [52/T224] INFO: FTL date: 2024-11-07 20:27:52 +0100
2024-11-08 08:58:41.584 CET [52/T224] INFO: FTL user: started as pihole, ended as pihole
2024-11-08 08:58:41.584 CET [52/T224] INFO: Compiled for linux/arm64/v8 (compiled on CI) using cc (Alpine 13.2.1_git20240309) 13.2.1 20240309
2024-11-08 08:58:41.584 CET [52/T224] INFO: Process details: MID: 52
2024-11-08 08:58:41.585 CET [52/T224] INFO:                  PID: 52
2024-11-08 08:58:41.585 CET [52/T224] INFO:                  TID: 224
2024-11-08 08:58:41.585 CET [52/T224] INFO:                  Name: civetweb-worker
2024-11-08 08:58:41.585 CET [52/T224] INFO: Received signal: Segmentation fault
2024-11-08 08:58:41.585 CET [52/T224] INFO:      at address: 0x66540700000582
2024-11-08 08:58:41.585 CET [52/T224] INFO:      with code:  SEGV_MAPERR (Address not mapped to object)
2024-11-08 08:58:41.585 CET [52/T224] INFO: !!! INFO: pihole-FTL has not been compiled with glibc/backtrace support, not generating one !!!
2024-11-08 08:58:41.585 CET [52/T224] INFO: ------ Listing content of directory /dev/shm ------
2024-11-08 08:58:41.586 CET [52/T224] INFO: File Mode User:Group      Size  Filename
2024-11-08 08:58:41.586 CET [52/T224] INFO: rwxrwxrwx root:root       360   .
2024-11-08 08:58:41.586 CET [52/T224] INFO: rwxr-xr-x root:root       320   ..
2024-11-08 08:58:41.586 CET [52/T224] INFO: rw------- pihole:pihole    88   FTL-lock
2024-11-08 08:58:41.587 CET [52/T224] INFO: rw------- pihole:pihole   328   FTL-counters
2024-11-08 08:58:41.587 CET [52/T224] INFO: rw------- pihole:pihole   136   FTL-settings
2024-11-08 08:58:41.587 CET [52/T224] INFO: rw------- pihole:pihole   164K  FTL-strings
2024-11-08 08:58:41.587 CET [52/T224] INFO: rw------- pihole:pihole   102K  FTL-domains
2024-11-08 08:58:41.588 CET [52/T184] INFO: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2024-11-08 08:58:41.588 CET [52/T224] INFO: rw------- pihole:pihole   348K  FTL-clients
2024-11-08 08:58:41.588 CET [52/T184] INFO: ---------------------------->  FTL crashed!  <----------------------------
2024-11-08 08:58:41.588 CET [52/T184] INFO: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2024-11-08 08:58:41.588 CET [52/T184] INFO: Please report a bug at https://github.com/pi-hole/FTL/issues
2024-11-08 08:58:41.588 CET [52/T184] INFO: and include in your report already the following details:
2024-11-08 08:58:41.588 CET [52/T224] INFO: rw------- pihole:pihole    29K  FTL-upstreams
2024-11-08 08:58:41.588 CET [52/T184] INFO: FTL has been running for 2053 seconds
2024-11-08 08:58:41.588 CET [52/T184] INFO: FTL branch: development
2024-11-08 08:58:41.588 CET [52/T184] INFO: FTL version: vDev-54b4ad9
2024-11-08 08:58:41.588 CET [52/T184] INFO: FTL commit: 54b4ad93
2024-11-08 08:58:41.588 CET [52/T224] INFO: rw------- pihole:pihole    13M  FTL-queries
2024-11-08 08:58:41.588 CET [52/T184] INFO: FTL date: 2024-11-07 20:27:52 +0100
2024-11-08 08:58:41.588 CET [52/T184] INFO: FTL user: started as pihole, ended as pihole
2024-11-08 08:58:41.589 CET [52/T184] INFO: Compiled for linux/arm64/v8 (compiled on CI) using cc (Alpine 13.2.1_git20240309) 13.2.1 20240309
2024-11-08 08:58:41.589 CET [52/T224] INFO: rw------- root:pihole       8K  FTL-overTime
2024-11-08 08:58:41.589 CET [52/T184] INFO: Process details: MID: 52
2024-11-08 08:58:41.589 CET [52/T184] INFO:                  PID: 52
2024-11-08 08:58:41.589 CET [52/T184] INFO:                  TID: 184
2024-11-08 08:58:41.589 CET [52/T184] INFO:                  Name: civetweb-worker
2024-11-08 08:58:41.589 CET [52/T224] INFO: rw------- pihole:pihole   102K  FTL-dns-cache
2024-11-08 08:58:41.589 CET [52/T184] INFO: Received signal: Segmentation fault
2024-11-08 08:58:41.589 CET [52/T184] INFO:      at address: 0x66540700000582
2024-11-08 08:58:41.589 CET [52/T184] INFO:      with code:  SEGV_MAPERR (Address not mapped to object)
2024-11-08 08:58:41.589 CET [52/T184] INFO: !!! INFO: pihole-FTL has not been compiled with glibc/backtrace support, not generating one !!!
2024-11-08 08:58:41.589 CET [52/T224] INFO: rw------- pihole:pihole     4K  FTL-per-client-regex
2024-11-08 08:58:41.589 CET [52/T184] INFO: ------ Listing content of directory /dev/shm ------
2024-11-08 08:58:41.589 CET [52/T184] INFO: File Mode User:Group      Size  Filename
2024-11-08 08:58:41.589 CET [52/T224] INFO: rw------- pihole:pihole   569K  FTL-fifo-log
2024-11-08 08:58:41.590 CET [52/T184] INFO: rwxrwxrwx root:root       360   .

  [i] pihole-FTL exited with status 139
@DL6ER
Copy link
Member

DL6ER commented Nov 9, 2024

Could you please run pihole-FTL connected to a debugger so we can find out where inside pihole-FTL this crash happens?

https://deploy-preview-338--pihole-docs.netlify.app/ftldns/debugging/

has all the details incl. a special section how to do it inside a docker container.

@bermeitinger-b
Copy link

bermeitinger-b commented Nov 10, 2024

I can see the same happening both for nightly and development tags.

This is what is shown after the mentioned debugging procedure inside the docker container:

Thread 1 "pihole-FTL" received signal SIG37, Real-time event 37.
__cp_end () at src/thread/x86_64/syscall_cp.s:29
29      in src/thread/x86_64/syscall_cp.s
(gdb) backtrace
#0  __cp_end () at src/thread/x86_64/syscall_cp.s:29
#1  0x00000000007f19e3 in __syscall_cp_c (nr=7, u=<optimized out>, v=<optimized out>, w=<optimized out>, x=<optimized out>, 
    y=<optimized out>, z=0) at src/thread/pthread_cancel.c:33
#2  0x00000000007ea619 in poll (fds=<optimized out>, n=<optimized out>, timeout=timeout@entry=-1) at src/select/poll.c:9
#3  0x00000000004e9762 in poll (__s=-1, __n=<optimized out>, __f=<optimized out>) at /usr/include/fortify/poll.h:40
#4  0x00000000004bafbc in main_dnsmasq (argc=<optimized out>, argv=<optimized out>) at /app/src/dnsmasq/dnsmasq.c:1183
#5  0x00000000004020d7 in main (argc=<optimized out>, argv=0x7ffe637f30e8) at /app/src/main.c:123

It doesn't look very helpful.

@DL6ER
Copy link
Member

DL6ER commented Nov 10, 2024

Seems, you need to need to add SIG37 nostop similar to the other signals in the documentation to skip this useless signal. You are perfectly right about it not being useful.

@bermeitinger-b
Copy link

I have another with

Thread 4 "housekeeper" received signal SIG33, Real-time event 33.
[Switching to LWP 113]
__cp_end () at src/thread/x86_64/syscall_cp.s:29
29      in src/thread/x86_64/syscall_cp.s
(gdb) backtrace
#0  __cp_end () at src/thread/x86_64/syscall_cp.s:29
#1  0x00000000007f19e3 in __syscall_cp_c (nr=23, u=<optimized out>, v=<optimized out>, w=<optimized out>, x=<optimized out>, 
    y=<optimized out>, z=0) at src/thread/pthread_cancel.c:33
#2  0x00000000007ea700 in select (n=n@entry=0, rfds=rfds@entry=0x0, wfds=wfds@entry=0x0, efds=efds@entry=0x0, tv=tv@entry=0x734f1354ba00)
    at src/select/select.c:39
#3  0x00000000006c0e29 in FTLselect (nfds=nfds@entry=0, readfds=readfds@entry=0x0, writefds=writefds@entry=0x0, 
    exceptfds=exceptfds@entry=0x0, timeout=timeout@entry=0x734f1354ba00, file=file@entry=0x80069f "/app/src/timers.c", 
    func=0x867d40 <__FUNCTION__.0> "sleepms", line=65) at /app/src/syscalls/select.c:25
#4  0x000000000042695a in sleepms (milliseconds=<optimized out>) at /app/src/timers.c:65
#5  0x0000000000426661 in thread_sleepms (thread=thread@entry=GC, milliseconds=<optimized out>) at /app/src/signals.c:496
#6  0x0000000000418357 in GC_thread (val=<optimized out>) at /app/src/gc.c:645
#7  0x00000000007f26d0 in start (p=0x734f1354bb00) at src/thread/pthread_create.c:207
#8  0x00000000007f3d5c in __clone () at src/thread/x86_64/clone.s:22
Backtrace stopped: frame did not save the PC

@DL6ER
Copy link
Member

DL6ER commented Nov 10, 2024

Okay, so SIG33 is another one for the nostop here. Sorry about that. What we are looking for is a SIGSEGV

@pralor-bot
Copy link

This issue has been mentioned on Pi-hole Userspace. There might be relevant details there:

https://discourse.pi-hole.net/t/pi-hole-stopped-responding/73931/4

@bermeitinger-b
Copy link

Thanks for your patience. However, when also adding SIG33 nostop, gdb doesn't stop at all:

[Detaching after fork from child process 197]

Thread 1 "pihole-FTL" received signal SIG37, Real-time event 37.

Thread 1 "pihole-FTL" received signal SIGTERM, Terminated.

Thread 1 "pihole-FTL" received signal SIG41, Real-time event 41.
[LWP 136 exited]
[LWP 139 exited]

Thread 2 "ntp-client" received signal SIG33, Real-time event 33.

Thread 4 "housekeeper" received signal SIG33, Real-time event 33.

Thread 5 "dns-client" received signal SIG33, Real-time event 33.
[LWP 137 exited]
[LWP 138 exited]
[LWP 135 exited]
[LWP 141 exited]
[LWP 140 exited]
[Inferior 1 (process 48) exited with code 01]

@DL6ER
Copy link
Member

DL6ER commented Nov 11, 2024

This means there was no crash. Why FTL exited with exit code 01 will be found in /var/log/Pi-hole/FTL.log. Unfortunately, the debugger cannot see this.

@bermeitinger-b
Copy link

This is what the log contains:

2024-11-11 10:02:01.564 CET [3270/F52] INFO: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2024-11-11 10:02:01.564 CET [3270/F52] INFO: ---------------------------->  FTL crashed!  <----------------------------
2024-11-11 10:02:01.564 CET [3270/F52] INFO: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2024-11-11 10:02:01.564 CET [3270/F52] INFO: Please report a bug at https://github.com/pi-hole/FTL/issues
2024-11-11 10:02:01.564 CET [3270/F52] INFO: and include in your report already the following details:
2024-11-11 10:02:01.564 CET [3270/F52] INFO: FTL has been running for 4195 seconds
2024-11-11 10:02:01.564 CET [3270/F52] INFO: FTL branch: development
2024-11-11 10:02:01.565 CET [3270/F52] INFO: FTL version: vDev-848367f
2024-11-11 10:02:01.565 CET [3270/F52] INFO: FTL commit: 848367fa
2024-11-11 10:02:01.565 CET [3270/F52] INFO: FTL date: 2024-11-08 19:13:07 +0100
2024-11-11 10:02:01.565 CET [3270/F52] INFO: FTL user: started as pihole, ended as pihole
2024-11-11 10:02:01.565 CET [3270/F52] INFO: Compiled for linux/amd64 (compiled on CI) using cc (Alpine 13.2.1_git20240309) 13.2.1 20240309
2024-11-11 10:02:01.565 CET [3270/F52] INFO: Process details: MID: 52
2024-11-11 10:02:01.565 CET [3270/F52] INFO:                  PID: 3270
2024-11-11 10:02:01.565 CET [3270/F52] INFO:                  TID: 3270
2024-11-11 10:02:01.565 CET [3270/F52] INFO:                  Name: pihole-FTL
2024-11-11 10:02:01.565 CET [3270/F52] INFO: Received signal: Segmentation fault
2024-11-11 10:02:01.565 CET [3270/F52] INFO:      at address: 0x100e00003c08
2024-11-11 10:02:01.565 CET [3270/F52] INFO:      with code:  SEGV_MAPERR (Address not mapped to object)
2024-11-11 10:02:01.565 CET [3270/F52] INFO: !!! INFO: pihole-FTL has not been compiled with glibc/backtrace support, not generating one !!!
2024-11-11 10:02:01.565 CET [3270/F52] INFO: ------ Listing content of directory /dev/shm ------
2024-11-11 10:02:01.565 CET [3270/F52] INFO: File Mode User:Group      Size  Filename
2024-11-11 10:02:01.565 CET [3270/F52] INFO: rwxrwxrwx root:root       360   .
2024-11-11 10:02:01.565 CET [3270/F52] INFO: rwxr-xr-x root:root       340   ..
2024-11-11 10:02:01.565 CET [3270/F52] INFO: rw------- pihole:pihole    88   FTL-lock
2024-11-11 10:02:01.565 CET [3270/F52] INFO: rw------- pihole:pihole   328   FTL-counters
2024-11-11 10:02:01.566 CET [3270/F52] INFO: rw------- pihole:pihole   136   FTL-settings
2024-11-11 10:02:01.566 CET [3270/F52] INFO: rw------- pihole:pihole   123K  FTL-strings
2024-11-11 10:02:01.566 CET [3270/F52] INFO: rw------- pihole:pihole    78K  FTL-domains
2024-11-11 10:02:01.566 CET [3270/F52] INFO: rw------- pihole:pihole   696K  FTL-clients
2024-11-11 10:02:01.566 CET [3270/F52] INFO: rw------- pihole:pihole    29K  FTL-upstreams
2024-11-11 10:02:01.566 CET [3270/F52] INFO: rw------- pihole:pihole     5M  FTL-queries
2024-11-11 10:02:01.566 CET [3270/F52] INFO: rw------- pihole:pihole     8K  FTL-overTime
2024-11-11 10:02:01.566 CET [3270/F52] INFO: rw------- pihole:pihole   123K  FTL-dns-cache
2024-11-11 10:02:01.566 CET [3270/F52] INFO: rw------- pihole:pihole     8K  FTL-per-client-regex
2024-11-11 10:02:01.566 CET [3270/F52] INFO: rw------- pihole:pihole   569K  FTL-fifo-log
2024-11-11 10:02:01.566 CET [3270/F52] INFO: rw------- pihole:pihole     8K  FTL-clients-lookup
2024-11-11 10:02:01.566 CET [3270/F52] INFO: rw------- pihole:pihole    20K  FTL-domains-lookup
2024-11-11 10:02:01.566 CET [3270/F52] INFO: rw------- pihole:pihole    16K  FTL-dns-cache-lookup
2024-11-11 10:02:01.566 CET [3270/F52] INFO: rw------- pihole:pihole   786K  FTL-recycler
2024-11-11 10:02:01.566 CET [3270/F52] INFO: ---------------------------------------------------
2024-11-11 10:02:01.566 CET [3270/F52] INFO: Please also include some lines from above the !!!!!!!!! header.
2024-11-11 10:02:01.567 CET [3270/F52] INFO: Thank you for helping us to improve our FTL engine!
2024-11-11 10:02:01.567 CET [3270/F52] INFO: Asking parent pihole-FTL (PID 52) to shut down
2024-11-11 10:02:01.567 CET [3270/F52] INFO: FTL fork terminated!
2024-11-11 10:02:01.567 CET [52M] INFO: Received: RT37 (37 -> 2)
2024-11-11 10:02:01.570 CET [52M] INFO: Asked to terminate by "/usr/bin/pihole-FTL no-daemon" (PID 52, user pihole UID 100)
2024-11-11 10:02:01.594 CET [52/T117] INFO: Terminating database thread
2024-11-11 10:02:01.611 CET [52/T120] INFO: Terminating timer thread
2024-11-11 10:02:01.977 CET [52/T119] INFO: Terminating resolver thread
2024-11-11 10:02:02.009 CET [52M] INFO: Finished final database update
2024-11-11 10:02:02.009 CET [52M] INFO: Waiting for threads to join
2024-11-11 10:02:02.009 CET [52M] INFO: Thread housekeeper (1) is idle, terminating it.
2024-11-11 10:02:02.009 CET [52M] INFO: Thread ntp-client (4) is idle, terminating it.
2024-11-11 10:02:02.009 CET [52M] INFO: All threads joined
2024-11-11 10:02:02.018 CET [52M] INFO: Stored 0 API sessions in the database
2024-11-11 10:02:02.682 CET [52M] INFO: ########## FTL terminated after 1h 9m 56s  (code 1)! ##########

Note, that this happens on the current development image, as well as yesterday's and today's nightly image. The log above is from the latest nightly because while it crashes, FTL recovers quicker while development does not and sometimes takes down the container.

@DL6ER
Copy link
Member

DL6ER commented Nov 11, 2024

3270/F52

from e.g. the first line says the crash happened in process with PID 3270 which is a Fork of process 52. Unfortunately, gdb cannot really trace forks, see https://sourceware.org/gdb/current/onlinedocs/gdb.html/Forks.html

On most systems, GDB has no special support for debugging programs which create additional processes using the fork function. When a program forks, GDB will continue to debug the parent process and the child process will run unimpeded. [...]

´The first crash you have reported here had the crash in 52/T158 which is the original processes' thread with ID 158. gdb would have caught another crash therein.

According to the link above, Linux supports setting

set follow-fork-mode child

allowing gdb to follow the forked child. But if FTL crashes in the main process in between, we will not have caught this...

edit Clarified above and suggested a different command to run

@DL6ER
Copy link
Member

DL6ER commented Nov 11, 2024

set detach-on-fork off

might work, too, but I am not sure if suspending the main process is still a healthy system. It may have other consequences. Easiest would probably be waiting until we get a crash not in a fork so gdb can provide all the necessary information for us.

@bermeitinger-b
Copy link

With set detach-on-fork off

(gdb)  set detach-on-fork off
(gdb) continue
Continuing.
[New inferior 2 (process 2592)]
Can not resume the parent process over vfork in the foreground while
holding the child stopped.  Try "set detach-on-fork" or "set schedule-multiple".
[Switching to LWP 153]
__clone () at src/thread/x86_64/clone.s:18
warning: 18     src/thread/x86_64/clone.s: No such file or directory
(gdb) backtrace
#0  __clone () at src/thread/x86_64/clone.s:18
#1  0x00000000007fa8fc in posix_spawn (res=res@entry=0x7dd145a616a4, path=path@entry=0x80fc5e "/bin/sh", fa=fa@entry=0x7dd145a616d0,
    attr=attr@entry=0x0, argv=argv@entry=0x7dd145a616b0, envp=<optimized out>) at src/process/posix_spawn.c:198
#2  0x00000000007eca1e in popen (cmd=cmd@entry=0x7dd145a61802 "ip neigh show", mode=mode@entry=0x80efa9 "r") at src/stdio/popen.c:41
#3  0x000000000049db1e in parse_neighbor_cache (db=0x7dd14c672ca8) at /app/src/database/network-table.c:1307
#4  0x00000000004904ec in DB_thread (val=<optimized out>) at /app/src/database/database-thread.c:199
#5  0x00000000007f26d0 in start (p=0x7dd145a61b00) at src/thread/pthread_create.c:207
#6  0x00000000007f3d5c in __clone () at src/thread/x86_64/clone.s:22
Backtrace stopped: frame did not save the PC

With set follow-fork-mode child:

(gdb) continue
Continuing.
[Attaching after LWP 49 fork to child process 179]
[New inferior 2 (process 179)]

Thread 2.1 "pihole-FTL" received signal SIGPIPE, Broken pipe.
[Inferior 2 (process 179) exited normally]

@schuettecarsten
Copy link
Author

Maybe it's a good idea to create a development build that includes debug symbols just to have a valid stack trace output?

@bermeitinger-b
Copy link

I've also seen that the Network overview show this:
Image

@schuettecarsten
Copy link
Author

Here is "my" crash:


 2024-11-11 11:15:42.529 CET [712/F49] DEBUG_ANY: Reopening Gravity database for this fork
 2024-11-11 11:15:42.535 CET [713/F49] DEBUG_ANY: Reopening Gravity database for this fork
 2024-11-11 11:15:42.536 CET [712/F49] INFO: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 2024-11-11 11:15:42.537 CET [712/F49] INFO: ---------------------------->  FTL crashed!  <----------------------------
 2024-11-11 11:15:42.537 CET [712/F49] INFO: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 2024-11-11 11:15:42.537 CET [712/F49] INFO: Please report a bug at https://github.com/pi-hole/FTL/issues
 2024-11-11 11:15:42.538 CET [712/F49] INFO: and include in your report already the following details:
 2024-11-11 11:15:42.540 CET [712/F49] INFO: FTL has been running for 1016 seconds
 2024-11-11 11:15:42.540 CET [712/F49] INFO: FTL branch: development
 2024-11-11 11:15:42.541 CET [712/F49] INFO: FTL version: vDev-848367f
 2024-11-11 11:15:42.541 CET [712/F49] INFO: FTL commit: 848367fa
 2024-11-11 11:15:42.541 CET [712/F49] INFO: FTL date: 2024-11-08 19:13:07 +0100
 2024-11-11 11:15:42.542 CET [712/F49] INFO: FTL user: started as pihole, ended as pihole
 2024-11-11 11:15:42.542 CET [714/F49] DEBUG_ANY: Reopening Gravity database for this fork
 2024-11-11 11:15:42.542 CET [712/F49] INFO: Compiled for linux/arm64/v8 (compiled on CI) using cc (Alpine 13.2.1_git20240309) 13.2.1 20240309
 2024-11-11 11:15:42.543 CET [712/F49] INFO: Process details: MID: 49
 2024-11-11 11:15:42.543 CET [712/F49] INFO:                  PID: 712
 2024-11-11 11:15:42.543 CET [712/F49] INFO:                  TID: 712
 2024-11-11 11:15:42.543 CET [712/F49] INFO:                  Name: pihole-FTL
 2024-11-11 11:15:42.544 CET [712/F49] INFO: Received signal: Segmentation fault
 2024-11-11 11:15:42.544 CET [712/F49] INFO:      at address: 0x4c0cc200000765
 2024-11-11 11:15:42.544 CET [712/F49] INFO:      with code:  SEGV_MAPERR (Address not mapped to object)
 2024-11-11 11:15:42.545 CET [712/F49] INFO: !!! INFO: pihole-FTL has not been compiled with glibc/backtrace support, not generating one !!!
 2024-11-11 11:15:42.545 CET [712/F49] INFO: ------ Listing content of directory /dev/shm ------
 2024-11-11 11:15:42.546 CET [712/F49] INFO: File Mode User:Group      Size  Filename
 2024-11-11 11:15:42.546 CET [712/F49] INFO: rwxrwxrwx root:root       360   .
 2024-11-11 11:15:42.547 CET [712/F49] INFO: rwxr-xr-x root:root       320   ..
 2024-11-11 11:15:42.547 CET [712/F49] INFO: rw------- pihole:pihole    88   FTL-lock
 2024-11-11 11:15:42.547 CET [712/F49] INFO: rw------- pihole:pihole   328   FTL-counters
 2024-11-11 11:15:42.548 CET [712/F49] INFO: rw------- pihole:pihole   136   FTL-settings
 2024-11-11 11:15:42.548 CET [712/F49] INFO: rw------- pihole:pihole   164K  FTL-strings
 2024-11-11 11:15:42.549 CET [712/F49] INFO: rw------- pihole:pihole   115K  FTL-domains
 2024-11-11 11:15:42.549 CET [712/F49] INFO: rw------- pihole:pihole   348K  FTL-clients
 2024-11-11 11:15:42.550 CET [712/F49] INFO: rw------- pihole:pihole    29K  FTL-upstreams
 2024-11-11 11:15:42.550 CET [712/F49] INFO: rw------- pihole:pihole    15M  FTL-queries
 2024-11-11 11:15:42.550 CET [712/F49] INFO: rw------- pihole:pihole     8K  FTL-overTime
 2024-11-11 11:15:42.550 CET [715/F49] DEBUG_ANY: Reopening Gravity database for this fork
 2024-11-11 11:15:42.551 CET [712/F49] INFO: rw------- pihole:pihole   102K  FTL-dns-cache
 2024-11-11 11:15:42.551 CET [712/F49] INFO: rw------- pihole:pihole     4K  FTL-per-client-regex
 2024-11-11 11:15:42.551 CET [712/F49] INFO: rw------- pihole:pihole   569K  FTL-fifo-log
 2024-11-11 11:15:42.552 CET [712/F49] INFO: rw------- pihole:pihole     4K  FTL-clients-lookup
 2024-11-11 11:15:42.552 CET [712/F49] INFO: rw------- pihole:pihole    29K  FTL-domains-lookup
 2024-11-11 11:15:42.552 CET [712/F49] INFO: rw------- pihole:pihole    20K  FTL-dns-cache-lookup
 2024-11-11 11:15:42.553 CET [712/F49] INFO: rw------- pihole:pihole   786K  FTL-recycler
 2024-11-11 11:15:42.553 CET [712/F49] INFO: ---------------------------------------------------
 2024-11-11 11:15:42.553 CET [712/F49] INFO: Please also include some lines from above the !!!!!!!!! header.
 2024-11-11 11:15:42.553 CET [712/F49] INFO: Thank you for helping us to improve our FTL engine!
 2024-11-11 11:15:42.554 CET [712/F49] INFO: Asking parent pihole-FTL (PID 49) to shut down
 2024-11-11 11:15:42.554 CET [712/F49] INFO: FTL fork terminated!
 2024-11-11 11:15:42.555 CET [713/F49] ERROR: Error when obtaining outer SHM lock: Previous owner died
 2024-11-11 11:15:42.555 CET [713/F49] ERROR: Error when obtaining inner SHM lock: Previous owner died
 2024-11-11 11:15:42.556 CET [49/T152] INFO: Received: RT37 (37 -> 2)
 2024-11-11 11:15:42.556 CET [716/F49] DEBUG_ANY: Reopening Gravity database for this fork
 2024-11-11 11:15:42.557 CET [713/F49] INFO: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 2024-11-11 11:15:42.558 CET [713/F49] INFO: ---------------------------->  FTL crashed!  <----------------------------
 2024-11-11 11:15:42.558 CET [713/F49] INFO: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 2024-11-11 11:15:42.558 CET [713/F49] INFO: Please report a bug at https://github.com/pi-hole/FTL/issues
 2024-11-11 11:15:42.558 CET [713/F49] INFO: and include in your report already the following details:
 2024-11-11 11:15:42.559 CET [713/F49] INFO: FTL has been running for 1016 seconds
 2024-11-11 11:15:42.559 CET [713/F49] INFO: FTL branch: development
 2024-11-11 11:15:42.559 CET [713/F49] INFO: FTL version: vDev-848367f
 2024-11-11 11:15:42.559 CET [713/F49] INFO: FTL commit: 848367fa
 2024-11-11 11:15:42.560 CET [713/F49] INFO: FTL date: 2024-11-08 19:13:07 +0100
 2024-11-11 11:15:42.560 CET [713/F49] INFO: FTL user: started as pihole, ended as pihole
 2024-11-11 11:15:42.561 CET [713/F49] INFO: Compiled for linux/arm64/v8 (compiled on CI) using cc (Alpine 13.2.1_git20240309) 13.2.1 20240309
 2024-11-11 11:15:42.561 CET [713/F49] INFO: Process details: MID: 49
 2024-11-11 11:15:42.561 CET [713/F49] INFO:                  PID: 713
 2024-11-11 11:15:42.562 CET [713/F49] INFO:                  TID: 713
 2024-11-11 11:15:42.562 CET [713/F49] INFO:                  Name: pihole-FTL
 2024-11-11 11:15:42.556 CET [49/T152] DEBUG_ANY: Received SIGTERM
 2024-11-11 11:15:42.562 CET [713/F49] INFO: Received signal: Segmentation fault
 2024-11-11 11:15:42.563 CET [713/F49] INFO:      at address: 0x4c0cc100000764
 2024-11-11 11:15:42.563 CET [717/F49] DEBUG_ANY: Reopening Gravity database for this fork
 2024-11-11 11:15:42.563 CET [49/T152] INFO: Asked to terminate by "/usr/bin/pihole-FTL no-daemon" (PID 49, user pihole UID 100)
 2024-11-11 11:15:42.563 CET [713/F49] INFO:      with code:  SEGV_MAPERR (Address not mapped to object)
 2024-11-11 11:15:42.563 CET [713/F49] INFO: !!! INFO: pihole-FTL has not been compiled with glibc/backtrace support, not generating one !!!
 2024-11-11 11:15:42.563 CET [49/T152] DEBUG_ANY: Sending SIGUSR6 to dnsmasq to stop DNS service
 2024-11-11 11:15:42.563 CET [713/F49] INFO: ------ Listing content of directory /dev/shm ------
 2024-11-11 11:15:42.564 CET [713/F49] INFO: File Mode User:Group      Size  Filename
 2024-11-11 11:15:42.564 CET [49M] DEBUG_ANY: dnsmasq received signal 41
 2024-11-11 11:15:42.564 CET [713/F49] INFO: rwxrwxrwx root:root       360   .
 2024-11-11 11:15:42.565 CET [713/F49] INFO: rwxr-xr-x root:root       320   ..
 2024-11-11 11:15:42.565 CET [713/F49] INFO: rw------- pihole:pihole    88   FTL-lock
 2024-11-11 11:15:42.565 CET [713/F49] INFO: rw------- pihole:pihole    88   FTL-lock
 2024-11-11 11:15:42.566 CET [713/F49] INFO: rw------- pihole:pihole   328   FTL-counters
 2024-11-11 11:15:42.566 CET [713/F49] INFO: rw------- pihole:pihole   136   FTL-settings
 2024-11-11 11:15:42.566 CET [713/F49] INFO: rw------- pihole:pihole   164K  FTL-strings
 2024-11-11 11:15:42.567 CET [713/F49] INFO: rw------- pihole:pihole   115K  FTL-domains
 2024-11-11 11:15:42.567 CET [713/F49] INFO: rw------- pihole:pihole   348K  FTL-clients
 2024-11-11 11:15:42.568 CET [713/F49] INFO: rw------- pihole:pihole    29K  FTL-upstreams
 2024-11-11 11:15:42.568 CET [713/F49] INFO: rw------- pihole:pihole    15M  FTL-queries
 2024-11-11 11:15:42.569 CET [713/F49] INFO: rw------- pihole:pihole     8K  FTL-overTime
 2024-11-11 11:15:42.569 CET [713/F49] INFO: rw------- pihole:pihole   102K  FTL-dns-cache
 2024-11-11 11:15:42.570 CET [713/F49] INFO: rw------- pihole:pihole     4K  FTL-per-client-regex
 2024-11-11 11:15:42.570 CET [713/F49] INFO: rw------- pihole:pihole   569K  FTL-fifo-log
 2024-11-11 11:15:42.570 CET [713/F49] DEBUG_ANY: Closing gravity database
 2024-11-11 11:15:42.572 CET [717/F49] DEBUG_ANY: Closing gravity database
 2024-11-11 11:15:42.572 CET [714/F49] DEBUG_ANY: Closing gravity database
 2024-11-11 11:15:42.578 CET [718/F49] DEBUG_ANY: Closing gravity database
 2024-11-11 11:15:42.589 CET [715/F49] DEBUG_ANY: Closing gravity database
 2024-11-11 11:15:42.596 CET [716/F49] DEBUG_ANY: Closing gravity database
 2024-11-11 11:15:42.596 CET [49M] DEBUG_ANY: Shutting down... // exit code 1 // jmpret 0
 2024-11-11 11:15:42.596 CET [719/F49] DEBUG_ANY: Reopening Gravity database for this fork
 2024-11-11 11:15:42.606 CET [719/F49] DEBUG_ANY: Closing gravity database
 2024-11-11 11:15:42.611 CET [49/T155] INFO: Terminating timer thread
 2024-11-11 11:15:42.670 CET [49/T152] INFO: Terminating database thread
 2024-11-11 11:15:42.726 CET [49/T154] INFO: Terminating resolver thread
 2024-11-11 11:15:43.209 CET [49/T153] INFO: Terminating GC thread
 2024-11-11 11:15:43.522 CET [49M] INFO: Finished final database update
 2024-11-11 11:15:43.522 CET [49M] INFO: Waiting for threads to join
 2024-11-11 11:15:43.522 CET [49M] INFO: All threads joined
 2024-11-11 11:15:43.523 CET [49M] DEBUG_ANY: Closing gravity database
 2024-11-11 11:15:43.526 CET [49M] INFO: Stored 1 API session in the database
 2024-11-11 11:15:44.366 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 0: 0x7fad93c000 == 0x7fb750a000
 2024-11-11 11:15:44.366 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 1: 0x7fb74a3000 == 0x7fb750a000
 2024-11-11 11:15:44.366 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 2: 0x7faeed9000 == 0x7fb750a000
 2024-11-11 11:15:44.366 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 3: 0x7fb749c000 == 0x7fb750a000
 2024-11-11 11:15:44.367 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 4: 0x7faedd1000 == 0x7fb750a000
 2024-11-11 11:15:44.367 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 5: 0x7fb73c1000 == 0x7fb750a000
 2024-11-11 11:15:44.367 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 6: 0x7fb73c0000 == 0x7fb750a000
 2024-11-11 11:15:44.367 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 7: 0x7fb7466000 == 0x7fb750a000
 2024-11-11 11:15:44.367 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 8: 0x7fb748e000 == 0x7fb750a000
 2024-11-11 11:15:44.367 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 9: 0x7fb72fe000 == 0x7fb750a000
 2024-11-11 11:15:44.368 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 0: 0x7fad93c000 == 0x7faf276000
 2024-11-11 11:15:44.368 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 1: 0x7fb74a3000 == 0x7faf276000
 2024-11-11 11:15:44.368 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 2: 0x7faeed9000 == 0x7faf276000
 2024-11-11 11:15:44.368 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 3: 0x7fb749c000 == 0x7faf276000
 2024-11-11 11:15:44.368 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 4: 0x7faedd1000 == 0x7faf276000
 2024-11-11 11:15:44.369 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 5: 0x7fb73c1000 == 0x7faf276000
 2024-11-11 11:15:44.369 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 6: 0x7fb73c0000 == 0x7faf276000
 2024-11-11 11:15:44.369 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 7: 0x7fb7466000 == 0x7faf276000
 2024-11-11 11:15:44.369 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 8: 0x7fb748e000 == 0x7faf276000
 2024-11-11 11:15:44.369 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 9: 0x7fb72fe000 == 0x7faf276000
 2024-11-11 11:15:44.370 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 0: 0x7fad93c000 == 0x7fb7508000
 2024-11-11 11:15:44.370 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 1: 0x7fb74a3000 == 0x7fb7508000
 2024-11-11 11:15:44.370 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 2: 0x7faeed9000 == 0x7fb7508000
 2024-11-11 11:15:44.370 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 3: 0x7fb749c000 == 0x7fb7508000
 2024-11-11 11:15:44.370 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 4: 0x7faedd1000 == 0x7fb7508000
 2024-11-11 11:15:44.371 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 5: 0x7fb73c1000 == 0x7fb7508000
 2024-11-11 11:15:44.371 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 6: 0x7fb73c0000 == 0x7fb7508000
 2024-11-11 11:15:44.371 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 7: 0x7fb7466000 == 0x7fb7508000
 2024-11-11 11:15:44.371 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 8: 0x7fb748e000 == 0x7fb7508000
 2024-11-11 11:15:44.371 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 9: 0x7fb72fe000 == 0x7fb7508000
 2024-11-11 11:15:44.371 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 0: 0x7fad93c000 == 0x7faeed9000
 2024-11-11 11:15:44.372 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 1: 0x7fb74a3000 == 0x7faeed9000
 2024-11-11 11:15:44.372 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 2: 0x7faeed9000 == 0x7faeed9000
 2024-11-11 11:15:44.372 CET [49M] DEBUG_SHMEM: Unmapping global pointer FTL-domains at 0x7faeed9000
 2024-11-11 11:15:44.372 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 0: 0x7fad93c000 == 0x7fb74a3000
 2024-11-11 11:15:44.372 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 1: 0x7fb74a3000 == 0x7fb74a3000
 2024-11-11 11:15:44.373 CET [49M] DEBUG_SHMEM: Unmapping global pointer FTL-clients at 0x7fb74a3000
 2024-11-11 11:15:44.373 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 0: 0x7fad93c000 == 0x7fad93c000
 2024-11-11 11:15:44.373 CET [49M] DEBUG_SHMEM: Unmapping global pointer FTL-queries at 0x7fad93c000
 2024-11-11 11:15:44.377 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 0: 0 == 0x7fb749c000
 2024-11-11 11:15:44.378 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 1: 0 == 0x7fb749c000
 2024-11-11 11:15:44.378 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 2: 0 == 0x7fb749c000
 2024-11-11 11:15:44.378 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 3: 0x7fb749c000 == 0x7fb749c000
 2024-11-11 11:15:44.378 CET [49M] DEBUG_SHMEM: Unmapping global pointer FTL-upstreams at 0x7fb749c000
 2024-11-11 11:15:44.378 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 0: 0 == 0x7fb7452000
 2024-11-11 11:15:44.379 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 1: 0 == 0x7fb7452000
 2024-11-11 11:15:44.379 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 2: 0 == 0x7fb7452000
 2024-11-11 11:15:44.379 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 3: 0 == 0x7fb7452000
 2024-11-11 11:15:44.379 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 4: 0x7faedd1000 == 0x7fb7452000
 2024-11-11 11:15:44.379 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 5: 0x7fb73c1000 == 0x7fb7452000
 2024-11-11 11:15:44.380 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 6: 0x7fb73c0000 == 0x7fb7452000
 2024-11-11 11:15:44.380 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 7: 0x7fb7466000 == 0x7fb7452000
 2024-11-11 11:15:44.380 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 8: 0x7fb748e000 == 0x7fb7452000
 2024-11-11 11:15:44.380 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 7: 0x7fb7466000 == 0x7fb7452000
 2024-11-11 11:15:44.380 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 8: 0x7fb748e000 == 0x7fb7452000
 2024-11-11 11:15:44.380 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 9: 0x7fb72fe000 == 0x7fb7452000
 2024-11-11 11:15:44.380 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 0: 0 == 0x7fb7503000
 2024-11-11 11:15:44.380 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 1: 0 == 0x7fb7503000
 2024-11-11 11:15:44.381 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 2: 0 == 0x7fb7503000
 2024-11-11 11:15:44.381 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 3: 0 == 0x7fb7503000
 2024-11-11 11:15:44.381 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 4: 0x7faedd1000 == 0x7fb7503000
 2024-11-11 11:15:44.381 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 5: 0x7fb73c1000 == 0x7fb7503000
 2024-11-11 11:15:44.381 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 6: 0x7fb73c0000 == 0x7fb7503000
 2024-11-11 11:15:44.382 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 7: 0x7fb7466000 == 0x7fb7503000
 2024-11-11 11:15:44.382 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 8: 0x7fb748e000 == 0x7fb7503000
 2024-11-11 11:15:44.382 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 9: 0x7fb72fe000 == 0x7fb7503000
 2024-11-11 11:15:44.382 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 0: 0 == 0x7faedd1000
 2024-11-11 11:15:44.382 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 1: 0 == 0x7faedd1000
 2024-11-11 11:15:44.383 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 2: 0 == 0x7faedd1000
 2024-11-11 11:15:44.383 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 3: 0 == 0x7faedd1000
 2024-11-11 11:15:44.383 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 4: 0x7faedd1000 == 0x7faedd1000
 2024-11-11 11:15:44.383 CET [49M] DEBUG_SHMEM: Unmapping global pointer FTL-dns-cache at 0x7faedd1000
 2024-11-11 11:15:44.383 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 0: 0 == 0x7fb744c000
 2024-11-11 11:15:44.384 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 1: 0 == 0x7fb744c000
 2024-11-11 11:15:44.384 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 2: 0 == 0x7fb744c000
 2024-11-11 11:15:44.384 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 3: 0 == 0x7fb744c000
 2024-11-11 11:15:44.384 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 4: 0 == 0x7fb744c000
 2024-11-11 11:15:44.384 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 5: 0x7fb73c1000 == 0x7fb744c000
 2024-11-11 11:15:44.384 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 6: 0x7fb73c0000 == 0x7fb744c000
 2024-11-11 11:15:44.385 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 7: 0x7fb7466000 == 0x7fb744c000
 2024-11-11 11:15:44.385 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 8: 0x7fb748e000 == 0x7fb744c000
 2024-11-11 11:15:44.385 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 9: 0x7fb72fe000 == 0x7fb744c000
 2024-11-11 11:15:44.385 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 0: 0 == 0x7fb73c1000
 2024-11-11 11:15:44.385 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 1: 0 == 0x7fb73c1000
 2024-11-11 11:15:44.386 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 2: 0 == 0x7fb73c1000
 2024-11-11 11:15:44.386 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 3: 0 == 0x7fb73c1000
 2024-11-11 11:15:44.386 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 4: 0 == 0x7fb73c1000
 2024-11-11 11:15:44.386 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 5: 0x7fb73c1000 == 0x7fb73c1000
 2024-11-11 11:15:44.386 CET [49M] DEBUG_SHMEM: Unmapping global pointer /FTL-fifo-log at 0x7fb73c1000
 2024-11-11 11:15:44.387 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 0: 0 == 0x7fb73c0000
 2024-11-11 11:15:44.387 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 1: 0 == 0x7fb73c0000
 2024-11-11 11:15:44.387 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 2: 0 == 0x7fb73c0000
 2024-11-11 11:15:44.387 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 3: 0 == 0x7fb73c0000
 2024-11-11 11:15:44.387 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 4: 0 == 0x7fb73c0000
 2024-11-11 11:15:44.387 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 5: 0 == 0x7fb73c0000
 2024-11-11 11:15:44.387 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 6: 0x7fb73c0000 == 0x7fb73c0000
 2024-11-11 11:15:44.387 CET [49M] DEBUG_SHMEM: Unmapping global pointer FTL-clients-lookup at 0x7fb73c0000
 2024-11-11 11:15:44.387 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 0: 0 == 0x7fb7466000
 2024-11-11 11:15:44.387 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 1: 0 == 0x7fb7466000
 2024-11-11 11:15:44.387 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 2: 0 == 0x7fb7466000
 2024-11-11 11:15:44.387 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 3: 0 == 0x7fb7466000
 2024-11-11 11:15:44.387 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 4: 0 == 0x7fb7466000
 2024-11-11 11:15:44.387 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 5: 0 == 0x7fb7466000
 2024-11-11 11:15:44.387 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 6: 0 == 0x7fb7466000
 2024-11-11 11:15:44.387 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 7: 0x7fb7466000 == 0x7fb7466000
 2024-11-11 11:15:44.387 CET [49M] DEBUG_SHMEM: Unmapping global pointer FTL-domains-lookup at 0x7fb7466000
 2024-11-11 11:15:44.387 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 0: 0 == 0x7fb748e000
 2024-11-11 11:15:44.387 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 1: 0 == 0x7fb748e000
 2024-11-11 11:15:44.387 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 2: 0 == 0x7fb748e000
 2024-11-11 11:15:44.387 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 3: 0 == 0x7fb748e000
 2024-11-11 11:15:44.387 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 4: 0 == 0x7fb748e000
 2024-11-11 11:15:44.387 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 5: 0 == 0x7fb748e000
 2024-11-11 11:15:44.387 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 6: 0 == 0x7fb748e000
 2024-11-11 11:15:44.388 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 7: 0 == 0x7fb748e000
 2024-11-11 11:15:44.388 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 8: 0x7fb748e000 == 0x7fb748e000
 2024-11-11 11:15:44.388 CET [49M] DEBUG_SHMEM: Unmapping global pointer FTL-dns-cache-lookup at 0x7fb748e000
 2024-11-11 11:15:44.388 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 0: 0 == 0x7fb72fe000
 2024-11-11 11:15:44.388 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 1: 0 == 0x7fb72fe000
 2024-11-11 11:15:44.388 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 2: 0 == 0x7fb72fe000
 2024-11-11 11:15:44.388 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 3: 0 == 0x7fb72fe000
 2024-11-11 11:15:44.388 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 4: 0 == 0x7fb72fe000
 2024-11-11 11:15:44.388 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 5: 0 == 0x7fb72fe000
 2024-11-11 11:15:44.388 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 6: 0 == 0x7fb72fe000
 2024-11-11 11:15:44.388 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 7: 0 == 0x7fb72fe000
 2024-11-11 11:15:44.388 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 8: 0 == 0x7fb72fe000
 2024-11-11 11:15:44.388 CET [49M] DEBUG_SHMEM: Pointer comparison at pos. 9: 0x7fb72fe000 == 0x7fb72fe000
 2024-11-11 11:15:44.388 CET [49M] DEBUG_SHMEM: Unmapping global pointer FTL-recycler at 0x7fb72fe000
 2024-11-11 11:15:44.388 CET [49M] INFO: ########## FTL terminated after 16m 57s  (code 1)! ##########

   [i] pihole-FTL exited with status 1

@DL6ER
Copy link
Member

DL6ER commented Nov 11, 2024

Maybe it's a good idea to create a development build that includes debug symbols just to have a valid stack trace output?

We already have the full set of debug symbols in the release builds, otherwise, you would not have seen the function names and related code lines in:

#0  __clone () at src/thread/x86_64/clone.s:18
#1  0x00000000007fa8fc in posix_spawn (res=res@entry=0x7dd145a616a4, path=path@entry=0x80fc5e "/bin/sh", fa=fa@entry=0x7dd145a616d0,
    attr=attr@entry=0x0, argv=argv@entry=0x7dd145a616b0, envp=<optimized out>) at src/process/posix_spawn.c:198
#2  0x00000000007eca1e in popen (cmd=cmd@entry=0x7dd145a61802 "ip neigh show", mode=mode@entry=0x80efa9 "r") at src/stdio/popen.c:41
#3  0x000000000049db1e in parse_neighbor_cache (db=0x7dd14c672ca8) at /app/src/database/network-table.c:1307
#4  0x00000000004904ec in DB_thread (val=<optimized out>) at /app/src/database/database-thread.c:199
#5  0x00000000007f26d0 in start (p=0x7dd145a61b00) at src/thread/pthread_create.c:207
#6  0x00000000007f3d5c in __clone () at src/thread/x86_64/clone.s:22

But this also shows that following forks/children won't work for us here. The location at where you entered backtrace was where the child had been created. Seems you'd need to run continue here for each forking. This is highly impractical...

@schuettecarsten Could you attach the debugger as well? This latest crash was in a fork, too, however, the first one (the very first post in this issue ticket) was in a normal thread of the main process (gdb would have caught that).

@bermeitinger-b
Copy link

Maybe here:

#0  sig_handler (sig=17) at /app/src/dnsmasq/dnsmasq.c:1312
#1  <signal handler called>
#2  __syscall_cp_c (nr=202, u=139057914187780, v=0, w=-2147483495, x=0, y=0, z=0) at ./arch/x86_64/syscall_arch.h:61
#3  0x00000000007fbad5 in __futex4_cp (to=<optimized out>, val=-2147483495, op=0, addr=0x7e78f1941004) at src/thread/__timedwait.c:24
#4  __timedwait_cp (addr=addr@entry=0x7e78f1941004, val=val@entry=-2147483495, clk=clk@entry=0, at=at@entry=0x0, priv=priv@entry=0)
    at src/thread/__timedwait.c:52
#5  0x00000000007fbba2 in __timedwait (addr=addr@entry=0x7e78f1941004, val=-2147483495, clk=clk@entry=0, at=at@entry=0x0, priv=priv@entry=0)
    at src/thread/__timedwait.c:68
#6  0x00000000007f33e4 in __pthread_mutex_timedlock (m=0x7e78f1941000, at=at@entry=0x0) at src/thread/pthread_mutex_timedlock.c:85
#7  0x00000000007f3226 in __pthread_mutex_lock (m=m@entry=0x7e78f1941000) at src/thread/pthread_mutex_lock.c:9
#8  0x00000000006c0b28 in FTLpthread_mutex_lock (__mutex=0x7e78f1941000, file=file@entry=0x800301 "/app/src/shmem.c", 
    func=func@entry=0x867c78 <__FUNCTION__.3> "_lock_shm", line=line@entry=351) at /app/src/syscalls/pthread_mutex_lock.c:23
#9  0x0000000000424586 in _lock_shm (func=func@entry=0x866560 <__FUNCTION__.2> "FTL_dnsmasq_log", line=line@entry=3687, 
    file=file@entry=0x7fec34 "/app/src/dnsmasq_interface.c") at /app/src/shmem.c:351
#10 0x000000000041367e in FTL_dnsmasq_log (payload=payload@entry=0x7ffd68bbe710 "query[A] pi.hole from 127.0.0.1", length=32)
    at /app/src/dnsmasq_interface.c:3687
#11 0x00000000004d4056 in my_syslog (priority=priority@entry=6, format=format@entry=0x806830 "%s %s%s%s %s%s") at /app/src/dnsmasq/log.c:330
#12 0x00000000004b15eb in _log_query (flags=flags@entry=524424, name=0x7e78f17331c0 "pi.hole", addr=addr@entry=0x7ffd68bbed64, 
    arg=<optimized out>, type=<optimized out>, file=file@entry=0x8072a6 "/app/src/dnsmasq/forward.c", line=1820)
    at /app/src/dnsmasq/cache.c:2374
#13 0x00000000004cba6d in _log_query_mysockaddr (line=1820, type=<optimized out>, arg=<optimized out>, addr=0x7ffd68bbed60, 
    name=<optimized out>, flags=524296) at /app/src/dnsmasq/forward.c:139
#14 _log_query_mysockaddr (line=1820, type=<optimized out>, arg=<optimized out>, addr=0x7ffd68bbed60, name=<optimized out>, flags=524296)
    at /app/src/dnsmasq/forward.c:133
#15 receive_query (listen=listen@entry=0x7e78f1948e00, now=now@entry=1731357142) at /app/src/dnsmasq/forward.c:1820
#16 0x00000000004b9063 in check_dns_listeners (now=now@entry=1731357142) at /app/src/dnsmasq/dnsmasq.c:1895
#17 0x00000000004bb278 in main_dnsmasq (argc=<optimized out>, argv=<optimized out>) at /app/src/dnsmasq/dnsmasq.c:1278
#18 0x00000000004020d7 in main (argc=<optimized out>, argv=0x7ffd68bbf158) at /app/src/main.c:123

or

#0  sig_handler (sig=17) at /app/src/dnsmasq/dnsmasq.c:1312
warning: 1312   /app/src/dnsmasq/dnsmasq.c: No such file or directory
(gdb) backtrace
#0  sig_handler (sig=17) at /app/src/dnsmasq/dnsmasq.c:1312
#1  <signal handler called>
#2  __cp_end () at src/thread/x86_64/syscall_cp.s:29
#3  0x00000000007f19e3 in __syscall_cp_c (nr=0, u=<optimized out>, v=<optimized out>, w=<optimized out>, x=<optimized out>, 
    y=<optimized out>, z=0) at src/thread/pthread_cancel.c:33
#4  0x00000000007f52b3 in read (fd=fd@entry=47, buf=buf@entry=0x7ffd68bbeed3, count=count@entry=1) at src/unistd/read.c:6
#5  0x0000000000506e8e in read (__n=<optimized out>, __s=<optimized out>, __f=47) at /usr/include/fortify/unistd.h:118
#6  read_write (fd=47, packet=packet@entry=0x7ffd68bbeed3 "", size=size@entry=1, rw=rw@entry=1) at /app/src/dnsmasq/util.c:780
#7  0x00000000004b8ff0 in check_dns_listeners (now=now@entry=1731357142) at /app/src/dnsmasq/dnsmasq.c:2012
#8  0x00000000004bb278 in main_dnsmasq (argc=<optimized out>, argv=<optimized out>) at /app/src/dnsmasq/dnsmasq.c:1278
#9  0x00000000004020d7 in main (argc=<optimized out>, argv=0x7ffd68bbf158) at /app/src/main.c:123

or

#0  sig_handler (sig=17) at /app/src/dnsmasq/dnsmasq.c:1312
#1  <signal handler called>
#2  __restore_sigs (set=set@entry=0x7ffd68bbedf0) at ./arch/x86_64/syscall_arch.h:40
#3  0x00000000007e97bf in fork () at src/process/fork.c:86
#4  0x00000000004b8fab in check_dns_listeners (now=now@entry=1731357268) at /app/src/dnsmasq/dnsmasq.c:1989
#5  0x00000000004bb278 in main_dnsmasq (argc=<optimized out>, argv=<optimized out>) at /app/src/dnsmasq/dnsmasq.c:1278
#6  0x00000000004020d7 in main (argc=<optimized out>, argv=0x7ffd68bbf158) at /app/src/main.c:123

I'm not experienced with gdb. Thank you for your patience. If these backtraces are not helpful, I apologize

@DL6ER
Copy link
Member

DL6ER commented Nov 11, 2024

Signal 17 is SIGCHLD and gdb shouldn't have stopped for this one. I have not seen this signal myself being used inside pihole-FTL but I guess it is another one to be added with nostop to your /root/.gdbinit file ... I'm still convinced we will finally get there!

@bermeitinger-b
Copy link

bermeitinger-b commented Nov 11, 2024

Yes, unfortunately, the crash does not appear right away. Maybe I'll catch it.

In the meantime, I suggest looking at parsing the network clients. The above screenshot goes on for many clients:
Image

My Pihole is set up such that it only has 2 clients: 2 reverse proxies for DoH and DoT.

The Query Log shows the client only N. (Previously, it was the IP.)

@DL6ER
Copy link
Member

DL6ER commented Nov 12, 2024

@bermeitinger-b I don't think there is anything wrong with the network table TBH, my current assumption is that somehow handling of the strings got broken and your database got populated with garbage data. This would likely explain the crash you are seeing, too. But I am still not sure how/where it happens. I have meanwhile manually inspected the entire string processing code paths twice and did not find anything odd.

Please also enable DEBUG_SHMEM logging by running sudo pihole-FTL --config debug.shmem true - it will provide us with greater detail to FTL.log how strings are stored/reused. This should help us finding the issue.

@bermeitinger-b
Copy link

Here an excerpt after flushing the network table:

pihole  | 2024-11-12 09:54:47.521 CET [49/T155] DEBUG_SHMEM: Not adding "" to buffer (unchanged)
pihole  | 2024-11-12 09:54:47.521 CET [49/T155] DEBUG_SHMEM: Adding "localhost.lan" (len 14) to buffer in resolveAndAddHostname() (src/resolve.c:797), next_str_pos is 54983
pihole  | 2024-11-12 09:54:47.522 CET [49/T155] DEBUG_SHMEM: Not adding "" to buffer (unchanged)
pihole  | 2024-11-12 09:54:47.522 CET [49/T155] WARNING: Invalid IPv4 address when trying to resolve hostname: ^P
pihole  | 2024-11-12 09:54:47.523 CET [49/T155] DEBUG_SHMEM: Not adding "" to buffer (unchanged)
pihole  | 2024-11-12 09:54:47.523 CET [49/T155] WARNING: Invalid IPv4 address when trying to resolve hostname: 
pihole  | 2024-11-12 09:54:47.523 CET [49/T155] DEBUG_SHMEM: Not adding "" to buffer (unchanged)
pihole  | 2024-11-12 09:54:47.524 CET [49/T155] WARNING: Invalid IPv4 address when trying to resolve hostname: .        2.16.0.1
pihole  | 2024-11-12 09:54:47.524 CET [49/T155] DEBUG_SHMEM: Not adding "" to buffer (unchanged)
pihole  | 2024-11-12 09:54:47.524 CET [49/T155] DEBUG_SHMEM: Adding "pi.hole" (len 8) to buffer in resolveAndAddHostname() (src/resolve.c:797), next_str_pos is 54997
pihole  | 2024-11-12 09:54:47.526 CET [49/T155] DEBUG_SHMEM: Reusing existing string "localhost.lan" at 54983 in resolveAndAddHostname() (src/resolve.c:797)
pihole  | 2024-11-12 09:54:47.526 CET [49/T155] WARNING: Invalid IPv4 address when trying to resolve hostname: sunny-portal.de
pihole  | 2024-11-12 09:54:47.526 CET [49/T155] DEBUG_SHMEM: Not adding "" to buffer (unchanged)
pihole  | 2024-11-12 09:54:47.526 CET [49/T155] WARNING: Invalid IPv4 address when trying to resolve hostname: rtal.de
pihole  | 2024-11-12 09:54:47.527 CET [49/T155] DEBUG_SHMEM: Not adding "" to buffer (unchanged)
pihole  | 2024-11-12 09:54:47.527 CET [49/T155] WARNING: Invalid IPv4 address when trying to resolve hostname:  �       
pihole  | 2024-11-12 09:54:47.527 CET [49/T155] DEBUG_SHMEM: Not adding "" to buffer (unchanged)
pihole  | 2024-11-12 09:54:47.527 CET [49/T155] WARNING: Invalid IPv4 address when trying to resolve hostname:  �       ~^F
pihole  | 2024-11-12 09:54:47.528 CET [49/T155] DEBUG_SHMEM: Not adding "" to buffer (unchanged)
pihole  | 2024-11-12 09:54:47.528 CET [49/T155] WARNING: Invalid IPv4 address when trying to resolve hostname: ^M�      ^?^F
pihole  | 2024-11-12 09:54:47.528 CET [49/T155] DEBUG_SHMEM: Not adding "" to buffer (unchanged)
pihole  | 2024-11-12 09:54:47.528 CET [49/T155] WARNING: Invalid IPv4 address when trying to resolve hostname: ^M�      
pihole  | 2024-11-12 09:54:47.529 CET [49/T155] DEBUG_SHMEM: Not adding "" to buffer (unchanged)
pihole  | 2024-11-12 09:54:47.529 CET [49/T155] WARNING: Invalid IPv4 address when trying to resolve hostname: ^M�      �^F
pihole  | 2024-11-12 09:54:47.529 CET [49/T155] DEBUG_SHMEM: Not adding "" to buffer (unchanged)
pihole  | 2024-11-12 09:54:47.529 CET [49/T155] WARNING: Invalid IPv4 address when trying to resolve hostname: ^Q�      �^F
pihole  | 2024-11-12 09:54:47.530 CET [49/T155] DEBUG_SHMEM: Not adding "" to buffer (unchanged)
pihole  | 2024-11-12 09:54:47.530 CET [49/T155] WARNING: Invalid IPv4 address when trying to resolve hostname: ^Q�      �^F
pihole  | 2024-11-12 09:54:47.530 CET [49/T155] DEBUG_SHMEM: Not adding "" to buffer (unchanged)
pihole  | 2024-11-12 09:54:47.530 CET [49/T155] WARNING: Invalid IPv4 address when trying to resolve hostname: ^Q�      
pihole  | 2024-11-12 09:54:47.531 CET [49/T155] DEBUG_SHMEM: Not adding "" to buffer (unchanged)
pihole  | 2024-11-12 09:54:47.531 CET [49/T155] WARNING: Invalid IPv4 address when trying to resolve hostname: ^W�      �^F
pihole  | 2024-11-12 09:54:47.531 CET [49/T155] DEBUG_SHMEM: Not adding "" to buffer (unchanged)
pihole  | 2024-11-12 09:54:47.532 CET [49/T155] WARNING: Invalid IPv4 address when trying to resolve hostname: ^W�      
pihole  | 2024-11-12 09:54:47.532 CET [49/T155] DEBUG_SHMEM: Not adding "" to buffer (unchanged)
pihole  | 2024-11-12 09:54:47.532 CET [49/T155] WARNING: Invalid IPv4 address when trying to resolve hostname: ^Q�      �^F
pihole  | 2024-11-12 09:54:47.533 CET [49/T155] DEBUG_SHMEM: Not adding "" to buffer (unchanged)
pihole  | 2024-11-12 09:54:47.533 CET [49/T155] WARNING: Invalid IPv4 address when trying to resolve hostname: ^Z�      �^F
pihole  | 2024-11-12 09:54:47.533 CET [49/T155] DEBUG_SHMEM: Not adding "" to buffer (unchanged)
pihole  | 2024-11-12 09:54:47.533 CET [49/T155] WARNING: Invalid IPv4 address when trying to resolve hostname: ^Z�      �^F
pihole  | 2024-11-12 09:54:47.534 CET [49/T155] DEBUG_SHMEM: Not adding "" to buffer (unchanged)
pihole  | 2024-11-12 09:54:47.534 CET [49/T155] WARNING: Invalid IPv4 address when trying to resolve hostname: ^W�      �^F
pihole  | 2024-11-12 09:54:47.534 CET [49/T155] DEBUG_SHMEM: Not adding "" to buffer (unchanged)
pihole  | 2024-11-12 09:54:47.534 CET [49/T155] WARNING: Invalid IPv4 address when trying to resolve hostname:  
pihole  | 2024-11-12 09:54:47.535 CET [49/T155] DEBUG_SHMEM: Not adding "" to buffer (unchanged)

@DL6ER
Copy link
Member

DL6ER commented Nov 12, 2024

Yes, this brings us a lot closer. Please restart pihole-FTL if you haven't done already after running the --config command above. This ensures all string processing will be printed right from the start of the pihole-FTL process. If you then again encounter such lines, e.g.

pihole  | 2024-11-12 09:54:47.524 CET [49/T155] WARNING: Invalid IPv4 address when trying to resolve hostname: .        2.16.0.1

you can try to search for the first occurrence of this strange string like

grep ".        2.16.0.1" /var/log/pihole/FTL.log

@DL6ER
Copy link
Member

DL6ER commented Nov 12, 2024

It'd also be helpful if you could run

sudo kill -s RTMIN+7 $(cat /run/pihole-FTL.pid)

and see if any errors regarding hash tables are reported in /var/log/pihole/FTL.log (can take a few seconds after running the command above)

@bermeitinger-b
Copy link

bermeitinger-b commented Nov 12, 2024

Thanks.

I've restarted and it prints a lot of Adding "<domain>" (len x) to buffer and seemingly for all domains I've visited (?).
My shell highlights the E in this line:

2024-11-12 10:16:47.165 CET [49M] DEBUG_SHMEM: Adding "E" (len 2) to buffer in _findUpstreamID() (src/datastructure.c:174), nex
t_str_pos is 4687

Typically, this is an indicator that it's not a literal E. file FTL.log also shows data instead of ASCII text.

After many of these lines, it looks the output changes:

2024-11-12 10:16:47.356 CET [49M] DEBUG_SHMEM: Adding "personalsafety-pa.googleapis.com" (len 33) to buffer in _findDomainID() 
(src/datastructure.c:270), next_str_pos is 45448
2024-11-12 10:16:47.356 CET [49M] DEBUG_SHMEM: Reusing existing string "access-point.cloudmessaging.edge.microsoft.com" at 1451
7 in _findDomainID() (src/datastructure.c:270)
2024-11-12 10:16:47.356 CET [49M] DEBUG_SHMEM: Reusing existing string "sunny-portal.de" at 363 in _findClientID() (src/datastr
ucture.c:356)
2024-11-12 10:16:47.356 CET [49M] DEBUG_SHMEM: LCM(4096, 1) == 4096 >= 0
2024-11-12 10:16:47.357 CET [49M] DEBUG_SHMEM: Reusing existing string "rtal.de" at 371 in _findClientID() (src/datastructure.c
:356)
2024-11-12 10:16:47.357 CET [49M] DEBUG_SHMEM: LCM(4096, 1) == 4096 >= 0
2024-11-12 10:16:47.357 CET [49M] DEBUG_SHMEM: Adding "F" (len 2) to buffer in _findDomainID() (src/datastructure.c:270), next_
str_pos is 45481
2024-11-12 10:16:47.358 CET [49M] DEBUG_SHMEM: Adding "         " (len 4) to buffer in _findClientID() (src/datastructure.c:356
), next_str_pos is 45483
2024-11-12 10:16:47.358 CET [49M] DEBUG_SHMEM: LCM(4096, 1) == 4096 >= 0
2024-11-12 10:16:47.358 CET [49M] DEBUG_SHMEM: Adding "         ~F" (len 6) to buffer in _findClientID() (src/datastructure.c:3
56), next_str_pos is 45487
2024-11-12 10:16:47.358 CET [49M] DEBUG_SHMEM: LCM(4096, 1) == 4096 >= 0
2024-11-12 10:16:47.359 CET [49M] DEBUG_SHMEM: Adding "M        ?F" (len 6) to buffer in _findClientID() (src/datastructure.c:3
56), next_str_pos is 45493
2024-11-12 10:16:47.359 CET [49M] DEBUG_SHMEM: LCM(4096, 1) == 4096 >= 0
2024-11-12 10:16:47.359 CET [49M] DEBUG_SHMEM: Adding "M        " (len 4) to buffer in _findClientID() (src/datastructure.c:356
), next_str_pos is 45499
2024-11-12 10:16:47.360 CET [49M] DEBUG_SHMEM: LCM(4096, 1) == 4096 >= 0
2024-11-12 10:16:47.360 CET [49M] DEBUG_SHMEM: Adding "M        F" (len 6) to buffer in _findClientID() (src/datastructure.c:3
56), next_str_pos is 45503
2024-11-12 10:16:47.360 CET [49M] DEBUG_SHMEM: LCM(4096, 1) == 4096 >= 0
2024-11-12 10:16:47.361 CET [49M] DEBUG_SHMEM: Adding "Q        F" (len 6) to buffer in _findClientID() (src/datastructure.c:3
56), next_str_pos is 45509

About the hash collisions:

2024-11-12 10:30:27.814 CET [49M] INFO: Received: RT42 (42 -> 7)                                                               
2024-11-12 10:30:28.150 CET [49/T113] INFO: Searching for hash collisions in clients lookup table                              
2024-11-12 10:30:28.150 CET [49/T113] INFO: Found 0 hash collisions and 0 sorting errors in clients lookup table (scanned 100 e
lements)                                                                                                                       
2024-11-12 10:30:28.150 CET [49/T113] INFO: Searching for hash collisions in domains lookup table                              
2024-11-12 10:30:28.150 CET [49/T113] INFO: Found 0 hash collisions and 0 sorting errors in domains lookup table (scanned 2221 
elements)                                                                                                                      
2024-11-12 10:30:28.150 CET [49/T113] INFO: Searching for hash collisions in DNS cache lookup table                            
2024-11-12 10:30:28.150 CET [49/T113] INFO: Found 0 hash collisions and 0 sorting errors in DNS cache lookup table (scanned 137
0 elements)                                                                                                                    
2024-11-12 10:30:28.150 CET [49/T113] INFO: Recycle list fullness:                                                             
2024-11-12 10:30:28.150 CET [49/T113] INFO:   Clients: 0/65535 (0.00%)
2024-11-12 10:30:28.150 CET [49/T113] INFO:   Domains: 0/65535 (0.00%)
2024-11-12 10:30:28.150 CET [49/T113] INFO:   DNS Cache: 0/65535 (0.00%)

Seems okay, however, I'm not sure why it scans 100 clients. There should only be 3 (localhost, DoH, DoT).

@DL6ER
Copy link
Member

DL6ER commented Nov 12, 2024

Looking at the logs, we are in a bit of a chicken-and-egg-problem as the database already has some broken stuff which then "contaminates" FTL's strings on the history import during startup. I'd suggest to disable database importing for the moment,

sudo pihole-FTL --config database.DBimport false

and then restart again. You may also want to clean out the log file first to get rid of the binary stuff that is in there right now.

edit The 100 clients come about because FTL detects clients based on their (string) IP address and when the IP address is garbage, a new client is added for each new garbage string.

@bermeitinger-b
Copy link

bermeitinger-b commented Nov 12, 2024

I've deleted the old database and started new. It generated the following log:

pihole  | 2024-11-12 14:19:15.726 CET [49M] DEBUG_ANY: dnsmasq received signal 17                                                                                                             
pihole  | 2024-11-12 14:19:15.934 CET [49M] DEBUG_SHMEM: Reusing existing string "eth0" at 13244 in _FTL_new_query() (src/dnsmasq_interface.c:906)                                            
pihole  | 2024-11-12 14:19:15.935 CET [49M] DEBUG_SHMEM: Reusing existing string "0" at 12 in get_client_groupids() (src/database/gravity-db.c:730)                                           
pihole  | 2024-11-12 14:19:15.935 CET [49M] DEBUG_SHMEM: LCM(4096, 1) == 4096 >= 24                                                                                                           
pihole  | 2024-11-12 14:19:15.936 CET [49M] DEBUG_SHMEM: Reusing existing string "0" at 12 in get_client_groupids() (src/database/gravity-db.c:730)                                           
pihole  | 2024-11-12 14:19:15.936 CET [49M] DEBUG_SHMEM: LCM(4096, 1) == 4096 >= 24                                                                                                           
pihole  | 2024-11-12 14:19:15.937 CET [49M] DEBUG_SHMEM: Reusing existing string "0" at 12 in get_client_groupids() (src/database/gravity-db.c:730)                                           
pihole  | 2024-11-12 14:19:15.938 CET [49M] DEBUG_SHMEM: LCM(4096, 1) == 4096 >= 24                                                                                                           
pihole  | 2024-11-12 14:19:16.183 CET [49M] DEBUG_SHMEM: Adding "star-mini.c10r.facebook.com" (len 28) to buffer in _findDomainID() (src/datastructure.c:270), next_str_pos is 27632          
pihole  | 2024-11-12 14:19:16.966 CET [49M] DEBUG_SHMEM: Reusing existing string "www.youtube.com" at 3122 in _findDomainID() (src/datastructure.c:270)                                       
pihole  | 2024-11-12 14:19:17.039 CET [49/T85] INFO: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!                                                               
pihole  | 2024-11-12 14:19:17.039 CET [49/T85] INFO: ---------------------------->  FTL crashed!  <----------------------------                                                               
pihole  | 2024-11-12 14:19:17.039 CET [49/T85] INFO: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

The rest is the same as in the first logs above. As above, it did not restart automatically.

The log file is not binary anymore, so the network table is looking correctly.

@DL6ER
Copy link
Member

DL6ER commented Nov 12, 2024

Did you have the debugger gdb attached? How does the backtrace look like on this crash?

@bermeitinger-b
Copy link

bermeitinger-b commented Nov 12, 2024

Maybe:

Thread 1 "pihole-FTL" received signal SIGSEGV, Segmentation fault.
0x0000000000559fed in pcache1FetchNoMutex (createFlag=2, iKey=1, p=0x75dbc36e5cb8)
    at /app/src/database/sqlite3.c:56250
warning: 56250  /app/src/database/sqlite3.c: No such file or directory
(gdb) bt
#0  0x0000000000559fed in pcache1FetchNoMutex (createFlag=2, iKey=1, p=0x75dbc36e5cb8)
    at /app/src/database/sqlite3.c:56250
#1  pcache1Fetch (p=0x75dbc36e5cb8, iKey=1, createFlag=2) at /app/src/database/sqlite3.c:56307
#2  0x00000000005d873d in sqlite3PcacheFetch (createFlag=3, pgno=1, pCache=<optimized out>)
    at /app/src/database/sqlite3.c:54725
#3  getPageNormal (pPager=0x75dbc3658448, pgno=1, ppPage=0x7ffdbb3923d0, flags=0)
    at /app/src/database/sqlite3.c:62716
#4  0x00000000005e20cf in sqlite3PagerGet (flags=0, ppPage=0x7ffdbb3923d0, pgno=1, 
    pPager=<optimized out>) at /app/src/database/sqlite3.c:62908
#5  btreeGetPage (flags=0, ppPage=<synthetic pointer>, pgno=1, pBt=0x75dbc3397a08)
    at /app/src/database/sqlite3.c:72974
#6  lockBtree (pBt=<optimized out>) at /app/src/database/sqlite3.c:73918
#7  btreeBeginTrans (p=0x75dbc36f8c98, wrflag=0, pSchemaVersion=0x7ffdbb392530)
    at /app/src/database/sqlite3.c:74313
#8  0x000000000063ff0c in sqlite3VdbeExec (p=p@entry=0x75dbc363da58)
    at /app/src/database/sqlite3.c:97438
#9  0x0000000000646ae0 in sqlite3Step (p=0x75dbc363da58) at /app/src/database/sqlite3.c:91357
#10 sqlite3_step (pStmt=pStmt@entry=0x75dbc363da58) at /app/src/database/sqlite3.c:91418
#11 0x00000000004910c7 in domain_in_list (
    domain=domain@entry=0x75dbc364acf0 "1.0.16.172.in-addr.arpa", stmt=0x75dbc363da58, 
    listname=listname@entry=0x805baf "whitelist", domain_id=domain_id@entry=0x75dbc2942fe8)
    at /app/src/database/gravity-db.c:1180
#12 0x0000000000493d28 in in_allowlist (
    domain=domain@entry=0x75dbc364acf0 "1.0.16.172.in-addr.arpa", 
    dns_cache=dns_cache@entry=0x75dbc2942fd8, client=client@entry=0x75dbc2d0eab0)
    at /app/src/database/gravity-db.c:1282
#13 0x000000000040bfcc in FTL_check_blocking (queryID=queryID@entry=10847, 
    domainID=domainID@entry=39, clientID=clientID@entry=1022) at /app/src/dnsmasq_interface.c:1618
#14 0x000000000040f17f in _FTL_new_query (flags=flags@entry=524296, name=<optimized out>, 
    addr=addr@entry=0x7ffdbb392970, arg=<optimized out>, qtype=<optimized out>, id=33202, 
    proto=UDP, file=0x8072a6 "/app/src/dnsmasq/forward.c", line=1822)
    at /app/src/dnsmasq_interface.c:960
#15 0x00000000004cb49f in receive_query (listen=listen@entry=0x75dbc36fce00, 
    now=now@entry=1731420001) at /app/src/dnsmasq/forward.c:1822
#16 0x00000000004b9063 in check_dns_listeners (now=now@entry=1731420001)

and right after:

#0  releaseMemArray (p=0x75dbc36e4920, N=1) at /app/src/database/sqlite3.c:87133
#1  0x000000000056614e in releaseMemArray (N=<optimized out>, p=<optimized out>)
    at /app/src/database/sqlite3.c:87130
#2  sqlite3VdbeClearObject (p=0x75dbc3643268, db=0x75dbc365a018)
    at /app/src/database/sqlite3.c:88686
#3  sqlite3VdbeDelete (p=0x75dbc3643268) at /app/src/database/sqlite3.c:88723
#4  0x00000000005ea36d in sqlite3_finalize (pStmt=0x75dbc3643268)
    at /app/src/database/sqlite3.c:90625
#5  0x0000000000490a32 in gravityDB_finalize_client_statements (client=0x75dbc28302a8)
    at /app/src/database/gravity-db.c:925
#6  gravityDB_close () at /app/src/database/gravity-db.c:964
#7  0x000000000049365e in gravityDB_close () at /app/src/database/gravity-db.c:956
#8  0x0000000000408451 in cleanup (ret=ret@entry=1) at /app/src/daemon.c:374
#9  0x0000000000425ac8 in signal_handler (sig=<optimized out>, si=0x7ffdbb391eb0, 
    unused=<optimized out>) at /app/src/signals.c:266
#10 <signal handler called>
#11 0x0000000000559fed in pcache1FetchNoMutex (createFlag=2, iKey=1, p=0x75dbc36e5cb8)
    at /app/src/database/sqlite3.c:56250
#12 pcache1Fetch (p=0x75dbc36e5cb8, iKey=1, createFlag=2) at /app/src/database/sqlite3.c:56307
#13 0x00000000005d873d in sqlite3PcacheFetch (createFlag=3, pgno=1, pCache=<optimized out>)
    at /app/src/database/sqlite3.c:54725
#14 getPageNormal (pPager=0x75dbc3658448, pgno=1, ppPage=0x7ffdbb3923d0, flags=0)
    at /app/src/database/sqlite3.c:62716
#15 0x00000000005e20cf in sqlite3PagerGet (flags=0, ppPage=0x7ffdbb3923d0, pgno=1, 
    pPager=<optimized out>) at /app/src/database/sqlite3.c:62908
#16 btreeGetPage (flags=0, ppPage=<synthetic pointer>, pgno=1, pBt=0x75dbc3397a08)
    at /app/src/database/sqlite3.c:72974
#17 lockBtree (pBt=<optimized out>) at /app/src/database/sqlite3.c:73918
#18 btreeBeginTrans (p=0x75dbc36f8c98, wrflag=0, pSchemaVersion=0x7ffdbb392530)
    at /app/src/database/sqlite3.c:74313
#19 0x000000000063ff0c in sqlite3VdbeExec (p=p@entry=0x75dbc363da58)
    at /app/src/database/sqlite3.c:97438
#20 0x0000000000646ae0 in sqlite3Step (p=0x75dbc363da58) at /app/src/database/sqlite3.c:91357
#21 sqlite3_step (pStmt=pStmt@entry=0x75dbc363da58) at /app/src/database/sqlite3.c:91418
#22 0x00000000004910c7 in domain_in_list (
    domain=domain@entry=0x75dbc364acf0 "1.0.16.172.in-addr.arpa", stmt=0x75dbc363da58, 
    listname=listname@entry=0x805baf "whitelist", domain_id=domain_id@entry=0x75dbc2942fe8)
    at /app/src/database/gravity-db.c:1180
#23 0x0000000000493d28 in in_allowlist (
    domain=domain@entry=0x75dbc364acf0 "1.0.16.172.in-addr.arpa", 
    dns_cache=dns_cache@entry=0x75dbc2942fd8, client=client@entry=0x75dbc2d0eab0)
    at /app/src/database/gravity-db.c:1282
#24 0x000000000040bfcc in FTL_check_blocking (queryID=queryID@entry=10847, 
    domainID=domainID@entry=39, clientID=clientID@entry=1022) at /app/src/dnsmasq_interface.c:1618
#25 0x000000000040f17f in _FTL_new_query (flags=flags@entry=524296, name=<optimized out>, 
    addr=addr@entry=0x7ffdbb392970, arg=<optimized out>, qtype=<optimized out>, id=33202, 
    proto=UDP, file=0x8072a6 "/app/src/dnsmasq/forward.c", line=1822)
    at /app/src/dnsmasq_interface.c:960
#26 0x00000000004cb49f in receive_query (listen=listen@entry=0x75dbc36fce00, 
    now=now@entry=1731420001) at /app/src/dnsmasq/forward.c:1822
#27 0x00000000004b9063 in check_dns_listeners (now=now@entry=1731420001)
    at /app/src/dnsmasq/dnsmasq.c:1895
#28 0x00000000004bb278 in main_dnsmasq (argc=<optimized out>, argv=<optimized out>)
    at /app/src/dnsmasq/dnsmasq.c:1278
#29 0x00000000004020d7 in main (argc=<optimized out>, argv=0x7ffdbb392d68) at /app/src/main.c:123

Then, the whole container dies.

Edit: After some time, the glyphs reappear in the network table. I don't have a backtrace for those but will check the log.

@DL6ER
Copy link
Member

DL6ER commented Nov 13, 2024

Edit: After some time, the glyphs reappear in the network table. I don't have a backtrace for those but will check the log.

Did anything come out here? I've been looking at the backtraces yesterday but it was too late to reply. Now, looking on them, they do not make a lot more sense TBH. Both crashes happened deeply down inside the embedded sqlite3 source code
Image

but we don't know if this is cause or merely symptom of the string issues causing sqlite3 to trip over binary code in strings. Usually, it shouldn't but reporting sqlite3 bugs is a nightmare. Unless one can provide a clean and very small minimal-working-example (MWE) of the bug, they will not even try to investigate and lean back on "it is the application that is embedded sqlite3 that is causing issues".

We haven't been able to provide such a MWE for the one bug we reported back then but - fortunately - someone else did for some bug apparently caused by the same cause this allowed us to get the fix. Having said all this, I don't want to end in something like "sorry, we cannot do anything about it" but I furthermore don't see us really be able to do SQLite3 debugging - even worse if I cannot reproduce and "play" myself.

So let's look back at pihole-FTL and try to find a fix there. Did you already see the glyphs in the log file yesterday before the crash? If so, then this is definitely the next thing we need to fix. If you have the log file, I could provide you with an upload link via e-mail as I assume it'll be too large, even after gziping it. Just send me a quick mail to <my username here> @ pi-hole.net and I'll reply with a suitable link. Otherwise, if you want to share it via something, I'd be ready for downloading it from there, too.

@bermeitinger-b
Copy link

I don't think you're in a position to apologize ;) Thank you for your efforts.

I've started valgrind. Within docker, that's a bit complicated because stopping pihole-FTL stops the container. I've adjusted the docker-compose.yaml:

pihole:
    image: pihole:local
    ...
    entrypoint: /bin/bash
    tty: true

Then, I could start valgrind.

The error log is here:
https://0x0.st/XkkG.txt

It indicates something at /sbin/ip address show.

pihole-FTL also dies with many Thread 4 received signal SIG33, Real-time event 33

I hope this helps.

@DL6ER
Copy link
Member

DL6ER commented Nov 15, 2024

No, this is actually fine. There will be a lot of output, the log (or gdb if you have re-attached it as described in the valgrind guide) will tell you once FTL crashes. The "errors" shown here are okay, valgrind is very verbose in in general logs many false-positives. What remains is still some good detective work once we have all the logs and the crash.

@bermeitinger-b
Copy link

I hope this leads somewhere. I can't really reproduce the state. This time, it crashes after 58 minutes and it's detached with error 33. I've removed the nostops for 33 (and 37).

2024-11-15 19:50:12.529 CET [3151/F35] INFO: Received signal: Segmentation fault
2024-11-15 19:50:12.530 CET [3151/F35] INFO:      at address: 0x489d3fc 
2024-11-15 19:50:12.532 CET [3151/F35] INFO:      with code:  SEGV_MAPERR (Address not mapped to object)

And here the valgrind.log: https://0x0.st/Xk7C.log

There is one binary line in line 55 which I've removed. (If you need it, it's here https://0x0.st/Xk7F.bin)

@DL6ER
Copy link
Member

DL6ER commented Nov 16, 2024

Thanks. The important bit is

==3151== Invalid read of size 4
==3151==    at 0x41B27C: binsearch (lookup-table.c:94)
==3151==    by 0x41B27C: lookup_find_id (lookup-table.c:337)
==3151==    by 0x4095AB: _findCacheID (datastructure.c:475)
==3151==    by 0x40EDD1: _FTL_new_query (dnsmasq_interface.c:880)
==3151==    by 0x4C8E79: tcp_request (forward.c:2405)
==3151==    by 0x4B980C: check_dns_listeners (dnsmasq.c:2078)
==3151==    by 0x4BB897: main_dnsmasq (dnsmasq.c:1278)
==3151==    by 0x4020D6: main (main.c:123)
==3151==  Address 0x489d3fc is not stack'd, malloc'd or (recently) free'd

I did just push an update to the same debug branch (commit 26d1dd3), please re-build the container and 🤞

@bermeitinger-b
Copy link

Thanks, the new commit resulted in the probably same message:

459   │ ==2320== Invalid read of size 4
 460   │ ==2320==    at 0x41B27C: binsearch (lookup-table.c:94)
 461   │ ==2320==    by 0x41B27C: lookup_find_id (lookup-table.c:337)
 462   │ ==2320==    by 0x4095AB: _findCacheID (datastructure.c:475)
 463   │ ==2320==    by 0x40EDD1: _FTL_new_query (dnsmasq_interface.c:880)
 464   │ ==2320==    by 0x4C8E99: tcp_request (forward.c:2405)
 465   │ ==2320==    by 0x4B982C: check_dns_listeners (dnsmasq.c:2078)
 466   │ ==2320==    by 0x4BB8B7: main_dnsmasq (dnsmasq.c:1278)
 467   │ ==2320==    by 0x4020D6: main (main.c:123)
 468   │ ==2320==  Address 0x58767fc is not stack'd, malloc'd or (recently) free'd

Full log: https://0x0.st/XdHX.log

This time, I couldn't backtrace, maybe I disabled message?

I'm sure it's the correct version. From FTL.log:

2024-11-16 15:14:05.973 CET [33M] INFO: FTL branch: debug/no_fork
2024-11-16 15:14:05.976 CET [33M] INFO: FTL version: vDev-26d1dd3
2024-11-16 15:14:05.977 CET [33M] INFO: FTL commit: 26d1dd33
2024-11-16 15:14:05.978 CET [33M] INFO: FTL date: 2024-11-16 08:08:12 +0100

@DL6ER
Copy link
Member

DL6ER commented Nov 16, 2024

Too bad, so back to the drawing board. I did just push another update to the branch adding further debug output. It'd be good if you could update and try again. Once it crashes, we'd need the address the algorithm tried to access, like what you quoted from valgrind above and the last log line concerning what FTL tried to access, like

Inserting/Removing/Looking for element with ID ... and hash ... into/from/in ... lookup table (..., ... // .../.../...))

Please ensure you still have debug.shmem = true to see the additional output.

If you can attach both valgrind and gdb + we are lucky and the crash does not happen in a fork, it'd be interesting to get the following output in addition to backtrace:

print hash
print base
print mid
print size
print *try
print **try

edit The expected commit would be b4f194b

@bermeitinger-b
Copy link

This time, gdb spammed with "Thread 4 event 33" and the CPU usage was so busy with gdb and valgrind that I had to restart the server. So, I could not run these gdb commands.

These are the last 7 minutes in FTL.log: https://0x0.st/Xdbb.txt

And this is the valgrind.log: https://0x0.st/XdbZ.log

@DL6ER
Copy link
Member

DL6ER commented Nov 17, 2024

Thanks. Unfortunately, this is another crash in another location without the "Invalid read of size 4" section so we don't get the address it tried to look at. I pushed another commit (59c22db) that adds some extra out-of-bounds checking. Lets hope I'm not going down the wrong track here...

edit 1 It'll be interesting to see:

  1. Is there still a crash?
  2. if so, are there ERROR: ... lines in pihole-FTL.log ?

edit 2 I added another error message, updated the expected commit hash above

@bermeitinger-b
Copy link

Thanks.

I think it didn't crash where it could be traced. I've removed the SIG33 nostop but it's a different position:

Thread 6 received signal SIG33, Real-time event 33.                                                                                           
[Switching to Thread 132]                                                                                                                     
__cp_end () at src/thread/x86_64/syscall_cp.s:29                                                                                              
warning: 29     src/thread/x86_64/syscall_cp.s: No such file or directory                                                                     
(gdb) backtrace                                                                                                                               
#0  __cp_end () at src/thread/x86_64/syscall_cp.s:29                                                                                          
#1  0x00000000007f22e3 in __syscall_cp_c (nr=23, u=<optimized out>, v=<optimized out>, w=<optimized out>, x=<optimized out>,                  
    y=<optimized out>, z=0) at src/thread/pthread_cancel.c:33                                                                                 
#2  0x00000000007eb000 in select (n=n@entry=0, rfds=rfds@entry=0x0, wfds=wfds@entry=0x0, efds=efds@entry=0x0, tv=tv@entry=0x6122a00)          
    at src/select/select.c:39                                                                                                                 
#3  0x00000000006c1709 in FTLselect (nfds=nfds@entry=0, readfds=readfds@entry=0x0, writefds=writefds@entry=0x0,                               
    exceptfds=exceptfds@entry=0x0, timeout=timeout@entry=0x6122a00, file=file@entry=0x8016f3 "/app/src/timers.c",                             
    func=0x8691c0 <__FUNCTION__.0> "sleepms", line=65) at /app/src/syscalls/select.c:25                                                       
#4  0x000000000042723a in sleepms (milliseconds=<optimized out>) at /app/src/timers.c:65                                                      
#5  0x0000000000426db1 in thread_sleepms (thread=thread@entry=GC, milliseconds=<optimized out>) at /app/src/signals.c:500                     
#6  0x0000000000418477 in GC_thread (val=<optimized out>) at /app/src/gc.c:659                                                                
#7  0x00000000007f2fd0 in start (p=0x6122b00) at src/thread/pthread_create.c:207                                                              
#8  0x00000000007f465c in __clone () at src/thread/x86_64/clone.s:22                                                                          
Backtrace stopped: frame did not save the PC   
(gdb) print hash                                                                                                           10:01:39 [34/47899]
$1 = (const nettle_hash *) 0xb09f60 <nettle_sha256>
(gdb) print base
No symbol "base" in current context.
(gdb) print mid
No symbol "mid" in current context. 
(gdb) print size
$2 = 0
(gdb) print *try
No symbol "try" in current context. 
(gdb) print **try
No symbol "try" in current context. 
(gdb) continue
Continuing.

Thread 6 received signal SIG33, Real-time event 33.
__cp_end () at src/thread/x86_64/syscall_cp.s:29
29      in src/thread/x86_64/syscall_cp.s
(gdb) backtrac
#0  __cp_end () at src/thread/x86_64/syscall_cp.s:29
#1  0x00000000007f22e3 in __syscall_cp_c (nr=23, u=<optimized out>, v=<optimized out>, w=<optimized out>, x=<optimized out>, 
    y=<optimized out>, z=0) at src/thread/pthread_cancel.c:33
#2  0x00000000007eb000 in select (n=n@entry=0, rfds=rfds@entry=0x0, wfds=wfds@entry=0x0, efds=efds@entry=0x0, tv=tv@entry=0x6122a00)
    at src/select/select.c:39
#3  0x00000000006c1709 in FTLselect (nfds=nfds@entry=0, readfds=readfds@entry=0x0, writefds=writefds@entry=0x0, 
    exceptfds=exceptfds@entry=0x0, timeout=timeout@entry=0x6122a00, file=file@entry=0x8016f3 "/app/src/timers.c", 
    func=0x8691c0 <__FUNCTION__.0> "sleepms", line=65) at /app/src/syscalls/select.c:25
#4  0x000000000042723a in sleepms (milliseconds=<optimized out>) at /app/src/timers.c:65
#5  0x0000000000426db1 in thread_sleepms (thread=thread@entry=GC, milliseconds=<optimized out>) at /app/src/signals.c:500
#6  0x0000000000418477 in GC_thread (val=<optimized out>) at /app/src/gc.c:659
#7  0x00000000007f2fd0 in start (p=0x6122b00) at src/thread/pthread_create.c:207
#8  0x00000000007f465c in __clone () at src/thread/x86_64/clone.s:22
Backtrace stopped: frame did not save the PC
(gdb) continue
Continuing.

(Then, it's dead.)

valgrind.log: https://0x0.st/Xdbd.log

These are the last lines in FTL.log: https://0x0.st/Xdbn.txt

@DL6ER
Copy link
Member

DL6ER commented Nov 17, 2024

Yeah, it shouldn't stop at SIG33. When valgrind is attached, it uses SIG33 for internal messaging. Even a brief interruption like in your case causes valgrind to have the hiccups. Interestingly, I do not see some SIG33s but certainly not a flood of them even when I have valgrind and gdb running - but I don't think this is related.

@DL6ER
Copy link
Member

DL6ER commented Nov 17, 2024

Okay, I think I have something new. With red, very dry eyes, I have been staring at your previous log and found the following interesting lines:

2024-11-13 13:47:34.520 CET [957/F52] DEBUG_SHMEM: Resizing "FTL-domains-lookup" from 4096 to (1024 * 8) == 8192 (2.2MB used, 67.1MB total, FTL uses 2.2MB)
2024-11-13 13:47:34.520 CET [957/F52] DEBUG_SHMEM: SHMEM pointer updated: 0x7bb3e5d08000 -> 0x7bb3e56e4000 (4096 8192)
[...]
2024-11-13 13:47:34.521 CET [957/F52] INFO: Received signal: Segmentation fault
2024-11-13 13:47:34.521 CET [957/F52] INFO:      at address: 0x7bb3e5d080ec
2024-11-13 13:47:34.521 CET [957/F52] INFO:      with code:  SEGV_MAPERR (Address not mapped to object)

Okay ... so it tried to access memory at 0x7bb3e5d080ec which belongs to the old memory location 0x7bb3e5d08000 even though it logged one millisecond above that the shared memory pointer moved to 0x7bb3e56e4000.

I am actually quite confident that adding the missing remapping instructions (commit 341464f) fixes the bug we are seeing here. It also explains why it mostly happens in forks and why I haven't seen it myself before (my network is simply to quiet/not enough queries).

@bermeitinger-b
Copy link

I take my hat off to you while bowing with respect. You did it. 👍

With this branch, it's running since 10 hours without a crash. Thank you very much.

@schuettecarsten
Copy link
Author

I am actually quite confident that adding the missing remapping instructions (commit 341464f) fixes the bug we are seeing here. It also explains why it mostly happens in forks and why I haven't seen it myself before (my network is simply to quiet/not enough queries).

I just looked at your code. Is this code thread-safe? Or is thread safety no issue because of a global "lock" somewhere?

@DL6ER
Copy link
Member

DL6ER commented Nov 18, 2024

Thank you for confirming the fix!

I have now split this into two branches: The one you are currently on (debug/no_fork) got stripped down to the extra code ensuring no forking is happening whenever gdb is attached to ease future debugging. Furthermore, I have created a new branch called fix/binsearch_shm that has the fix for shared memory remapping.

I did that to ease review as these are basically two independent changes which should result in two independent pull requests (#2120 and #2121 ). I also removed a few of the commits adding more debug output which we didn't need in the end. No need to keep "dead" code around.


@schuettecarsten

I just looked at your code. Is this code thread-safe? Or is thread safety no issue because of a global "lock" somewhere?

We take care of only accessing these global memory sections when a global (shared-memory) lock is helt (lock_shm() and unlock_shm()). This to not only ensure thread-safety but even fork-safety as FTL does multi-processing both in threads and processes. We try to keep the overhead as small as possible by only holding the lock in sections that really need it.
So far, we have never identified the lock to be an issue as most systems are idle for so long that the lock is basically free to be taken right away for the vast majority of time.

@DL6ER
Copy link
Member

DL6ER commented Nov 19, 2024

The bug should be fixed in development by now. For docker users, the fix is in :nightly. I will close this as completed. Thank you all for your input and helping us making Pi-hole better for us all. Much appreciated!

@DL6ER DL6ER closed this as completed Nov 19, 2024
@schuettecarsten
Copy link
Author

I can confirm no crash after the patch. Thank you!

@MNLierman
Copy link

MNLierman commented Dec 28, 2024

The bug should be fixed in development by now. For docker users, the fix is in :nightly. I will close this as completed. Thank you all for your input and helping us making Pi-hole better for us all. Much appreciated!

Hello,

I appreciate the effort that's gone into PiHole, but I am facing ongoing issues with this crashing problem that seems unresolved still despite that you've stated it's bee resovled. Unfortunately, the frequent crashes persist, occurring every 30-60 minutes with the same error: Segmentation Fault (SEGV_MAPPER).

What I Think Might Be Happening

Based on my observations and investigations, primarily examining different logs, I believe the crashes are related to how Pi-hole handles large DNS responses. When a DNS reply is too large to fit into a single UDP packet, it gets truncated, resulting in a "reply is truncated" log entry. Immediately after this "reply is truncated," Pi-hole crashes. My educated technical guess is that there's a bug in Pi-hole's handling of these truncated responses. It might not be correctly checking the size of incoming data or is trying to access memory that isn't allocated, leading to a segmentation fault with the SEGV_MAPERR error (address not mapped to object). Essentially, Pi-hole could be attempting to process these truncated replies incorrectly, causing the crashes.

As mentioned, it's quite possible that when this happens, Pi-hole doesn't necessarily need to crash. Instead, it could gracefully handle the DNS error/truncated response, and either provide the client with what it has and drop the rest of the data, or at worst, drop the affected packets entirely to avoid crashing. If it's a decision between crashing and dropping the DNS response, then dropping it would be the better option. This doesn’t seem to be a valid reason for Pi-hole to crash. With improved error handling in critical areas, we could avoid spending so much time debugging issues and tracking down crash sources.

While I don’t use the same programming language as you, I always consider potential error scenarios in my projects, particularly where I don’t control the responses (like DNS responses). In such cases, I sometimes place try-catch blocks around entire functions or code sections, and I decide a course of action that incorporates one or more of the following: discard the data an exception is caught or something is null or out of bounds, retry x times, assume a default value, log the issue, and move on. The internet might go down, a cable might get unplugged, or a process might die due to Docker resource limits. Instead of crashing, there must be a more graceful way to handle critical Pi-hole functions? Such methods as retrying a DNS request if there's an error processing it (which I believe is the issue here) or providing the client only what it has, would be best. I don't know the circumstances or am familiar with the code behind PiHole so maybe my understanding of how it handles crashes is not complete, but I only provide my professional opinion here.

The error reports are attached at the bottom of my comment. While I'm here, I also wanted to address some other concerns about my experience with Pi-hole:

  1. Including Backtraces in Dev/Nightly Builds:
    Including backtraces in the dev or nightly builds would significantly streamline the process of providing detailed error reports. Is there a specific reason this isn't currently available, such as higher computational resource requirements or potential latency impacts on DNS lookups? If there's no significant impact on lookup latency or resource usage, then having backtraces in the development branches would be immensely helpful. This would enable users like myself to easily provide error reports or even attempt to debug issues independently, thus accelerating the resolution process.

    As DL6ER stated in the forums: "Attaching the gdb debugger also doesn't affect performance in any noticeable way (except, maybe, if your machine is realllyy slow)."

    So I really don't see any reason not to provide full backtracing and symbols in the dev branch of Docker.

    Despite none of this being included, I believe that I have come to a determination above as to what I believe is happening. PiHole is not handling large truncated DNS packets correctly which correlates with some of the comments above about DNS and memory addresses, and after searching for this problem for about 45 minutes, I believe this GitHub issue report is the same as my crashing, which means it's still not resovled.

  2. The Switch to Alpine in Development Images:
    The switch to Alpine in the Docker development images has introduced several challenges. While I understand that this is the development branch and there are no guarantees, this change has made much of the existing documentation, commands, and community resources incompatible. This is particularly frustrating because even the official documentation refers to commands like "service pihole-FTL restart," which are not available in Alpine. Additionally, there seems to be no way to install a service manager in a Docker container. I have found that commands such as pihole-FTL stop or pihole-FTL restart do not exist, and attempts to use variations like /etc/init.d/pihole-FTL stop or restart also fail. There doesn't seem to be a straightforward way to restart the Pi-hole service/process at all in the Alpine-based images, which complicates troubleshooting and maintenance.

  3. No Update Command for Docker Images:
    Disabling the update command for Docker images introduces unnecessary complexity. If I recall correctly, the v6 development included an auto-update option, which was later disabled. Yet, I can still find the script in /etc/.pihole and use the checkout commands to update PiHole, indicating that the functionality is there but disabled by default. This is particularly frustrating because PiHole does not natively support encrypted DNS, only plain text. Official guides recommend installing cloudflared, which is incompatible with the new Alpine images. Every time I update or pull a new image, I lose cloudflared and must reinstall and configure it from scratch. This adds a layer of inconvenience that detracts from the overall user experience. Allowing the update command to function in Docker images would streamline the process and maintain the configurations users rely on.

Thank you for your understanding and continued efforts to improve PiHole. I hope these points can be addressed

Here are the relevant error logs for this particular issue:

Dec 27 21:59:30 dnsmasq[68]: reply res-ocdi-public.trafficmanager.net is <CNAME>
Dec 27 21:59:30 dnsmasq[68]: reply res-2.public.onecdn.static.microsoft is <CNAME>
Dec 27 21:59:30 dnsmasq[68]: reply cdn-office.azureedge.net is <CNAME>
Dec 27 21:59:30 dnsmasq[68]: reply cdn-office.ec.azureedge.net is <CNAME>
Dec 27 21:59:30 dnsmasq[68]: reply scdn1cc4b.wpc.9aea3.sigmacdn.net is <CNAME>
Dec 27 21:59:30 dnsmasq[68]: reply sni1gl.wpc.sigmacdn.net is 2606:2800:11f:1cb7:261b:1f9c:2074:3c
<b>Dec 27 21:59:30 dnsmasq[68]: reply is truncated</b>
Dec 27 21:59:39 dnsmasq[67]: started, version pi-hole-v2.91test2 cachesize 9000
Dec 27 21:59:39 dnsmasq[67]: compile time options: IPv6 GNU-getopt no-DBus no-UBus no-i18n IDN2 DHCP DHCPv6 Lua TFTP no-conntrack ipset no-nftset auth DNSSEC loop-detect inotify dumpfile
Dec 27 21:59:39 dnsmasq[67]: using nameserver 127.0.0.1#5053
Dec 27 21:59:39 dnsmasq[67]: using nameserver ::1#5053
2024-12-27 21:51:19.128 MST [68/T108] INFO: Round-trip delay: 5.045474e+01 ms (excluded 0 outliers)
2024-12-27 21:51:19.128 MST [68/T191] INFO: NTP server listening on 0.0.0.0:123 (IPv4)
2024-12-27 21:51:19.128 MST [68/T192] INFO: NTP server listening on :::123 (IPv6)
<b>2024-12-27 21:59:30.585 MST [68M] INFO: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!</b>
2024-12-27 21:59:30.585 MST [68M] INFO: ---------------------------->  FTL crashed!  <----------------------------
2024-12-27 21:59:30.585 MST [68M] INFO: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2024-12-27 21:59:30.585 MST [68M] INFO: Please report a bug at https://github.com/pi-hole/FTL/issues
2024-12-27 21:59:30.585 MST [68M] INFO: and include in your report already the following details:
2024-12-27 21:59:30.585 MST [68M] INFO: FTL has been running for 496 seconds
2024-12-27 21:59:30.585 MST [68M] INFO: FTL branch: development
2024-12-27 21:59:30.585 MST [68M] INFO: FTL version: vDev-c04fa58
2024-12-27 21:59:30.585 MST [68M] INFO: FTL commit: c04fa584
2024-12-27 21:59:30.585 MST [68M] INFO: FTL date: 2024-12-22 08:39:41 +0100
2024-12-27 21:59:30.586 MST [68M] INFO: FTL user: started as pihole, ended as pihole
2024-12-27 21:59:30.586 MST [68M] INFO: Compiled for linux/arm64/v8 (compiled on CI) using cc (Alpine 14.2.0) 14.2.0
2024-12-27 21:59:30.586 MST [68M] INFO: Process details: MID: 68
2024-12-27 21:59:30.586 MST [68M] INFO:                  PID: 68
2024-12-27 21:59:30.586 MST [68M] INFO:                  TID: 68
2024-12-27 21:59:30.586 MST [68M] INFO:                  Name: pihole-FTL
2024-12-27 21:59:30.586 MST [68M] INFO: Received signal: Segmentation fault
2024-12-27 21:59:30.586 MST [68M] INFO:      at address: 0x34
2024-12-27 21:59:30.586 MST [68M] INFO:      with code:  SEGV_MAPERR (Address not mapped to object)
2024-12-27 21:59:30.586 MST [68M] INFO: !!! INFO: pihole-FTL has not been compiled with glibc/backtrace support, not generating one !!!
2024-12-27 21:59:30.586 MST [68M] INFO: ------ Listing content of directory /dev/shm ------
2024-12-27 21:59:30.586 MST [68M] INFO: File Mode User:Group      Size  Filename
2024-12-27 21:59:30.586 MST [68M] INFO: rwxrwxrwx root:root       360   .
2024-12-27 21:59:30.586 MST [68M] INFO: rwxr-xr-x root:root         5K  ..
2024-12-27 21:59:30.586 MST [68M] INFO: rw------- pihole:pihole   786K  FTL-recycler
2024-12-27 21:59:30.586 MST [68M] INFO: rw------- pihole:pihole     4K  FTL-dns-cache-lookup
2024-12-27 21:59:30.586 MST [68M] INFO: rw------- pihole:pihole     4K  FTL-domains-lookup
2024-12-27 21:59:30.586 MST [68M] INFO: rw------- pihole:pihole     4K  FTL-clients-lookup
2024-12-27 21:59:30.587 MST [68M] INFO: rw------- pihole:pihole   569K  FTL-fifo-log
2024-12-27 21:59:30.587 MST [68M] INFO: rw------- pihole:pihole     4K  FTL-per-client-regex
2024-12-27 21:59:30.587 MST [68M] INFO: rw------- pihole:pihole    20K  FTL-dns-cache
2024-12-27 21:59:30.587 MST [68M] INFO: rw------- pihole:pihole     8K  FTL-overTime
2024-12-27 21:59:30.587 MST [68M] INFO: rw------- pihole:pihole   885K  FTL-queries
2024-12-27 21:59:30.587 MST [68M] INFO: rw------- pihole:pihole    29K  FTL-upstreams
2024-12-27 21:59:30.587 MST [68M] INFO: rw------- pihole:pihole   348K  FTL-clients
2024-12-27 21:59:30.587 MST [68M] INFO: rw------- pihole:pihole    16K  FTL-domains
2024-12-27 21:59:30.587 MST [68M] INFO: rw------- pihole:pihole    82K  FTL-strings
2024-12-27 21:59:30.588 MST [68M] INFO: rw------- pihole:pihole   144   FTL-settings
2024-12-27 21:59:30.588 MST [68M] INFO: rw------- pihole:pihole   328   FTL-counters
2024-12-27 21:59:30.588 MST [68M] INFO: rw------- pihole:pihole    88   FTL-lock
2024-12-27 21:59:30.588 MST [68M] INFO: ---------------------------------------------------
2024-12-27 21:59:30.588 MST [68M] INFO: Please also include some lines from above the !!!!!!!!! header.
2024-12-27 21:59:30.588 MST [68M] INFO: Thank you for helping us to improve our FTL engine!
2024-12-27 21:59:30.588 MST [68M] INFO: Waiting for threads to join
2024-12-27 21:59:30.588 MST [68M] INFO: Thread database (0) is idle, terminating it.
2024-12-27 21:59:30.588 MST [68M] INFO: Thread housekeeper (1) is idle, terminating it.
2024-12-27 21:59:30.588 MST [68M] INFO: Thread dns-client (2) is idle, terminating it.
2024-12-27 21:59:30.588 MST [68M] INFO: Thread timer (3) is idle, terminating it.
2024-12-27 21:59:30.588 MST [68M] INFO: Thread ntp-client (4) is idle, terminating it.
2024-12-27 21:59:30.588 MST [68M] INFO: All threads joined
2024-12-27 21:59:30.589 MST [68M] INFO: Stored 0 API sessions in the database
2024-12-27 21:59:30.847 MST [68M] INFO: ########## FTL terminated after 8m 16s  (code 1)! ##########
2024-12-27 21:59:38.969 MST [67M] INFO: ########## FTL started on pihole01! ##########
2024-12-27 21:59:38.969 MST [67M] INFO: FTL branch: development
2024-12-27 21:59:38.969 MST [67M] INFO: FTL version: vDev-c04fa58
2024-12-27 21:59:38.969 MST [67M] INFO: FTL commit: c04fa584
2024-12-27 21:59:38.969 MST [67M] INFO: FTL date: 2024-12-22 08:39:41 +0100
2024-12-27 21:59:38.969 MST [67M] INFO: FTL user: pihole
2024-12-27 21:59:38.969 MST [67M] INFO: Compiled for linux/arm64/v8 (compiled on CI) using cc (Alpine 14.2.0) 14.2.0
2024-12-27 21:59:38.971 MST [67M] INFO: 2 FTLCONF environment variables found (0 used, 0 invalid, 2 ignored)
2024-12-27 21:59:38.973 MST [67M] WARNING: [?] FTLCONF_LOCAL_IPV4 is unknown, did you mean any of these?
2024-12-27 21:59:38.973 MST [67M] WARNING:     - FTLCONF_debug_all
2024-12-27 21:59:38.974 MST [67M] WARNING: [?] FTLCONF_LOCAL_IPV6 is unknown, did you mean any of these?
2024-12-27 21:59:38.975 MST [67M] WARNING:     - FTLCONF_dhcp_ipv6
2024-12-27 21:59:38.976 MST [67M] INFO: Wrote config file:
2024-12-27 21:59:38.976 MST [67M] INFO:  - 150 total entries
2024-12-27 21:59:38.976 MST [67M] INFO:  - 131 entries are default
2024-12-27 21:59:38.976 MST [67M] INFO:  - 19 entries are modified
2024-12-27 21:59:38.977 MST [67M] INFO:  - 0 entries are forced through environment
2024-12-27 21:59:38.978 MST [67M] INFO: Parsed config file /etc/pihole/pihole.toml successfully
2024-12-27 21:59:38.982 MST [67M] INFO: PID of FTL process: 67
2024-12-27 21:59:38.982 MST [67M] INFO: Not sleeping as system has finished booting
2024-12-27 21:59:38.983 MST [67M] INFO: listening on 0.0.0.0 port 53
2024-12-27 21:59:38.983 MST [67M] INFO: listening on :: port 53
2024-12-27 21:59:38.984 MST [67M] INFO: PID of FTL process: 67
2024-12-27 21:59:38.985 MST [67M] INFO: Database version is 21
2024-12-27 21:59:38.986 MST [67M] INFO: Database successfully initialized
2024-12-27 21:59:39.195 MST [67M] INFO: Imported 9032 queries from the on-disk database (it has 46109 rows)
2024-12-27 21:59:39.196 MST [67M] INFO: Parsing queries in database
2024-12-27 21:59:39.259 MST [67M] INFO: Imported 9032 queries from the long-term database
2024-12-27 21:59:39.260 MST [67M] INFO:  -> Total DNS queries: 9032
2024-12-27 21:59:39.260 MST [67M] INFO:  -> Cached DNS queries: 4643
2024-12-27 21:59:39.260 MST [67M] INFO:  -> Forwarded DNS queries: 4088
2024-12-27 21:59:39.260 MST [67M] INFO:  -> Blocked DNS queries: 82
2024-12-27 21:59:39.260 MST [67M] INFO:  -> Unknown DNS queries: 0
2024-12-27 21:59:39.260 MST [67M] INFO:  -> Unique domains: 431
2024-12-27 21:59:39.260 MST [67M] INFO:  -> Unique clients: 5
2024-12-27 21:59:39.260 MST [67M] INFO:  -> DNS cache records: 19
2024-12-27 21:59:39.260 MST [67M] INFO:  -> Known forward destinations: 3
2024-12-27 21:59:39.444 MST [67M] INFO: FTL is running as user pihole (UID 100)
2024-12-27 21:59:39.444 MST [67M] INFO: Reading certificate from /etc/pihole/tls.pem ...
2024-12-27 21:59:39.446 MST [67M] WARNING: SSL/TLS certificate /etc/pihole/tls.pem does not match domain pihole01.lan!
2024-12-27 21:59:39.447 MST [67M] INFO: Using SSL/TLS certificate file /etc/pihole/tls.pem
2024-12-27 21:59:39.448 MST [67M] INFO: Restored 0 API sessions from the database
2024-12-27 21:59:39.454 MST [67M] INFO: Blocking status is enabled
2024-12-27 21:59:39.547 MST [67/T108] INFO: Compiled 0 allow and 0 deny regex for 5 clients in 0.3 msec
2024-12-27 21:59:43.862 MST [67/T107] INFO: Received 8/8 valid NTP replies from pool.ntp.org
2024-12-27 21:59:43.862 MST [67/T107] INFO: Time offset: 7.698536e-01 ms (excluded 1 outliers)
2024-12-27 21:59:43.862 MST [67/T107] INFO: Round-trip delay: 5.091511e+01 ms (excluded 1 outliers)
2024-12-27 21:59:43.862 MST [67/T191] INFO: NTP server listening on 0.0.0.0:123 (IPv4)
2024-12-27 21:59:43.862 MST [67/T192] INFO: NTP server listening on :::123 (IPv6)

5 MINUTES LATER:

Dec 27 22:07:08 dnsmasq[67]: reply d3tojzvpbuo41f.cloudfront.net is 2600:9000:265a:a800:d:2619:1cc0:93a1
Dec 27 22:07:08 dnsmasq[67]: reply d3tojzvpbuo41f.cloudfront.net is 2600:9000:265a:8600:d:2619:1cc0:93a1
Dec 27 22:07:08 dnsmasq[67]: reply d3tojzvpbuo41f.cloudfront.net is 2600:9000:265a:3200:d:2619:1cc0:93a1
<b>Dec 27 22:07:08 dnsmasq[67]: reply is truncated</b>
Dec 27 22:07:17 dnsmasq[68]: started, version pi-hole-v2.91test2 cachesize 9000
Dec 27 22:07:17 dnsmasq[68]: compile time options: IPv6 GNU-getopt no-DBus no-UBus no-i18n IDN2 DHCP DHCPv6 Lua TFTP no-conntrack ipset no-nftset auth DNSSEC loop-detect inotify dumpfile
Dec 27 22:07:17 dnsmasq[68]: using nameserver 127.0.0.1#5053
Dec 27 22:07:17 dnsmasq[68]: using nameserver ::1#5053
2024-12-27 21:59:39.448 MST [67M] INFO: Restored 0 API sessions from the database
2024-12-27 21:59:39.454 MST [67M] INFO: Blocking status is enabled
2024-12-27 21:59:39.547 MST [67/T108] INFO: Compiled 0 allow and 0 deny regex for 5 clients in 0.3 msec
2024-12-27 21:59:43.862 MST [67/T107] INFO: Received 8/8 valid NTP replies from pool.ntp.org
2024-12-27 21:59:43.862 MST [67/T107] INFO: Time offset: 7.698536e-01 ms (excluded 1 outliers)
2024-12-27 21:59:43.862 MST [67/T107] INFO: Round-trip delay: 5.091511e+01 ms (excluded 1 outliers)
2024-12-27 21:59:43.862 MST [67/T191] INFO: NTP server listening on 0.0.0.0:123 (IPv4)
2024-12-27 21:59:43.862 MST [67/T192] INFO: NTP server listening on :::123 (IPv6)
2024-12-27 22:07:08.420 MST [67M] INFO: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2024-12-27 22:07:08.420 MST [67M] INFO: ---------------------------->  FTL crashed!  <----------------------------
2024-12-27 22:07:08.420 MST [67M] INFO: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2024-12-27 22:07:08.420 MST [67M] INFO: Please report a bug at https://github.com/pi-hole/FTL/issues
2024-12-27 22:07:08.420 MST [67M] INFO: and include in your report already the following details:
2024-12-27 22:07:08.420 MST [67M] INFO: FTL has been running for 450 seconds
2024-12-27 22:07:08.420 MST [67M] INFO: FTL branch: development
2024-12-27 22:07:08.420 MST [67M] INFO: FTL version: vDev-c04fa58
2024-12-27 22:07:08.420 MST [67M] INFO: FTL commit: c04fa584
2024-12-27 22:07:08.420 MST [67M] INFO: FTL date: 2024-12-22 08:39:41 +0100
2024-12-27 22:07:08.420 MST [67M] INFO: FTL user: started as pihole, ended as pihole
2024-12-27 22:07:08.420 MST [67M] INFO: Compiled for linux/arm64/v8 (compiled on CI) using cc (Alpine 14.2.0) 14.2.0
2024-12-27 22:07:08.420 MST [67M] INFO: Process details: MID: 67
2024-12-27 22:07:08.420 MST [67M] INFO:                  PID: 67
2024-12-27 22:07:08.421 MST [67M] INFO:                  TID: 67
2024-12-27 22:07:08.421 MST [67M] INFO:                  Name: pihole-FTL
2024-12-27 22:07:08.421 MST [67M] INFO: Received signal: Segmentation fault
2024-12-27 22:07:08.421 MST [67M] INFO:      at address: 0x34
2024-12-27 22:07:08.421 MST [67M] INFO:      with code:  SEGV_MAPERR (Address not mapped to object)
2024-12-27 22:07:08.421 MST [67M] INFO: !!! INFO: pihole-FTL has not been compiled with glibc/backtrace support, not generating one !!!
2024-12-27 22:07:08.421 MST [67M] INFO: ------ Listing content of directory /dev/shm ------
2024-12-27 22:07:08.421 MST [67M] INFO: File Mode User:Group      Size  Filename
2024-12-27 22:07:08.421 MST [67M] INFO: rwxrwxrwx root:root       360   .
2024-12-27 22:07:08.421 MST [67M] INFO: rwxr-xr-x root:root         5K  ..
2024-12-27 22:07:08.421 MST [67M] INFO: rw------- pihole:pihole   786K  FTL-recycler
2024-12-27 22:07:08.421 MST [67M] INFO: rw------- pihole:pihole     4K  FTL-dns-cache-lookup
2024-12-27 22:07:08.421 MST [67M] INFO: rw------- pihole:pihole     4K  FTL-domains-lookup
2024-12-27 22:07:08.421 MST [67M] INFO: rw------- pihole:pihole     4K  FTL-clients-lookup
2024-12-27 22:07:08.421 MST [67M] INFO: rw------- pihole:pihole   569K  FTL-fifo-log
2024-12-27 22:07:08.422 MST [67M] INFO: rw------- pihole:pihole     4K  FTL-per-client-regex
2024-12-27 22:07:08.422 MST [67M] INFO: rw------- pihole:pihole    20K  FTL-dns-cache
2024-12-27 22:07:08.422 MST [67M] INFO: rw------- pihole:pihole     8K  FTL-overTime
2024-12-27 22:07:08.422 MST [67M] INFO: rw------- pihole:pihole   885K  FTL-queries
2024-12-27 22:07:08.422 MST [67M] INFO: rw------- pihole:pihole    29K  FTL-upstreams
2024-12-27 22:07:08.422 MST [67M] INFO: rw------- pihole:pihole   348K  FTL-clients
2024-12-27 22:07:08.422 MST [67M] INFO: rw------- pihole:pihole    16K  FTL-domains
2024-12-27 22:07:08.422 MST [67M] INFO: rw------- pihole:pihole    82K  FTL-strings
2024-12-27 22:07:08.422 MST [67M] INFO: rw------- pihole:pihole   144   FTL-settings
2024-12-27 22:07:08.422 MST [67M] INFO: rw------- pihole:pihole   328   FTL-counters
2024-12-27 22:07:08.422 MST [67M] INFO: rw------- pihole:pihole    88   FTL-lock
2024-12-27 22:07:08.423 MST [67M] INFO: ---------------------------------------------------
2024-12-27 22:07:08.423 MST [67M] INFO: Please also include some lines from above the !!!!!!!!! header.
2024-12-27 22:07:08.423 MST [67M] INFO: Thank you for helping us to improve our FTL engine!
2024-12-27 22:07:08.423 MST [67M] INFO: Waiting for threads to join
2024-12-27 22:07:08.423 MST [67M] INFO: Thread database (0) is idle, terminating it.
2024-12-27 22:07:08.423 MST [67M] INFO: Thread housekeeper (1) is idle, terminating it.
2024-12-27 22:07:08.423 MST [67M] INFO: Thread dns-client (2) is idle, terminating it.
2024-12-27 22:07:08.423 MST [67M] INFO: Thread timer (3) is idle, terminating it.
2024-12-27 22:07:08.423 MST [67M] INFO: Thread ntp-client (4) is idle, terminating it.
2024-12-27 22:07:08.423 MST [67M] INFO: All threads joined
2024-12-27 22:07:08.424 MST [67M] INFO: Stored 0 API sessions in the database
2024-12-27 22:07:08.507 MST [67M] INFO: ########## FTL terminated after 7m 29s  (code 1)! ##########
2024-12-27 22:07:16.611 MST [68M] INFO: ########## FTL started on pihole01! ##########
2024-12-27 22:07:16.611 MST [68M] INFO: FTL branch: development
2024-12-27 22:07:16.611 MST [68M] INFO: FTL version: vDev-c04fa58
2024-12-27 22:07:16.611 MST [68M] INFO: FTL commit: c04fa584
2024-12-27 22:07:16.611 MST [68M] INFO: FTL date: 2024-12-22 08:39:41 +0100
2024-12-27 22:07:16.611 MST [68M] INFO: FTL user: pihole
2024-12-27 22:07:16.611 MST [68M] INFO: Compiled for linux/arm64/v8 (compiled on CI) using cc (Alpine 14.2.0) 14.2.0
2024-12-27 22:07:16.614 MST [68M] INFO: 2 FTLCONF environment variables found (0 used, 0 invalid, 2 ignored)
2024-12-27 22:07:16.615 MST [68M] WARNING: [?] FTLCONF_LOCAL_IPV4 is unknown, did you mean any of these?
2024-12-27 22:07:16.615 MST [68M] WARNING:     - FTLCONF_debug_all
2024-12-27 22:07:16.617 MST [68M] WARNING: [?] FTLCONF_LOCAL_IPV6 is unknown, did you mean any of these?
2024-12-27 22:07:16.617 MST [68M] WARNING:     - FTLCONF_dhcp_ipv6
2024-12-27 22:07:16.618 MST [68M] INFO: Wrote config file:
2024-12-27 22:07:16.618 MST [68M] INFO:  - 150 total entries
2024-12-27 22:07:16.618 MST [68M] INFO:  - 131 entries are default
2024-12-27 22:07:16.618 MST [68M] INFO:  - 19 entries are modified
2024-12-27 22:07:16.619 MST [68M] INFO:  - 0 entries are forced through environment
2024-12-27 22:07:16.620 MST [68M] INFO: Parsed config file /etc/pihole/pihole.toml successfully
2024-12-27 22:07:16.624 MST [68M] INFO: PID of FTL process: 68
2024-12-27 22:07:16.624 MST [68M] INFO: Not sleeping as system has finished booting
2024-12-27 22:07:16.625 MST [68M] INFO: listening on 0.0.0.0 port 53
2024-12-27 22:07:16.625 MST [68M] INFO: listening on :: port 53
2024-12-27 22:07:16.629 MST [68M] INFO: PID of FTL process: 68
2024-12-27 22:07:16.630 MST [68M] INFO: Database version is 21
2024-12-27 22:07:16.631 MST [68M] INFO: Database successfully initialized
2024-12-27 22:07:16.832 MST [68M] INFO: Imported 9036 queries from the on-disk database (it has 46129 rows)
2024-12-27 22:07:16.832 MST [68M] INFO: Parsing queries in database
2024-12-27 22:07:16.894 MST [68M] INFO: Imported 9036 queries from the long-term database
2024-12-27 22:07:16.894 MST [68M] INFO:  -> Total DNS queries: 9036
2024-12-27 22:07:16.894 MST [68M] INFO:  -> Cached DNS queries: 4645
2024-12-27 22:07:16.894 MST [68M] INFO:  -> Forwarded DNS queries: 4095
2024-12-27 22:07:16.894 MST [68M] INFO:  -> Blocked DNS queries: 82
2024-12-27 22:07:16.894 MST [68M] INFO:  -> Unknown DNS queries: 0
2024-12-27 22:07:16.894 MST [68M] INFO:  -> Unique domains: 431
2024-12-27 22:07:16.894 MST [68M] INFO:  -> Unique clients: 5
2024-12-27 22:07:16.894 MST [68M] INFO:  -> DNS cache records: 19
2024-12-27 22:07:16.894 MST [68M] INFO:  -> Known forward destinations: 3
2024-12-27 22:07:17.080 MST [68M] INFO: FTL is running as user pihole (UID 100)
2024-12-27 22:07:17.080 MST [68M] INFO: Reading certificate from /etc/pihole/tls.pem ...
2024-12-27 22:07:17.080 MST [68M] WARNING: SSL/TLS certificate /etc/pihole/tls.pem does not match domain pihole01.lan!
2024-12-27 22:07:17.082 MST [68M] INFO: Using SSL/TLS certificate file /etc/pihole/tls.pem
2024-12-27 22:07:17.083 MST [68M] INFO: Restored 0 API sessions from the database
2024-12-27 22:07:17.089 MST [68M] INFO: Blocking status is enabled
2024-12-27 22:07:17.183 MST [68/T108] INFO: Compiled 0 allow and 0 deny regex for 5 clients in 0.3 msec
2024-12-27 22:07:21.499 MST [68/T107] INFO: Received 8/8 valid NTP replies from pool.ntp.org
2024-12-27 22:07:21.499 MST [68/T107] INFO: Time offset: 1.193792e+01 ms (excluded 0 outliers)
2024-12-27 22:07:21.499 MST [68/T107] INFO: Round-trip delay: 5.170822e+01 ms (excluded 0 outliers)
2024-12-27 22:07:21.499 MST [68/T200] INFO: NTP server listening on 0.0.0.0:123 (IPv4)
2024-12-27 22:07:21.499 MST [68/T201] INFO: NTP server listening on :::123 (IPv6)

50 MINUTES LATER:

Dec 27 22:58:55 dnsmasq[68]: reply d23d3wcthtl67x.cloudfront.net is 2600:9000:265a:fe00:15:d9c0:ef40:93a1
Dec 27 22:58:55 dnsmasq[68]: reply d23d3wcthtl67x.cloudfront.net is 2600:9000:265a:1000:15:d9c0:ef40:93a1
Dec 27 22:58:55 dnsmasq[68]: reply d23d3wcthtl67x.cloudfront.net is 2600:9000:265a:b000:15:d9c0:ef40:93a1
<b>Dec 27 22:58:55 dnsmasq[68]: reply is truncated</b>
Dec 27 22:59:03 dnsmasq[68]: started, version pi-hole-v2.91test2 cachesize 9000
Dec 27 22:59:03 dnsmasq[68]: compile time options: IPv6 GNU-getopt no-DBus no-UBus no-i18n IDN2 DHCP DHCPv6 Lua TFTP no-conntrack ipset no-nftset auth DNSSEC loop-detect inotify dumpfile
Dec 27 22:59:03 dnsmasq[68]: using nameserver 127.0.0.1#5053
Dec 27 22:59:03 dnsmasq[68]: using nameserver ::1#5053
<b>2024-12-27 22:58:55.241 MST [68M] INFO: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!</b>
2024-12-27 22:58:55.241 MST [68M] INFO: ---------------------------->  FTL crashed!  <----------------------------
2024-12-27 22:58:55.241 MST [68M] INFO: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2024-12-27 22:58:55.241 MST [68M] INFO: Please report a bug at https://github.com/pi-hole/FTL/issues
2024-12-27 22:58:55.241 MST [68M] INFO: and include in your report already the following details:
2024-12-27 22:58:55.241 MST [68M] INFO: FTL has been running for 3099 seconds
2024-12-27 22:58:55.241 MST [68M] INFO: FTL branch: development
2024-12-27 22:58:55.241 MST [68M] INFO: FTL version: vDev-c04fa58
2024-12-27 22:58:55.241 MST [68M] INFO: FTL commit: c04fa584
2024-12-27 22:58:55.241 MST [68M] INFO: FTL date: 2024-12-22 08:39:41 +0100
2024-12-27 22:58:55.241 MST [68M] INFO: FTL user: started as pihole, ended as pihole
2024-12-27 22:58:55.241 MST [68M] INFO: Compiled for linux/arm64/v8 (compiled on CI) using cc (Alpine 14.2.0) 14.2.0
2024-12-27 22:58:55.241 MST [68M] INFO: Process details: MID: 68
2024-12-27 22:58:55.241 MST [68M] INFO:                  PID: 68
2024-12-27 22:58:55.241 MST [68M] INFO:                  TID: 68
2024-12-27 22:58:55.242 MST [68M] INFO:                  Name: pihole-FTL
2024-12-27 22:58:55.242 MST [68M] INFO: Received signal: Segmentation fault
2024-12-27 22:58:55.242 MST [68M] INFO:      at address: 0x34
2024-12-27 22:58:55.242 MST [68M] INFO:      with code:  SEGV_MAPERR (Address not mapped to object)
2024-12-27 22:58:55.242 MST [68M] INFO: !!! INFO: pihole-FTL has not been compiled with glibc/backtrace support, not generating one !!!
2024-12-27 22:58:55.242 MST [68M] INFO: ------ Listing content of directory /dev/shm ------
2024-12-27 22:58:55.242 MST [68M] INFO: File Mode User:Group      Size  Filename
2024-12-27 22:58:55.242 MST [68M] INFO: rwxrwxrwx root:root       360   .
2024-12-27 22:58:55.242 MST [68M] INFO: rwxr-xr-x root:root         5K  ..
2024-12-27 22:58:55.242 MST [68M] INFO: rw------- pihole:pihole   786K  FTL-recycler
2024-12-27 22:58:55.242 MST [68M] INFO: rw------- pihole:pihole     4K  FTL-dns-cache-lookup
2024-12-27 22:58:55.242 MST [68M] INFO: rw------- pihole:pihole     4K  FTL-domains-lookup
2024-12-27 22:58:55.242 MST [68M] INFO: rw------- pihole:pihole     4K  FTL-clients-lookup
2024-12-27 22:58:55.242 MST [68M] INFO: rw------- pihole:pihole   569K  FTL-fifo-log
2024-12-27 22:58:55.242 MST [68M] INFO: rw------- pihole:pihole     4K  FTL-per-client-regex
2024-12-27 22:58:55.243 MST [68M] INFO: rw------- pihole:pihole    20K  FTL-dns-cache
2024-12-27 22:58:55.243 MST [68M] INFO: rw------- pihole:pihole     8K  FTL-overTime
2024-12-27 22:58:55.243 MST [68M] INFO: rw------- pihole:pihole   885K  FTL-queries
2024-12-27 22:58:55.243 MST [68M] INFO: rw------- pihole:pihole    29K  FTL-upstreams
2024-12-27 22:58:55.243 MST [68M] INFO: rw------- pihole:pihole   348K  FTL-clients
2024-12-27 22:58:55.243 MST [68M] INFO: rw------- pihole:pihole    16K  FTL-domains
2024-12-27 22:58:55.243 MST [68M] INFO: rw------- pihole:pihole    82K  FTL-strings
2024-12-27 22:58:55.243 MST [68M] INFO: rw------- pihole:pihole   144   FTL-settings
2024-12-27 22:58:55.243 MST [68M] INFO: rw------- pihole:pihole   328   FTL-counters
2024-12-27 22:58:55.243 MST [68M] INFO: rw------- pihole:pihole    88   FTL-lock
2024-12-27 22:58:55.244 MST [68M] INFO: ---------------------------------------------------
2024-12-27 22:58:55.244 MST [68M] INFO: Please also include some lines from above the !!!!!!!!! header.
2024-12-27 22:58:55.244 MST [68M] INFO: Thank you for helping us to improve our FTL engine!
2024-12-27 22:58:55.244 MST [68M] INFO: Waiting for threads to join
2024-12-27 22:58:55.244 MST [68M] INFO: Thread database (0) is idle, terminating it.
2024-12-27 22:58:55.244 MST [68M] INFO: Thread housekeeper (1) is idle, terminating it.
2024-12-27 22:58:55.244 MST [68M] INFO: Thread dns-client (2) is idle, terminating it.
2024-12-27 22:58:55.244 MST [68M] INFO: Thread timer (3) is idle, terminating it.
2024-12-27 22:58:55.244 MST [68M] INFO: Thread ntp-client (4) is idle, terminating it.
2024-12-27 22:58:55.244 MST [68M] INFO: All threads joined
2024-12-27 22:58:55.245 MST [68M] INFO: Stored 0 API sessions in the database
2024-12-27 22:58:55.340 MST [68M] INFO: ########## FTL terminated after 51m 38s  (code 1)! ##########
2024-12-27 22:59:03.380 MST [68M] INFO: ########## FTL started on pihole01! ##########
2024-12-27 22:59:03.380 MST [68M] INFO: FTL branch: development
2024-12-27 22:59:03.381 MST [68M] INFO: FTL version: vDev-c04fa58
2024-12-27 22:59:03.381 MST [68M] INFO: FTL commit: c04fa584
2024-12-27 22:59:03.381 MST [68M] INFO: FTL date: 2024-12-22 08:39:41 +0100
2024-12-27 22:59:03.381 MST [68M] INFO: FTL user: pihole
2024-12-27 22:59:03.381 MST [68M] INFO: Compiled for linux/arm64/v8 (compiled on CI) using cc (Alpine 14.2.0) 14.2.0
2024-12-27 22:59:03.383 MST [68M] INFO: 2 FTLCONF environment variables found (0 used, 0 invalid, 2 ignored)
2024-12-27 22:59:03.385 MST [68M] WARNING: [?] FTLCONF_LOCAL_IPV4 is unknown, did you mean any of these?
2024-12-27 22:59:03.385 MST [68M] WARNING:     - FTLCONF_debug_all
2024-12-27 22:59:03.386 MST [68M] WARNING: [?] FTLCONF_LOCAL_IPV6 is unknown, did you mean any of these?
2024-12-27 22:59:03.386 MST [68M] WARNING:     - FTLCONF_dhcp_ipv6
2024-12-27 22:59:03.388 MST [68M] INFO: Wrote config file:
2024-12-27 22:59:03.388 MST [68M] INFO:  - 150 total entries
2024-12-27 22:59:03.388 MST [68M] INFO:  - 131 entries are default
2024-12-27 22:59:03.388 MST [68M] INFO:  - 19 entries are modified
2024-12-27 22:59:03.388 MST [68M] INFO:  - 0 entries are forced through environment
2024-12-27 22:59:03.390 MST [68M] INFO: Parsed config file /etc/pihole/pihole.toml successfully
2024-12-27 22:59:03.393 MST [68M] INFO: PID of FTL process: 68
2024-12-27 22:59:03.393 MST [68M] INFO: Not sleeping as system has finished booting
2024-12-27 22:59:03.394 MST [68M] INFO: listening on 0.0.0.0 port 53
2024-12-27 22:59:03.394 MST [68M] INFO: listening on :: port 53
2024-12-27 22:59:03.395 MST [68M] INFO: PID of FTL process: 68
2024-12-27 22:59:03.397 MST [68M] INFO: Database version is 21
2024-12-27 22:59:03.397 MST [68M] INFO: Database successfully initialized
2024-12-27 22:59:03.601 MST [68M] INFO: Imported 8972 queries from the on-disk database (it has 46209 rows)
2024-12-27 22:59:03.601 MST [68M] INFO: Parsing queries in database
2024-12-27 22:59:03.662 MST [68M] INFO: Imported 8972 queries from the long-term database
2024-12-27 22:59:03.662 MST [68M] INFO:  -> Total DNS queries: 8972
2024-12-27 22:59:03.662 MST [68M] INFO:  -> Cached DNS queries: 4598
2024-12-27 22:59:03.662 MST [68M] INFO:  -> Forwarded DNS queries: 4124
2024-12-27 22:59:03.662 MST [68M] INFO:  -> Blocked DNS queries: 82
2024-12-27 22:59:03.662 MST [68M] INFO:  -> Unknown DNS queries: 0
2024-12-27 22:59:03.662 MST [68M] INFO:  -> Unique domains: 442
2024-12-27 22:59:03.662 MST [68M] INFO:  -> Unique clients: 5
2024-12-27 22:59:03.662 MST [68M] INFO:  -> DNS cache records: 19
2024-12-27 22:59:03.662 MST [68M] INFO:  -> Known forward destinations: 3
2024-12-27 22:59:03.848 MST [68M] INFO: FTL is running as user pihole (UID 100)
2024-12-27 22:59:03.849 MST [68M] INFO: Reading certificate from /etc/pihole/tls.pem ...
2024-12-27 22:59:03.849 MST [68M] WARNING: SSL/TLS certificate /etc/pihole/tls.pem does not match domain pihole01.lan!
2024-12-27 22:59:03.850 MST [68M] INFO: Using SSL/TLS certificate file /etc/pihole/tls.pem
2024-12-27 22:59:03.852 MST [68M] INFO: Restored 0 API sessions from the database
2024-12-27 22:59:03.860 MST [68M] INFO: Blocking status is enabled
2024-12-27 22:59:03.951 MST [68/T110] INFO: Compiled 0 allow and 0 deny regex for 5 clients in 0.4 msec
2024-12-27 22:59:08.283 MST [68/T109] INFO: Received 8/8 valid NTP replies from pool.ntp.org
2024-12-27 22:59:08.283 MST [68/T109] INFO: Time offset: 9.943451e+00 ms (excluded 1 outliers)
2024-12-27 22:59:08.283 MST [68/T109] INFO: Round-trip delay: 5.518975e+01 ms (excluded 1 outliers)
2024-12-27 22:59:08.283 MST [68/T192] INFO: NTP server listening on 0.0.0.0:123 (IPv4)
2024-12-27 22:59:08.283 MST [68/T193] INFO: NTP server listening on :::123 (IPv6)

@DL6ER
Copy link
Member

DL6ER commented Dec 28, 2024

Despite none of this being included, I believe that I have come to a determination above as to what I believe is happening. PiHole is not handling large truncated DNS packets correctly which correlates with some of the comments above about DNS and memory addresses, and after searching for this problem for about 45 minutes, I believe this GitHub issue report is the same as my crashing, which means it's still not resolved.

As you said, you already have it (but not included it): Please provide the backtrace generated by gdb. It will save us hours of reading code (and possibly missing a little thing) by pin-pointing to the particular crash from which we can go backwards fixing the underlying issue.

@MNLierman
Copy link

MNLierman commented Dec 28, 2024

I actually said, or meant to say, if my meaning was unclear, is that due to time constraints I haven't gone through the above instructions for installing and setting up the debug tools yet. This is why I haven't included the gdb log. If I had the logs, I would have attached them to my comment – I certainly wouldn't leave them out on purpose and waste your time.

Related, Or Are Dev Images Just Really Unstable?

I'm not sure if you're suggesting that the dev image includes these tools, but I haven't found any like that on this Alpine image. It’s frustrating that the dev images of PiHole lack any symbols, backtracing, debug tools, or troubleshooting scripts. Also, right out of the box, the gravity db was corrupted or corrupted itself within the first hour without any block lists added the first day (error -2 on the homescreen). I had to follow some commands on a forum post to delete the DB and recreate it. The pihole repair commands did not work either. Just throwing it all out there. There isn’t even a way to restart the PiHole service/process without restarting the entire container, and the “reboot” command is missing as well – which I thought came standard with BusyBox. Many Docker containers have the reboot command.

I also completely understand that, naturally because these are dev images, there may be things broken, I'm not expecting it to be perfect, but where it already went through a beta testing phase I'm quite surprised by the number of issues I've encountered with PiHole right out within the first few days. That's actually the reason for my posts is to help share information about what I'm encountering, and hopefully these bugs can be fixed soon.

I’ll need to set aside some time tomorrow or the next to take down the Docker container and follow the above instructions for installing and configuring the debug features and tools. Unfortunately, I don't have that time at the moment. I can type at lightning speed tho, it's a talent of mine. If the information and logs I've provided aren't sufficient to pinpoint the problem, I'll try to get the debug environment set up this weekend.

Based on what I've found, you shouldn't have to go through much code. This issue occurs when the log entry "response is truncated" is written to the DNS log right after receiving notification from the DNS server that it's response to PiHole has been truncated. Presumably the DNS reply is too large for a udp packet. Wherever that event is handled, that's where the crash occurs. The code block handling the "response is truncated" event can't be more than 100 lines? Which even seems substantial for handing a DNS response and making 1 log entry. But perhaps I don't fully understand the complexity of PiHole’s event handling. Which leads me to

Reiterated: Consider adding backtracing, symbols, & debugging to PiHole Dev

Here is where I'd like to reiterate: Please consider including the debug tools, symbols, backtracing, etc., in the development branch builds of the Docker images or provide an easy way to enable debugging options. An option like “pihole-ftl --enable-debugging” that either enables backtracing, symbols, and tools, or fetches and sets them up, would be much preferable to manually downloading and installing them. Having to take down the container to add permissions and commands and then rebuild it makes me nervous, as I risk losing everything in it. Taking down or editing containers has sometimes taken me whole days, or even multiple days when things have gone wrong, and in the past I've lo losing everything I set up. Since then I learned you can save images of your changes   I admit that while I am very technically inclined with over a decade of software repair experience, Docker is very new to me still, so my understanding and handling of it may not be optimal. 

Reiterated: My Plea, Please Consider Bringing Back Update Command to PiHole Docker Images

Finally, I'm going to reiterate my stance and plea here. Please hear me out. The decision to disable the update functionality in the PiHole-FTL, just because it's Docker and re-pulling an image is the Docker way – this method of updating PiHole is incredibly frustrating. That works for some things, but that doesn't have to be “the way.” Reconfiguring, reinstalling, and setting up my environment again is a significant time investment. For eg. on PiHole I have many tools and scripts I install, eg. ssh, network and IP troubleshooting tools, Cloudflared, dnscrypt, log rules automation. All that in addition to custom scripts for things such as IPv6 static addresses and static routes. I have my own /48 static block of IPv6 from my ISP, but it's not SLAAC compatible, I have to setup the routes myself, and Docker doesn't support that.

I know some might argue that a Docker container should only contain PiHole, but that's not practical. Even your official docs describe  installing and setting up cloudflared, which isn't included in the images. Enabling the update functionality would save users considerable time, effort, and frustration. If you must, then you could put the update feature in Docker images behind a disclaimer or labs option, but that would certainly be far better than the current option of having to tear down the container.

Request for Feedback Reply

I hope the PiHole devs take the time to fully read my comments and feedback, and consider my opinions / suggestions. Let me know if you need me to provide any additional information about my feedback / suggestions. If you could, I would like whoever is in charge of these decisions to answer for me if there is any specific reasons these actually can't/won't be done, that would be helpful to me. 

I will still setup the debugging tools, hopefully, this weekend, if the provided error information and logs isn't sufficient to find the bug.* However, as of right now PiHole Dev image is not usable. It crashes far too much 30+ times a day, sometimes within 20 min of pulling the Docker image. This is build Dec 22 2024. I'm surprised it's working for anyone else, but perhaps it has to do with using Cloudflared as the DNS provider. Maybe the way Cloudflared is providing it's responses, but a DNS response packet doesn't change drastically from one server to the next, so that doesn't make a lot of sense either.

@DL6ER
Copy link
Member

DL6ER commented Dec 28, 2024

You do not need to rebuild the container or anything. The debug symbols are already included. The only bits that are missing is gdb being installed and extra permissions for debugging being attached to the container.

Everything you need is described briefly in https://deploy-preview-338--pihole-docs.netlify.app/ftldns/gdb It would have really taken you much less time to follow the few steps than writing such a long reply.

We will make sure we actually discuss adding gdb into the container for the nightly tag but not everywhere as would make the image about 50% larger (!) in total size (without gdb 91.2 MB, with gdb it is 144 MB). To increase the likeliness of this happening, I did just create a PR for this: pi-hole/docker-pi-hole#1675

However, as of right now PiHole Dev image is not usable. It crashes far too much 30+ times a day, sometimes within 20 min of pulling the Docker image.

As you said, it is probably due to your particular installation. Looking only at our Discourse forum, it seems that many are using it, yet, this is the first time we have heard about this. It may be an issue in Pi-hole but it may also very well be an issue in the embedded dnsmasq as we just have merged the bleeding-edge code shortly before Christmas. Therein a whole lot of code concerning DNS forwarding has been rewritten - not by us but by the dnsmasq maintainers. Whenever we have everything, we can start looking together at what needs to be done to fix this. Maybe this will result in a much more general bug fix that will go into dnsmasq upstream and then back into Debian, Ubuntu, ...


The decision to disable the update functionality in the PiHole-FTL, just because it's Docker and re-pulling an image is the Docker way – this method of updating PiHole is incredibly frustrating.

I'll defer much of your other questions to our Docker experts, this is not my primary area of expertise. @pi-hole/docker-maintainers

I know some might argue that a Docker container should only contain PiHole, but that's not practical. Even your official docs describe installing and setting up cloudflared, which isn't included in the images.

These instructions are not meant for docker installations but if installed "bare metal" on the machine itself.

@PromoFaux
Copy link
Member

I'll defer much of your other questions to our Docker experts, this is not my primary area of expertise. @pi-hole/docker-maintainers

I've referenced the response in a new issue on the docker repo so as not to spam the participants of this closed thread with discussion irrelevant to them: pi-hole/docker-pi-hole#1676_

@dschaper
Copy link
Member

Is there anything you can provide to help us possibly duplicate your setup? Or a packet capture of the 'large UDP packets' you mention in the linked discussion?

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

7 participants