Beta 6 pihole -up showing image corruption

I have done the pihole -up twice now on my proxmox LXC container and this line has come up each time. The update works, the previous version works, just thinking the checksum check may be using a static value.

[✓] Detected x86_64 architecture
[i] FTL binary already installed. Confirming Checksum...
[✗] Corruption detected, redownloading binary...
[✓] Downloading and Installing FTL
[✓] Installing scripts from /etc/.pihole

What template are you using for the LXC? I can try to duplicate with my setup if I can match exactly what you have.

I am using debian-12 standard 12.2-1.Seems to happen when there was a "FTL" update. I did the web update this morning and no checksum error:

[i] Checking for updates...
  [i] Pi-hole Core:     up to date
  [i] Web Interface:    update available
  [i] FTL binary already installed. Confirming Checksum...
  [i] Checksum correct. No need to download!
  [i] FTL:              up to date
  [i] Warning: You are using FTL from a custom branch (development-v6) and might be missing future releases.

  [i] Pi-hole Web Admin files out of date, updating local repo.
  [✓] Check for existing repository in /var/www/html/admin
  [✓] Update repo in /var/www/html/admin

  [i] If you had made any changes in '/var/www/html/admin/', they have been stashed using 'git stash'
  [i] Local version file information updated.

root@pi-hole221:~# pihole -up
  [✓] Update local cache of available packages
  [✓] Checking for git
  [✓] Checking for iproute2
  [✓] Checking for dialog
  [✓] Checking for ca-certificates

  [i] Checking for updates...
  [i] Pi-hole Core:     up to date
  [i] Web Interface:    up to date
  [i] FTL binary already installed. Confirming Checksum...
  [i] Checksum correct. No need to download!
  [i] FTL:              up to date
  [i] Warning: You are using FTL from a custom branch (development-v6) and might be missing future releases.

  [✓] Everything is up to date!

This may have happened in the split second when new binaries and checksums are uploaded at the very end of the fully automated CI build process. I'd expect this issue to be there for only maybe five seconds but it ultimately comes down to the transfer speed between GHA and our binary bucket.

I have this more or less all times when updating.
Just now:

[✓] Update local cache of available packages
[✓] Checking for git
[✓] Checking for iproute2
[✓] Checking for dialog
[✓] Checking for ca-certificates

[i] Checking for updates...
[i] Pi-hole Core: up to date
[i] Web Interface: up to date
[i] FTL binary already installed. Confirming Checksum...
[✗] Corruption detected, redownloading binary...
[i] FTL: update available
[i] Warning: You are using FTL from a custom branch (development-v6) and might be missing future releases.

[i] FTL out of date, it will be updated by the installer.

Core
Version is v5.17.3-310-g206cf9c (Latest: null)
Branch is development-v6
Hash is 206cf9c4 (Latest: 206cf9c4)
Web
Version is v5.19-747-gab87e110 (Latest: null)
Branch is development-v6
Hash is ab87e110 (Latest: ab87e110)
FTL
Version is vDev-a23f334 (Latest: null)
Branch is development-v6
Hash is a23f3347 (Latest: a23f3347)

Can you run:

