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

Update Pi-hole to v6 development branch #261

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

klutchell
Copy link
Owner

DO NOT MERGE

Signed-off-by: Kyle Harding kyle@balena.io

@klutchell klutchell force-pushed the kyle/pihole-v6 branch 18 times, most recently from 6b26344 to 1e59db2 Compare December 6, 2023 20:59
@klutchell
Copy link
Owner Author

@eiddor I've got this branch mostly working if you want to give it a try!

(I was super wrong about the required changes being minimal)

@klutchell klutchell force-pushed the kyle/pihole-v6 branch 2 times, most recently from 36a4832 to ec736e3 Compare December 6, 2023 21:27
DO NOT MERGE

Signed-off-by: Kyle Harding <kyle@balena.io>
@eiddor
Copy link
Collaborator

eiddor commented Dec 7, 2023

@eiddor I've got this branch mostly working if you want to give it a try!

I can, though I've got IPv6 disabled on my LAN. Do you just need it tested with v4 or do you want me to enable v6 and try testing with that?

(I was super wrong about the required changes being minimal)

Oh goodness, I see!

@klutchell
Copy link
Owner Author

It's not at all related to IPv6 or IPv4, the v6 is referring to the next big Pi-hole core release following v5.

All Pi-hole core and related projects have a development-v6 branch for testing the next major release.

@eiddor
Copy link
Collaborator

eiddor commented Dec 7, 2023

Oh man - This is what happens when you live and breathe networking. This entire time I thought we were talking about IPv6.

I'll test it out this weekend.

@eiddor
Copy link
Collaborator

eiddor commented Dec 7, 2023

