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

Open
schuettecarsten opened this issue Nov 8, 2024 · 30 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 fully understand and I'm thankful for your deep investigation. I can reproduce the crash by deleting pihole-FTL.db and recreate the container.
This is the log after a few hours of running with at least 5 crashes. For personally identifying reasons, I've dropped a few rows and anonymized some private domains. They were correct domains.

https://0x0.st/Xk_3.log

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

4 participants