sudo bash -x /opt/pihole/update.sh
Summary
+ readonly ADMIN_INTERFACE_GIT_URL=https://github.com/pi-hole/web.git
+ ADMIN_INTERFACE_GIT_URL=https://github.com/pi-hole/web.git
+ readonly ADMIN_INTERFACE_DIR=/var/www/html/admin
+ ADMIN_INTERFACE_DIR=/var/www/html/admin
+ readonly PI_HOLE_GIT_URL=https://github.com/pi-hole/pi-hole.git
+ PI_HOLE_GIT_URL=https://github.com/pi-hole/pi-hole.git
+ readonly PI_HOLE_FILES_DIR=/etc/.pihole
+ PI_HOLE_FILES_DIR=/etc/.pihole
+ SKIP_INSTALL=true
+ CHECK_ONLY=false
+ source '/etc/.pihole/automated install/basic-install.sh'
++ set -e
++ export PATH+=:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
++ PATH+=:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
++ : 0
++ : 1
++ : 255
+++ cat
++ DNS_SERVERS='Google (ECS, DNSSEC);8.8.8.8;8.8.4.4;2001:4860:4860:0:0:0:0:8888;2001:4860:4860:0:0:0:0:8844
OpenDNS (ECS, DNSSEC);208.67.222.222;208.67.220.220;2620:119:35::35;2620:119:53::53
Level3;4.2.2.1;4.2.2.2;;
Comodo;8.26.56.26;8.20.247.20;;
DNS.WATCH (DNSSEC);84.200.69.80;84.200.70.40;2001:1608:10:25:0:0:1c04:b12f;2001:1608:10:25:0:0:9249:d69b
Quad9 (filtered, DNSSEC);9.9.9.9;149.112.112.112;2620:fe::fe;2620:fe::9
Quad9 (unfiltered, no DNSSEC);9.9.9.10;149.112.112.10;2620:fe::10;2620:fe::fe:10
Quad9 (filtered, ECS, DNSSEC);9.9.9.11;149.112.112.11;2620:fe::11;2620:fe::fe:11
Cloudflare (DNSSEC);1.1.1.1;1.0.0.1;2606:4700:4700::1111;2606:4700:4700::1001'
++ installLogLoc=/etc/pihole/install.log
++ coltable=/opt/pihole/COL_TABLE
++ webroot=/var/www/html
++ webInterfaceGitUrl=https://github.com/pi-hole/web.git
++ webInterfaceDir=/var/www/html/admin
++ piholeGitUrl=https://github.com/pi-hole/pi-hole.git
++ PI_HOLE_LOCAL_REPO=/etc/.pihole
++ PI_HOLE_FILES=(list piholeDebug piholeLogFlush setupLCD update version gravity uninstall webpage)
++ PI_HOLE_INSTALL_DIR=/opt/pihole
++ PI_HOLE_CONFIG_DIR=/etc/pihole
++ PI_HOLE_BIN_DIR=/usr/local/bin
++ '[' -z '' ']'
++ useUpdateVars=false
++ adlistFile=/etc/pihole/adlists.list
++ IPV4_ADDRESS=
++ IPV6_ADDRESS=
++ QUERY_LOGGING=true
++ WEBPORT=8080
++ PRIVACY_LEVEL=0
++ '[' -z root ']'
++ r=20
++ c=70
++ reconfigure=false
++ runUnattended=false
++ [[ -f /opt/pihole/COL_TABLE ]]
++ source /opt/pihole/COL_TABLE
+++ '[' -t 1 ']'
++++ tput colors
+++ '[' 256 -ge 8 ']'
+++ COL_BOLD=''
+++ COL_ULINE=''
+++ COL_NC=''
+++ COL_GRAY=''
+++ COL_RED=''
+++ COL_GREEN=''
+++ COL_YELLOW=''
+++ COL_BLUE=''
+++ COL_PURPLE=''
+++ COL_CYAN=''
+++ COL_WHITE=''
+++ COL_BLACK=''
+++ COL_LIGHT_BLUE=''
+++ COL_LIGHT_GREEN=''
+++ COL_LIGHT_CYAN=''
+++ COL_LIGHT_RED=''
+++ COL_URG_RED=''
+++ COL_LIGHT_PURPLE=''
+++ COL_BROWN=''
+++ COL_LIGHT_GRAY=''
+++ COL_DARK_GRAY=''
+++ TICK='[✓]'
+++ CROSS='[✗]'
+++ INFO='[i]'
+++ QST='[?]'
+++ DONE=' done!'
+++ OVER='\r'
++ [[ true != true ]]
+ source /opt/pihole/COL_TABLE
++ '[' -t 1 ']'
+++ tput colors
++ '[' 256 -ge 8 ']'
++ COL_BOLD=''
++ COL_ULINE=''
++ COL_NC=''
++ COL_GRAY=''
++ COL_RED=''
++ COL_GREEN=''
++ COL_YELLOW=''
++ COL_BLUE=''
++ COL_PURPLE=''
++ COL_CYAN=''
++ COL_WHITE=''
++ COL_BLACK=''
++ COL_LIGHT_BLUE=''
++ COL_LIGHT_GREEN=''
++ COL_LIGHT_CYAN=''
++ COL_LIGHT_RED=''
++ COL_URG_RED=''
++ COL_LIGHT_PURPLE=''
++ COL_BROWN=''
++ COL_LIGHT_GRAY=''
++ COL_DARK_GRAY=''
++ TICK='[✓]'
++ CROSS='[✗]'
++ INFO='[i]'
++ QST='[?]'
++ DONE=' done!'
++ OVER='\r'
+ [[ '' == \-\-\c\h\e\c\k\-\o\n\l\y ]]
+ main
+ local 'basicError=\n  Unable to complete update, please contact Pi-hole Support'
+ local core_update
+ local web_update
+ local FTL_update
+ core_update=false
+ web_update=false
+ FTL_update=false
+ package_manager_detect
+ is_command apt-get
+ local check_command=apt-get
+ command -v apt-get
+ PKG_MANAGER=apt-get
+ UPDATE_PKG_CACHE='apt-get update'
+ PKG_INSTALL=("${PKG_MANAGER}" -qq --no-install-recommends install)
+ PKG_COUNT='apt-get -s -o Debug::NoLocking=true upgrade | grep -c ^Inst || true'
+ update_package_cache
+ local 'str=Update local cache of available packages'
+ printf '  %b %s...' '[i]' 'Update local cache of available packages'
  [i] Update local cache of available packages...+ eval 'apt-get update'