A bunch of things:

  1. PADD is no longer filling my screen - I think it's ignoring FONTFACE/FONTSIZE

  2. FTL (and other things?) keep restarting - Here's some of the output:

 pihole  2023-12-07 11:42:15.393 [12M] INFO: Config file /etc/pihole/pihole.toml not available: No such file or directory
 pihole  2023-12-07 11:42:20.920 [185M] INFO: ########## FTL started on pihole! ##########
 pihole  2023-12-07 11:42:20.921 [185M] INFO: FTL branch: development-v6
 pihole  2023-12-07 11:42:20.921 [185M] INFO: FTL version: vDev-797fb5d
 pihole  2023-12-07 11:42:20.921 [185M] INFO: FTL commit: 797fb5d5
 pihole  2023-12-07 11:42:20.921 [185M] INFO: FTL date: 2023-12-06 16:42:40 +0100
 pihole  2023-12-07 11:42:20.921 [185M] INFO: FTL user: pihole
 pihole  2023-12-07 11:42:20.922 [185M] INFO: Compiled for linux/arm64/v8 (compiled on CI) using cc (Alpine 12.2.1_git20220924-r10) 12.2.1 20220924
 pihole  2023-12-07 11:42:20.934 [185M] INFO: Parsed config file /etc/pihole/pihole.toml successfully
 pihole  2023-12-07 11:42:20.934 [185M] WARNING: Cannot set process priority to -10: Permission denied. Process priority remains at 0
 pihole  2023-12-07 11:42:20.939 [185M] INFO: PID of FTL process: 185
 pihole  2023-12-07 11:42:20.941 [185M] ERR: SQLite3 message: no such table: ftl in "SELECT VALUE FROM ftl WHERE id = 0;" (1)
 pihole  2023-12-07 11:42:20.941 [185M] ERR: Encountered prepare error in db_query_int("SELECT VALUE FROM ftl WHERE id = 0;"): SQL logic error
 pihole  2023-12-07 11:42:20.941 [185M] WARNING: Database not available, please ensure the database is unlocked when starting pihole-FTL !
 pihole  2023-12-07 11:42:20.949 [185M] ERR: SQLite3 message: no such table: message in "DELETE FROM message;" (1)
 pihole  2023-12-07 11:42:20.949 [185M] ERR: ERROR: SQL query "DELETE FROM message;" failed: SQL logic error (SQLITE_ERROR)
 pihole  2023-12-07 11:42:20.949 [185M] ERR: flush_message_table() failed!
 pihole  2023-12-07 11:42:20.950 [185M] ERR: SQLite3 message: no such table: disk.query_storage in "INSERT INTO query_storage SELECT * FROM disk.query_storage WHERE timestamp >= ?" (1)
 pihole  2023-12-07 11:42:20.950 [185M] ERR: import_queries_from_disk(): SQL error prepare: SQL logic error
 pihole  2023-12-07 11:42:20.950 [185M] INFO: Parsing queries in database
 pihole  2023-12-07 11:42:20.951 [185M] INFO: Imported 0 queries from the long-term database
 pihole  2023-12-07 11:42:20.952 [185M] ERR: SQLite3 message: no such table: disk.query_storage in "SELECT MAX(id) FROM disk.query_storage" (1)
 pihole  2023-12-07 11:42:20.952 [185M] ERR: update_disk_db_idx(): Failed to get MAX(id) from disk.query_storage: SQL logic error
 pihole  2023-12-07 11:42:20.953 [185M] INFO:  -> Total DNS queries: 0
 pihole  2023-12-07 11:42:20.953 [185M] INFO:  -> Cached DNS queries: 0
 pihole  2023-12-07 11:42:20.953 [185M] INFO:  -> Forwarded DNS queries: 0
 pihole  2023-12-07 11:42:20.953 [185M] INFO:  -> Blocked DNS queries: 0
 pihole  2023-12-07 11:42:21.096 [185/T186] ERR: SQLite3 message: no such table: message in "DELETE FROM message WHERE type = ?1 AND message = ?2" (1)
 pihole  2023-12-07 11:42:21.096 [185/T186] ERR: add_message(type=9, message=https://zeustracker.abuse.ch/blocklist.php?download=domainblocklist) - SQL error prepare DELETE: SQL logic error
 pihole  2023-12-07 11:42:21.096 [185/T186] ERR: logg_inaccessible_adlist(): Failed to add message to database
 pihole  2023-12-07 11:42:21.096 [185/T186] WARNING: List with ID 9 (https://hosts-file.net/ad_servers.txt) was inaccessible during last gravity run
 pihole  2023-12-07 11:42:21.098 [185/T186] ERR: SQLite3 message: no such table: message in "DELETE FROM message WHERE type = ?1 AND message = ?2" (1)
 pihole  2023-12-07 11:42:21.098 [185/T186] ERR: add_message(type=9, message=https://hosts-file.net/ad_servers.txt) - SQL error prepare DELETE: SQL logic error
 pihole  2023-12-07 11:42:21.098 [185/T186] ERR: logg_inaccessible_adlist(): Failed to add message to database
 pihole  2023-12-07 11:42:21.100 [185M] ERR: SQLite3 message: no such table: network in "SELECT aliasclient_id FROM network WHERE id = (SELECT network_id FROM network_addresses WHERE ip = ? AND aliasclient_id IS NOT NULL GROUP BY ip HAVING max(lastSeen));" (1)
 pihole  2023-12-07 11:42:21.100 [185M] ERR: getAliasclientIDfromIP("10.1.1.99") - SQL error prepare: SQL logic error
 pihole  2023-12-07 11:42:21.101 [185M] ERR: SQLite3 message: no such table: network in "SELECT hwaddr FROM network WHERE id = (SELECT network_id FROM network_addresses WHERE ip = ? GROUP BY ip HAVING max(lastSeen));" (1)
 pihole  2023-12-07 11:42:21.102 [185M] ERR: getMACfromIP("10.1.1.99") - SQL error prepare: SQL logic error
 pihole  2023-12-07 11:42:21.103 [185M] ERR: SQLite3 message: no such table: network_addresses in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)
 pihole  2023-12-07 11:42:21.103 [185M] ERR: getNameFromIP("10.1.1.99") - SQL error prepare: SQL logic error
 pihole  2023-12-07 11:42:21.105 [185M] ERR: SQLite3 message: no such table: network in "SELECT interface FROM network JOIN network_addresses ON network_addresses.network_id = network.id WHERE network_addresses.ip = ? AND interface != 'N/A' AND interface IS NOT NULL;" (1)
 pihole  2023-12-07 11:42:21.105 [185M] ERR: getIfaceFromIP("10.1.1.99") - SQL error prepare: SQL logic error
 pihole  2023-12-07 11:42:21.107 [185M] ERR: SQLite3 message: no such table: main.antigravity in "SELECT domain from vw_antigravity WHERE domain = ? AND group_id IN (0);" (1)
 pihole  2023-12-07 11:42:21.107 [185M] ERR: gravityDB_open("SELECT(... vw_antigravity ...)") - SQL error prepare: SQL logic error
 pihole  2023-12-07 11:42:21.108 [185M] ERR: Gravity database not available (allowlist)
 pihole  2023-12-07 11:42:21.115 [185M] ERR: SQLite3 message: no such table: network in "SELECT aliasclient_id FROM network WHERE id = (SELECT network_id FROM network_addresses WHERE ip = ? AND aliasclient_id IS NOT NULL GROUP BY ip HAVING max(lastSeen));" (1)
 pihole  2023-12-07 11:42:21.115 [185M] ERR: getAliasclientIDfromIP("::") - SQL error prepare: SQL logic error
 pihole  Setting console font to ter-u16n...
 pihole  Starting PADD...
 pihole  2023-12-07 11:42:22.965 [185M] ERR: SQLite3 message: no such table: network in "SELECT aliasclient_id FROM network WHERE id = (SELECT network_id FROM network_addresses WHERE ip = ? AND aliasclient_id IS NOT NULL GROUP BY ip HAVING max(lastSeen));" (1)
 pihole  2023-12-07 11:42:22.965 [185M] ERR: getAliasclientIDfromIP("127.0.0.1") - SQL error prepare: SQL logic error
 pihole  2023-12-07 11:42:22.967 [185/T188] ERR: SQLite3 message: no such table: network_addresses in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)
 pihole  2023-12-07 11:42:22.967 [185/T188] ERR: getNameFromIP("10.1.1.99") - SQL error prepare: SQL logic error
 pihole  2023-12-07 11:42:36.859 [515/F185] ERR: SQLite3 message: no such table: network in "SELECT hwaddr FROM network WHERE id = (SELECT network_id FROM network_addresses WHERE ip = ? GROUP BY ip HAVING max(lastSeen));" (1)
 pihole  2023-12-07 11:42:36.860 [515/F185] ERR: getMACfromIP("10.1.1.99") - SQL error prepare: SQL logic error
 pihole  2023-12-07 11:42:36.862 [515/F185] ERR: SQLite3 message: no such table: network_addresses in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)
 pihole  2023-12-07 11:42:36.862 [515/F185] ERR: getNameFromIP("10.1.1.99") - SQL error prepare: SQL logic error
 pihole  2023-12-07 11:42:36.863 [515/F185] ERR: SQLite3 message: no such table: network in "SELECT interface FROM network JOIN network_addresses ON network_addresses.network_id = network.id WHERE network_addresses.ip = ? AND interface != 'N/A' AND interface IS NOT NULL;" (1)
 pihole  2023-12-07 11:42:36.864 [515/F185] ERR: getIfaceFromIP("10.1.1.99") - SQL error prepare: SQL logic error
 pihole  2023-12-07 11:42:36.865 [515/F185] ERR: SQLite3 message: no such table: main.antigravity in "SELECT domain from vw_antigravity WHERE domain = ? AND group_id IN (0);" (1)
 pihole  2023-12-07 11:42:36.865 [515/F185] ERR: gravityDB_open("SELECT(... vw_antigravity ...)") - SQL error prepare: SQL logic error
 pihole  2023-12-07 11:42:36.866 [515/F185] ERR: Gravity database not available (allowlist)
 pihole  2023-12-07 11:42:36.868 [516/F185] ERR: SQLite3 message: no such table: network in "SELECT hwaddr FROM network WHERE id = (SELECT network_id FROM network_addresses WHERE ip = ? GROUP BY ip HAVING max(lastSeen));" (1)
 pihole  2023-12-07 11:42:36.868 [516/F185] ERR: getMACfromIP("10.1.1.99") - SQL error prepare: SQL logic error
 pihole  2023-12-07 11:42:36.870 [516/F185] ERR: SQLite3 message: no such table: network_addresses in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)
 pihole  2023-12-07 11:42:36.870 [516/F185] ERR: getNameFromIP("10.1.1.99") - SQL error prepare: SQL logic error
 pihole  2023-12-07 11:42:36.872 [516/F185] ERR: SQLite3 message: no such table: network in "SELECT interface FROM network JOIN network_addresses ON network_addresses.network_id = network.id WHERE network_addresses.ip = ? AND interface != 'N/A' AND interface IS NOT NULL;" (1)
 pihole  2023-12-07 11:42:36.872 [516/F185] ERR: getIfaceFromIP("10.1.1.99") - SQL error prepare: SQL logic error
 pihole  2023-12-07 11:42:36.873 [516/F185] ERR: SQLite3 message: no such table: main.antigravity in "SELECT domain from vw_antigravity WHERE domain = ? AND group_id IN (0);" (1)
 pihole  2023-12-07 11:42:36.874 [516/F185] ERR: gravityDB_open("SELECT(... vw_antigravity ...)") - SQL error prepare: SQL logic error
 pihole  2023-12-07 11:42:36.875 [516/F185] ERR: Gravity database not available (allowlist)
 pihole  2023-12-07 11:42:41.860 [720/F185] ERR: SQLite3 message: no such table: network in "SELECT hwaddr FROM network WHERE id = (SELECT network_id FROM network_addresses WHERE ip = ? GROUP BY ip HAVING max(lastSeen));" (1)
 pihole  2023-12-07 11:42:41.860 [720/F185] ERR: getMACfromIP("10.1.1.99") - SQL error prepare: SQL logic error
 pihole  2023-12-07 11:42:41.863 [720/F185] ERR: SQLite3 message: no such table: network_addresses in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)
 pihole  2023-12-07 11:42:41.863 [720/F185] ERR: getNameFromIP("10.1.1.99") - SQL error prepare: SQL logic error
 pihole  2023-12-07 11:42:41.865 [720/F185] ERR: SQLite3 message: no such table: network in "SELECT interface FROM network JOIN network_addresses ON network_addresses.network_id = network.id WHERE network_addresses.ip = ? AND interface != 'N/A' AND interface IS NOT NULL;" (1)
 pihole  2023-12-07 11:42:41.865 [720/F185] ERR: getIfaceFromIP("10.1.1.99") - SQL error prepare: SQL logic error
 pihole  2023-12-07 11:42:41.866 [720/F185] ERR: SQLite3 message: no such table: main.antigravity in "SELECT domain from vw_antigravity WHERE domain = ? AND group_id IN (0);" (1)
 pihole  2023-12-07 11:42:41.867 [720/F185] ERR: gravityDB_open("SELECT(... vw_antigravity ...)") - SQL error prepare: SQL logic error
 pihole  2023-12-07 11:42:41.867 [720/F185] ERR: Gravity database not available (allowlist)
 pihole  2023-12-07 11:42:41.869 [721/F185] ERR: SQLite3 message: no such table: network in "SELECT hwaddr FROM network WHERE id = (SELECT network_id FROM network_addresses WHERE ip = ? GROUP BY ip HAVING max(lastSeen));" (1)
 pihole  2023-12-07 11:42:41.870 [721/F185] ERR: getMACfromIP("10.1.1.99") - SQL error prepare: SQL logic error
 pihole  2023-12-07 11:42:41.871 [721/F185] ERR: SQLite3 message: no such table: network_addresses in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)
 pihole  2023-12-07 11:42:41.871 [721/F185] ERR: getNameFromIP("10.1.1.99") - SQL error prepare: SQL logic error
 pihole  2023-12-07 11:42:41.872 [721/F185] ERR: SQLite3 message: no such table: network in "SELECT interface FROM network JOIN network_addresses ON network_addresses.network_id = network.id WHERE network_addresses.ip = ? AND interface != 'N/A' AND interface IS NOT NULL;" (1)
 pihole  2023-12-07 11:42:41.873 [721/F185] ERR: getIfaceFromIP("10.1.1.99") - SQL error prepare: SQL logic error
 pihole  2023-12-07 11:42:41.874 [721/F185] ERR: SQLite3 message: no such table: main.antigravity in "SELECT domain from vw_antigravity WHERE domain = ? AND group_id IN (0);" (1)
 pihole  2023-12-07 11:42:41.874 [721/F185] ERR: gravityDB_open("SELECT(... vw_antigravity ...)") - SQL error prepare: SQL logic error
 pihole  2023-12-07 11:42:41.875 [721/F185] ERR: Gravity database not available (allowlist)
 pihole  2023-12-07 11:43:00.080 [185/T186] ERR: SQLite3 message: statement aborts at 1: [BEGIN TRANSACTION] cannot start a transaction within a transaction (1)
 pihole  2023-12-07 11:43:00.080 [185/T186] ERR: ERROR: SQL query "BEGIN TRANSACTION" failed: SQL logic error (SQLITE_ERROR)
 pihole  2023-12-07 11:43:00.080 [185/T186] ERR: export_queries_to_disk() failed!
 pihole  2023-12-07 11:43:00.081 [185/T186] ERR: SQLite3 message: no such table: network_addresses in "DELETE FROM network_addresses WHERE lastSeen < 1694108580;" (1)
 pihole  2023-12-07 11:43:00.081 [185/T186] ERR: ERROR: SQL query "DELETE FROM network_addresses WHERE lastSeen < 1694108580;" failed: SQL logic error (SQLITE_ERROR)
 pihole  2023-12-07 11:43:00.720 [185M] ERR: SQLite3 message: no such table: network in "SELECT aliasclient_id FROM network WHERE id = (SELECT network_id FROM network_addresses WHERE ip = ? AND aliasclient_id IS NOT NULL GROUP BY ip HAVING max(lastSeen));" (1)
 pihole  2023-12-07 11:43:00.721 [185M] ERR: getAliasclientIDfromIP("10.1.1.11") - SQL error prepare: SQL logic error
 pihole  2023-12-07 11:43:01.015 [185/T188] ERR: SQLite3 message: no such table: network_addresses in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)
 pihole  2023-12-07 11:43:01.016 [185/T188] ERR: getNameFromIP("10.1.1.11") - SQL error prepare: SQL logic error
 pihole  2023-12-07 11:43:39.350 [2128/F185] ERR: SQLite3 message: no such table: network in "SELECT hwaddr FROM network WHERE id = (SELECT network_id FROM network_addresses WHERE ip = ? GROUP BY ip HAVING max(lastSeen));" (1)
 pihole  2023-12-07 11:43:39.350 [2128/F185] ERR: getMACfromIP("10.1.1.99") - SQL error prepare: SQL logic error
 pihole  2023-12-07 11:43:39.352 [2128/F185] ERR: SQLite3 message: no such table: network_addresses in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)
 pihole  2023-12-07 11:43:39.352 [2128/F185] ERR: getNameFromIP("10.1.1.99") - SQL error prepare: SQL logic error
 pihole  2023-12-07 11:43:39.354 [2128/F185] ERR: SQLite3 message: no such table: network in "SELECT interface FROM network JOIN network_addresses ON network_addresses.network_id = network.id WHERE network_addresses.ip = ? AND interface != 'N/A' AND interface IS NOT NULL;" (1)
 pihole  2023-12-07 11:43:39.354 [2128/F185] ERR: getIfaceFromIP("10.1.1.99") - SQL error prepare: SQL logic error
 pihole  2023-12-07 11:43:39.356 [2128/F185] ERR: SQLite3 message: no such table: main.antigravity in "SELECT domain from vw_antigravity WHERE domain = ? AND group_id IN (0);" (1)
 pihole  2023-12-07 11:43:39.356 [2128/F185] ERR: gravityDB_open("SELECT(... vw_antigravity ...)") - SQL error prepare: SQL logic error
 pihole  2023-12-07 11:43:39.357 [2128/F185] INFO: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 pihole  2023-12-07 11:43:39.357 [2128/F185] INFO: ---------------------------->  FTL crashed!  <----------------------------
 pihole  2023-12-07 11:43:39.357 [2128/F185] INFO: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 pihole  2023-12-07 11:43:39.357 [2128/F185] INFO: Please report a bug at https://github.com/pi-hole/FTL/issues
 pihole  2023-12-07 11:43:39.357 [2128/F185] INFO: and include in your report already the following details:
 pihole  2023-12-07 11:43:39.357 [2128/F185] INFO: FTL has been running for 79 seconds
 pihole  2023-12-07 11:43:39.358 [2128/F185] INFO: FTL branch: development-v6
 pihole  2023-12-07 11:43:39.358 [2128/F185] INFO: FTL version: vDev-797fb5d
 pihole  2023-12-07 11:43:39.358 [2128/F185] INFO: FTL commit: 797fb5d5
 pihole  2023-12-07 11:43:39.358 [2128/F185] INFO: FTL date: 2023-12-06 16:42:40 +0100
 pihole  2023-12-07 11:43:39.359 [2128/F185] INFO: FTL user: started as pihole, ended as pihole
 pihole  2023-12-07 11:43:39.359 [2128/F185] INFO: Compiled for linux/arm64/v8 (compiled on CI) using cc (Alpine 12.2.1_git20220924-r10) 12.2.1 20220924
 pihole  2023-12-07 11:43:39.359 [2128/F185] INFO: Process details: MID: 185
 pihole  2023-12-07 11:43:39.359 [2128/F185] INFO:                  PID: 2128
 pihole  2023-12-07 11:43:39.359 [2128/F185] INFO:                  TID: 2128
 pihole  2023-12-07 11:43:39.359 [2128/F185] INFO:                  Name: pihole-FTL
 pihole  2023-12-07 11:43:39.360 [2128/F185] INFO: Received signal: Segmentation fault
 pihole  2023-12-07 11:43:39.360 [2128/F185] INFO:      at address: 0x10
 pihole  2023-12-07 11:43:39.360 [2128/F185] INFO:      with code:  SEGV_MAPERR (Address not mapped to object)
 pihole  2023-12-07 11:43:39.360 [2128/F185] INFO: !!! INFO: pihole-FTL has not been compiled with glibc/backtrace support, not generating one !!!
 pihole  2023-12-07 11:43:39.360 [2128/F185] INFO: ------ Listing content of directory /dev/shm ------
 pihole  2023-12-07 11:43:39.360 [2128/F185] INFO: File Mode User:Group      Size  Filename
 pihole  2023-12-07 11:43:39.361 [2128/F185] INFO: rwxrwxrwx root:root       280  .
 pihole  2023-12-07 11:43:39.361 [2128/F185] INFO: rwxr-xr-x root:root       380  ..
 pihole  2023-12-07 11:43:39.361 [2128/F185] INFO: rw------- pihole:pihole   560K  FTL-fifo-log
 pihole  2023-12-07 11:43:39.362 [2128/F185] INFO: rw------- pihole:pihole     4K  FTL-per-client-regex
 pihole  2023-12-07 11:43:39.362 [2128/F185] INFO: rw------- pihole:pihole    12K  FTL-dns-cache
 pihole  2023-12-07 11:43:39.363 [2128/F185] INFO: rw------- pihole:pihole     8K  FTL-overTime
 pihole  2023-12-07 11:43:39.363 [2128/F185] INFO: rw------- pihole:pihole   262K  FTL-queries
 pihole  2023-12-07 11:43:39.363 [2128/F185] INFO: rw------- pihole:pihole    29K  FTL-upstreams
 pihole  2023-12-07 11:43:39.364 [2128/F185] INFO: rw------- pihole:pihole    86K  FTL-clients
 pihole  2023-12-07 11:43:39.364 [2128/F185] INFO: rw------- pihole:pihole     4K  FTL-domains
 pihole  2023-12-07 11:43:39.365 [2128/F185] INFO: rw------- pihole:pihole    82K  FTL-strings
 pihole  2023-12-07 11:43:39.365 [2128/F185] INFO: rw------- pihole:pihole    16  FTL-settings
 pihole  2023-12-07 11:43:39.365 [2128/F185] INFO: rw------- pihole:pihole   292  FTL-counters
 pihole  2023-12-07 11:43:39.366 [2128/F185] INFO: rw------- pihole:pihole    88  FTL-lock
 pihole  2023-12-07 11:43:39.366 [2128/F185] INFO: ---------------------------------------------------
 pihole  2023-12-07 11:43:39.366 [2128/F185] INFO: Please also include some lines from above the !!!!!!!!! header.
 pihole  2023-12-07 11:43:39.366 [2128/F185] INFO: Thank you for helping us to improve our FTL engine!
 pihole  2023-12-07 11:43:39.366 [2128/F185] INFO: Asking parent pihole-FTL (PID 185) to shut down
 pihole  2023-12-07 11:43:39.366 [2128/F185] INFO: FTL fork terminated!
 pihole  2023-12-07 11:43:39.367 [185M] INFO: Received: RT37 (37 -> 2)
 pihole  2023-12-07 11:43:39.367 [185M] ERR: Error when obtaining outer SHM lock: Previous owner died
 pihole  2023-12-07 11:43:39.367 [185M] ERR: Error when obtaining inner SHM lock: Previous owner died
 pihole  2023-12-07 11:43:39.368 [185M] INFO: Shutting down... // exit code 1 // jmpret 0
 pihole  2023-12-07 11:43:39.619 [185M] ERR: SQLite3 message: statement aborts at 4: [ATTACH ? AS ?] database disk is already in use (1)
 pihole  2023-12-07 11:43:39.619 [185M] ERR: attach_database(): Failed to attach database: SQL logic error
 pihole  2023-12-07 11:43:39.619 [185M] INFO: Finished final database update
 pihole  2023-12-07 11:43:39.620 [185M] INFO: Waiting for threads to join
 pihole  2023-12-07 11:43:39.620 [185M] INFO: Thread database (0) is idle, terminating it.
 pihole  2023-12-07 11:43:39.622 [185M] INFO: Thread housekeeper (1) is idle, terminating it.
 pihole  2023-12-07 11:43:39.626 [185M] INFO: Thread DNS client (2) is idle, terminating it.
 pihole  2023-12-07 11:43:39.626 [185M] INFO: All threads joined
 pihole  2023-12-07 11:43:39.633 [185M] ERR: SQLite3 message: no such table: session in "INSERT INTO session (login_at, valid_until, remote_addr, user_agent, sid, csrf, tls_login, tls_mixed, app) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?);" (1)
 pihole  2023-12-07 11:43:39.633 [185M] ERR: SQL error in backup_db_sessions(): no such table: session (1)
 pihole  2023-12-07 11:43:40.848 [185M] INFO: ########## FTL terminated after 1m 19s  (code 1)! ##########

@klutchell
Copy link
Owner Author

PADD is no longer filling my screen - I think it's ignoring FONTFACE/FONTSIZE

FONTFACE and FONTSIZE are not supported in alpine, you need to use CONSOLE_FONT instead. A list of available fonts can be found in /usr/share/consolefonts/ in the container. The default is CONSOLE_FONT=ter-u16n.

@klutchell
Copy link
Owner Author

I'm not sure what happened to your FTL database. Was this a fresh install or a migration? What env vars do you have set so I can try to reproduce?

@eiddor
Copy link
Collaborator

eiddor commented Dec 7, 2023

It was a migration - Reverted back to the prior version and everything is working fine. Should I purge data and try again?

Nothing too crazy in my variables:

image

@klutchell
Copy link
Owner Author

Should I purge data and try again?

Not right now, in case you hit an issue that needs fixing. Migration is the expected path after all, just surprised I didn't hit it.

If you have another device to test with a clean slate that would narrow down whether it is your environment or the migration that is to blame.

@eiddor
Copy link
Collaborator

eiddor commented Dec 7, 2023

I have a zillion devices without displays - I'll load up on a new one here in a little bit.

Should I start with a new fleet as well?

@klutchell
Copy link
Owner Author

up to you, I don't think a new fleet brings any value as the releases are independent and devices can be pinned to whatever release