+ printf '%b  %b %s\n' '\r' '[✓]' 'Update local cache of available packages'
  [✓] Update local cache of available packages
+ OS_CHECK_DEPS=(grep dnsutils binutils)
+ INSTALLER_DEPS=(git iproute2 dialog ca-certificates)
+ PIHOLE_DEPS=(cron curl iputils-ping psmisc sudo unzip libcap2-bin dns-root-data libcap2 netcat-openbsd procps jq lshw bash-completion)
+ install_dependent_packages git iproute2 dialog ca-certificates
+ declare -a installArray
+ is_command apt-get
+ local check_command=apt-get
+ command -v apt-get
+ for i in "$@"
+ printf '  %b Checking for %s...' '[i]' git
  [i] Checking for git...+ dpkg-query -W '-f=${Status}' git
+ grep 'ok installed'
+ printf '%b  %b Checking for %s\n' '\r' '[✓]' git
  [✓] Checking for git
+ for i in "$@"
+ printf '  %b Checking for %s...' '[i]' iproute2
  [i] Checking for iproute2...+ dpkg-query -W '-f=${Status}' iproute2
+ grep 'ok installed'
+ printf '%b  %b Checking for %s\n' '\r' '[✓]' iproute2
  [✓] Checking for iproute2
+ for i in "$@"
+ printf '  %b Checking for %s...' '[i]' dialog
  [i] Checking for dialog...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' dialog
+ printf '%b  %b Checking for %s\n' '\r' '[✓]' dialog
  [✓] Checking for dialog
+ for i in "$@"
+ printf '  %b Checking for %s...' '[i]' ca-certificates
  [i] Checking for ca-certificates...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' ca-certificates
+ printf '%b  %b Checking for %s\n' '\r' '[✓]' ca-certificates
  [✓] Checking for ca-certificates
+ [[ 0 -gt 0 ]]
+ printf '\n'

+ return 0
+ is_repo /etc/.pihole
+ local directory=/etc/.pihole
+ local rc
+ [[ -d /etc/.pihole ]]
+ pushd /etc/.pihole
+ git status --short
+ popd
+ return 0
+ echo -e '  [i] Checking for updates...'
  [i] Checking for updates...
+ GitCheckUpdateAvail /etc/.pihole
+ local directory
+ local curBranch
+ directory=/etc/.pihole
+ curdir=/root
+ cd /etc/.pihole
+ git fetch --quiet origin
++ git rev-parse --abbrev-ref HEAD
+ curBranch=development-v6
+ [[ development-v6 == \m\a\s\t\e\r ]]
++ git rev-parse '@{0}'
+ LOCAL=206cf9c4ea311e64462c2321578dc72501588ecd
++ git rev-parse '@{upstream}'
+ REMOTE=206cf9c4ea311e64462c2321578dc72501588ecd
+ [[ 40 == 0 ]]
+ [[ 40 == 0 ]]
+ cd /root
+ [[ 206cf9c4ea311e64462c2321578dc72501588ecd != \2\0\6\c\f\9\c\4\e\a\3\1\1\e\6\4\4\6\2\c\2\3\2\1\5\7\8\d\c\7\2\5\0\1\5\8\8\e\c\d ]]
+ return 1
+ core_update=false
+ echo -e '  [i] Pi-hole Core:\tup to date'
  [i] Pi-hole Core:     up to date