@eiddor
Copy link
Collaborator

eiddor commented Dec 8, 2023

The new device seems to be working properly and hasn't looped like earlier. There are still some errors on the console, but nothing like before:

 pihole  2023-12-08 12:02:49.783 [186M] ERR: SQLite3 message: no such table: main.antigravity in "SELECT domain from vw_antigravity WHERE domain = ? AND group_id IN (0);" (1)
 pihole  2023-12-08 12:02:49.783 [186M] ERR: gravityDB_open("SELECT(... vw_antigravity ...)") - SQL error prepare: SQL logic error
 pihole  2023-12-08 12:02:49.784 [186M] ERR: Gravity database not available (allowlist)
 pihole  2023-12-08 12:30:27.981 [41929/F186] ERR: SQLite3 message: no such table: main.antigravity in "SELECT domain from vw_antigravity WHERE domain = ? AND group_id IN (0);" (1)
 pihole  2023-12-08 12:30:27.981 [41929/F186] ERR: gravityDB_open("SELECT(... vw_antigravity ...)") - SQL error prepare: SQL logic error
 pihole  2023-12-08 12:30:27.982 [41929/F186] ERR: Gravity database not available (allowlist)
 pihole  2023-12-08 12:30:31.037 [42046/F186] ERR: SQLite3 message: no such table: main.antigravity in "SELECT domain from vw_antigravity WHERE domain = ? AND group_id IN (0);" (1)
 pihole  2023-12-08 12:30:31.037 [42046/F186] ERR: gravityDB_open("SELECT(... vw_antigravity ...)") - SQL error prepare: SQL logic error
 pihole  2023-12-08 12:30:31.039 [42046/F186] ERR: Gravity database not available (allowlist)