+ is_repo /var/www/html/admin
+ local directory=/var/www/html/admin
+ local rc
+ [[ -d /var/www/html/admin ]]
+ pushd /var/www/html/admin
+ git status --short
+ popd
+ return 0
+ GitCheckUpdateAvail /var/www/html/admin
+ local directory
+ local curBranch
+ directory=/var/www/html/admin
+ curdir=/root
+ cd /var/www/html/admin
+ git fetch --quiet origin
++ git rev-parse --abbrev-ref HEAD
+ curBranch=development-v6
+ [[ development-v6 == \m\a\s\t\e\r ]]
++ git rev-parse '@{0}'
+ LOCAL=ab87e110d52e630f904711df98e2223d3fdac7c1
++ git rev-parse '@{upstream}'
+ REMOTE=ab87e110d52e630f904711df98e2223d3fdac7c1
+ [[ 40 == 0 ]]
+ [[ 40 == 0 ]]
+ cd /root
+ [[ ab87e110d52e630f904711df98e2223d3fdac7c1 != \a\b\8\7\e\1\1\0\d\5\2\e\6\3\0\f\9\0\4\7\1\1\d\f\9\8\e\2\2\2\3\d\3\f\d\a\c\7\c\1 ]]
+ return 1
+ web_update=false
+ echo -e '  [i] Web Interface:\tup to date'
  [i] Web Interface:    up to date
+ local funcOutput
++ get_binary_name
++ local l_binary
++ local machine
+++ uname -m
++ machine=x86_64
++ local 'str=Detecting processor'
++ printf '  %b %s...' '[i]' 'Detecting processor'
++ [[ x86_64 == \a\a\r\c\h\6\4 ]]
++ [[ x86_64 == \a\r\m* ]]
++ [[ x86_64 == \x\8\6\_\6\4 ]]
++ local dpkgarch
+++ dpkg --print-processor
+++ dpkg --print-architecture
++ dpkgarch=amd64
++ [[ amd64 == \i\3\8\6 ]]
++ printf '%b  %b Detected x86_64 architecture\n' '\r' '[✓]'
++ l_binary=pihole-FTL-amd64
++ echo pihole-FTL-amd64
  [✓] Detected x86_64 architecture
pihole-FTL-amd64'
+ local binary
+ binary=pihole-FTL-amd64
+ FTLcheckUpdate pihole-FTL-amd64
+ local ftlLoc
++ command -v pihole-FTL
+ ftlLoc=/usr/bin/pihole-FTL
+ local ftlBranch
+ [[ -f /etc/pihole/ftlbranch ]]
+ ftlBranch=development-v6
+ local binary
+ binary=pihole-FTL-amd64
+ local remoteSha1
+ local localSha1
+ [[ ! development-v6 == \m\a\s\t\e\r ]]
+ local path
+ path=development-v6/pihole-FTL-amd64
+ check_download_exists development-v6/pihole-FTL-amd64
++ curl --head --silent https://ftl.pi-hole.net/development-v6/pihole-FTL-amd64
++ head -n 1
' status='HTTP/2 200 
+ grep -q 200
+ return 0
+ local ret=0
+ '[' 0 -ne 0 ']'
+ [[ -n /usr/bin/pihole-FTL ]]
+ printf '  %b FTL binary already installed. Confirming Checksum...\n' '[i]'
  [i] FTL binary already installed. Confirming Checksum...
+ checkSumFile=https://ftl.pi-hole.net/development-v6/pihole-FTL-amd64.sha1
++ curl -sSL --fail https://ftl.pi-hole.net/development-v6/pihole-FTL-amd64.sha1
++ cut -d ' ' -f 1
+ remoteSha1=84b5e5f1abebb5b90d90e03911765c89e21d568f
++ sha1sum /usr/bin/pihole-FTL
++ cut -d ' ' -f 1
+ localSha1=84b5e5f1abebb5b90d90e03911765c89e21d568f
+ [[ ! 84b5e5f1abebb5b90d90e03911765c89e21d568f =~ ^[a-f0-9]{40}$ ]]
+ [[ 84b5e5f1abebb5b90d90e03911765c89e21d568f != \8\4\b\5\e\5\f\1\a\b\e\b\b\5\b\9\0\d\9\0\e\0\3\9\1\1\7\6\5\c\8\9\e\2\1\d\5\6\8\f ]]
+ printf '  %b Checksum correct. No need to download!\n' '[i]'
  [i] Checksum correct. No need to download!
+ return 1
+ case $? in
+ echo -e '  [i] FTL:\t\tup to date'
  [i] FTL:              up to date
+ FTL_update=false
+ local ftlBranch
+ [[ -f /etc/pihole/ftlbranch ]]
+ ftlBranch=development-v6
+ [[ ! development-v6 == \m\a\s\t\e\r ]]
+ [[ ! development-v6 == \d\e\v\e\l\o\p\m\e\n\t ]]
+ printf '  %b %bWarning:%b You are using FTL from a custom branch (%s) and might be missing future releases.\n' '[i]' '' '' development-v6
  [i] Warning: You are using FTL from a custom branch (development-v6) and might be missing future releases.
+ [[ false == false ]]
+ [[ false == false ]]
+ [[ false == false ]]
+ echo ''

+ echo -e '  [✓] Everything is up to date!'
  [✓] Everything is up to date!
+ exit 0

The checksum there does match and is correct so there is no action to take. Do you get the corruption when you do pihole -up now?

That return 1 stands out to me though, things were successful so there's no reason to be returning a non-zero value.

Edit: Oh, I see, it's return 1 because the comparison is != and we want to act when it is not equal.

If I do now I get just this:

[✓] Update local cache of available packages
[✓] Checking for git
[✓] Checking for iproute2
[✓] Checking for dialog
[✓] Checking for ca-certificates

[i] Checking for updates...
[i] Pi-hole Core: up to date
[i] Web Interface: up to date
[i] FTL binary already installed. Confirming Checksum...
[i] Checksum correct. No need to download!
[i] FTL: up to date
[i] Warning: You are using FTL from a custom branch (development-v6) and might be missing future releases.

[✓] Everything is up to date!

That's the expected response:

[i] Checksum correct. No need to download!

Just applied the update this morning which was FTL and the corrupted image notice was listed. Marked the lines with "**" at end of lines.