@klutchell
Copy link
Owner Author

That's still more errors than I saw on my test device migration. And you're sure that the errors go away when rolling back, and reappear when going to v6 again?

I should spin up another device and try to reproduce.

@eiddor
Copy link
Collaborator

eiddor commented Dec 8, 2023

Definitely no SQL errors when I roll back, though I do see these messages:

 pihole    [i] Creating new gravity databases...
 pihole    [â] Unable to copy data from /etc/pihole/gravity.db to /etc/pihole/gravity.db_temp
 pihole    Parse error near line 18: table adlist has 10 columns but 12 values were supplied
 pihole  Runtime error near line 20: FOREIGN KEY constraint failed (19)
 pihole     [â] Unable to create gravity database. Please try again later. If the problem persists, please contact support.

However, Gravity is doing its thing on the non v6 version:

image

Went back to v6 one more time and I don't get the SQL errors anymore, however I still see the above messages.

@klutchell
Copy link
Owner Author

It seems the migration has corrupted your DB in both cases, even with a fresh install. I'm not sure our wrapper has anything to do with that, but it's concerning nonetheless. We will keep an eye on it and maybe it gets fixed upstream?

@eiddor
Copy link
Collaborator

eiddor commented Dec 8, 2023

Ok, I lied because I had the scroll paused - The SQL errors indeed return (and gravity stops working) when I go back to the v6 version:

 pihole  2023-12-08 08:41:24.277 [186M] ERR: SQLite3 message: no such table: main.antigravity in "SELECT domain from vw_antigravity WHERE domain = ? AND group_id IN (0);" (1)
 pihole  2023-12-08 08:41:24.277 [186M] ERR: gravityDB_open("SELECT(... vw_antigravity ...)") - SQL error prepare: SQL logic error
 pihole  2023-12-08 08:41:24.278 [186M] ERR: Gravity database not available (allowlist)

It does look like there have been some upstream updates according to the UI:

image

@eiddor
Copy link
Collaborator

eiddor commented Dec 8, 2023

New fleet, new devices, fresh push of this branch, similar messages - This one is constantly scrolling:

pihole  2023-12-08 15:18:34.163 [177/T178] ERR: gravityDB_count(SELECT value FROM info WHERE property = 'gravity_count';) - SQL error step no more rows available
 pihole  2023-12-08 15:18:34.163 [177/T178] WARNING: Count of gravity domains not available. Please run pihole -g
 pihole  2023-12-08 15:18:34.174 [177/T178] INFO: Compiled 0 allow and 0 deny regex for 11 clients in 0.8 msec
 pihole  2023-12-08 15:18:35.079 [177/T178] ERR: gravity_updated(): SELECT value FROM info WHERE property = 'updated'; - SQL error step: no more rows available
 pihole  Setting console font to ter-u16n...
 pihole  Starting PADD...
 pihole  2023-12-08 15:18:36.102 [177/T178] ERR: gravity_updated(): SELECT value FROM info WHERE property = 'updated'; - SQL error step: no more rows available
 pihole  2023-12-08 15:18:37.026 [177/T178] ERR: gravity_updated(): SELECT value FROM info WHERE property = 'updated'; - SQL error step: no more rows available
 pihole  2023-12-08 15:18:38.042 [177/T178] ERR: gravity_updated(): SELECT value FROM info WHERE property = 'updated'; - SQL error step: no more rows available