root@pi-hole221:~# pihole -up
  [✓] Update local cache of available packages
  [✓] Checking for git
  [✓] Checking for iproute2
  [✓] Checking for dialog
  [✓] Checking for ca-certificates

  [i] Checking for updates...
  [i] Pi-hole Core:     up to date
  [i] Web Interface:    up to date
  [i] FTL binary already installed. Confirming Checksum...
  [✗] Corruption detected, redownloading binary...
  [i] FTL:              update available
  [i] Warning: You are using FTL from a custom branch (development-v6) and might be missing future releases.

  [i] FTL out of date, it will be updated by the installer.

  [✓] Root user check

        .;;,.
        .ccccc:,.
         :cccclll:.      ..,,
          :ccccclll.   ;ooodc
           'ccll:;ll .oooodc
             .;cll.;;looo:.
                 .. ','.
                .',,,,,,'.
              .',,,,,,,,,,.
            .',,,,,,,,,,,,....
          ....''',,,,,,,'.......
        .........  ....  .........
        ..........      ..........
        ..........      ..........
        .........  ....  .........
          ........,,,,,,,'......
            ....',,,,,,,,,,,,.
               .',,,,,,,,,'.
                .',,,,,,'.
                  ..'''.

  [i] SELinux not detected
  [✓] Update local cache of available packages

  [✗] Checking apt-get for upgraded packages
      Kernel update detected. If the install fails, please reboot and try again
  [i] Checking for / installing Required dependencies for OS Check...
  [✓] Checking for grep
  [✓] Checking for dnsutils
  [✓] Checking for binutils

  [✓] Supported OS detected
  [i] Checking for / installing Required dependencies for this install script...
  [✓] Checking for git
  [✓] Checking for iproute2
  [✓] Checking for dialog
  [✓] Checking for ca-certificates

  [i] Performing unattended setup, no dialogs will be displayed
  [i] Performing reconfiguration, skipping download of local repos
  [✓] Resetting repository within /etc/.pihole...
  [✓] Resetting repository within /var/www/html/admin...
  [i] Checking for / installing Required dependencies for Pi-hole software...
  [✓] Checking for cron
  [✓] Checking for curl
  [✓] Checking for iputils-ping
  [✓] Checking for psmisc
  [✓] Checking for sudo
  [✓] Checking for unzip
  [✓] Checking for libcap2-bin
  [✓] Checking for dns-root-data
  [✓] Checking for libcap2
  [✓] Checking for netcat-openbsd
  [✓] Checking for procps
  [✓] Checking for jq
  [✓] Checking for lshw
  [✓] Checking for bash-completion

  [✓] Checking for user 'pihole'

  [i] FTL Checks...

  [✓] Detected x86_64 architecture
  [i] FTL binary already installed. Confirming Checksum...**
  [✗] Corruption detected, redownloading binary...**
  [✓] Downloading and Installing FTL**
  [✓] Installing scripts from /etc/.pihole**

  [i] Installing configs from /etc/.pihole...

  [✓] Installing latest Cron script

  [i] Installing latest logrotate script...
        [i] Existing logrotate file found. No changes made.
  [✓] man pages installed and database updated
  [i] Testing if systemd-resolved is enabled
  [i] Systemd-resolved is not enabled
  [i] Upgrading gravity database from version 18 to 19
  [i] Restarting services...
  [✓] Enabling pihole-FTL service to start on reboot...
  [✓] Restarting pihole-FTL service...
  [✓] Deleting existing list cache
  [i] Neutrino emissions detected...
  [✓] Pulling blocklist source list into range

  [✓] Preparing new gravity database
  [✓] Creating new gravity databases
  [i] Using libz compression

  [i] Target: https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
  [✓] Status: Retrieval successful
  [✓] Parsed 183512 exact domains and 0 ABP-style domains (blocking, ignored 1 non-domain entries)
      Sample of non-domain entries:
        - 0.0.0.0

  [i] Target: https://perflyst.github.io/PiHoleBlocklist/SmartTV.txt
  [✓] Status: Retrieval successful
  [✓] Parsed 242 exact domains and 0 ABP-style domains (blocking, ignored 0 non-domain entries)

  [✓] Building tree
  [i] Number of gravity domains: 183754 (183707 unique domains)
  [i] Number of exact denied domains: 3
  [i] Number of regex denied filters: 26
  [i] Number of exact allowed domains: 21
  [i] Number of regex allowed filters: 20
  [✓] Swapping databases
  [✓] The old database remains available
  [✓] Cleaning up stray matter

  [✓] Done.

  [i] The install log is located at: /etc/pihole/install.log
  [✓] Update complete! 

Core
    Version is v5.17.3-310-g206cf9c4 (Latest: null)
    Branch is development-v6
    Hash is 206cf9c4 (Latest: 206cf9c4)
Web
    Version is v5.19-720-gab87e110 (Latest: null)
    Branch is development-v6
    Hash is ab87e110 (Latest: ab87e110)
FTL
    Version is vDev-a23f334 (Latest: null)
    Branch is development-v6
    Hash is a23f3347 (Latest: a23f3347)

I need to see the bash -x output to be able to help.

... and the scales fell from my eyes: Of course, when the binary is replaced upstream (due to an update), the upstream checksum is updated as well - and stops matching your local one. Hence, the updated binary is downloaded.

There is absolutely nothing wrong here, the message merely means: Your binary is not the same as the one on the server. Yes, corruption is one way to achieve this but updating the binary is another. And actually the much more likely one on frequently changing branches like development-v6.

We - accidentally - made this worse rather recently in a PR that reduced code duplication. The messages are "softened" in this PR to acknowledge what I've written above:

2 Likes

The message then needs to be a bit less ominous, "New version of FTL found. Installing"...

But it may in fact be a corruption - just not in every case. That's why I proposed the new sentence

Remote binary is different, downloading...

As you have seen before there is an update available, this shouldn't be too surprising.