Warning: Suppressed 16 message(s) due to slow reading
 pihole  2023-12-08 15:18:51.091 [177/T178] ERR: gravity_updated(): SELECT value FROM info WHERE property = 'updated'; - SQL error step: no more rows available
 pihole  2023-12-08 15:18:52.102 [177/T178] ERR: gravity_updated(): SELECT value FROM info WHERE property = 'updated'; - SQL error step: no more rows available
 pihole  2023-12-08 15:18:53.013 [177/T178] ERR: gravity_updated(): SELECT value FROM info WHERE property = 'updated'; - SQL error step: no more rows available
 pihole  2023-12-08 15:18:54.022 [177/T178] ERR: gravity_updated(): SELECT value FROM info WHERE property = 'updated'; - SQL error step: no more rows available

Pushed the main branch and all is good.

@klutchell
Copy link
Owner Author

Are these all on the same network? I haven't tried to reproduce but I know you have a history of "special" networks ;)

@eiddor
Copy link
Collaborator

eiddor commented Dec 8, 2023

Hahaha I was waiting for you to start.

There's nothing "special" about my network just because I don't run plebe gear! I assure you that it's a regular network, just running Enterprise-grade hardware.

And yes, it's the same network, but I can confidently say that my network does not cause SQL errors.

@eiddor
Copy link
Collaborator

eiddor commented Dec 8, 2023

Maybe we should pause development until the upstream is baked. I'm seeing other issues inside of pihole unrelated to what we're doing (I think.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants