I updated pihole to the latest version yesterday morning and everything was working fine.
Today I checked for an update and it appeared that there was an update or the FTL. During the update, something failed, and then pihole could no longer run properly.
I tried to upload the debug log, but that failed, so I manually transferred it out and uploaded it here.
Checking my /etc/resolv.conf file showed that I was only using 127.0.0.1 for a dns server.
So then I updated the /etc/dhcpcd.conf file to use my other pihole as another dns server, and then I restarted the dhcpcd service. No matter what, the /etc/resolv.conf stays with the dns server of 127.0.0.1. When I change the /etc/resolv.conf to my other pi hole server, pinging google works for a few seconds, then the file gets changed back to 127.0.0.1.
I did not mention that DNS resolution on this device is not working because pi-hole is not working and it was only attempting to use itself for DNS resolution.
Since having this problem I added an extra dns server to the resolv.conf and it stuck long enough to attempt to update pihole again, but it says it it up to date. I also tried a pihole -r to repair, but this did not help. Finally, I was able to generate and upload a proper debug file.
Pi-hole v5.0 should not force itself as the resolver. The crash that is reported in your debug log is identical to the one see here, undermining some "real" bug:
Update: I came back from lunch and was able to update the FTL again, but still doesn't work.
I performed a winmerge on my pihole-FTL file and the one you linked and they are identical.
/sbin/resolvconf is not in the file.
Sorry if the latest update may have affected the resolvconf thing in linked file. That may have been part of the problem but I checked for the update before reading this.
No, the change to not force the local resolver to 127.0.0.1 is already from beginning of December 2019. I wonder is the arm binary is simply broken for anyone. Pinging @DanSchaper and @jfb maybe @PromoFaux if they have a Pi Zero or whatever at hand which could be used to try out the arm binary. I don't have one at hand right now, my Zero is on the other end of the country...
Ran these commands again:
pihole checkout core release/v5.0 --> seemed to do some stuff
pihole checkout web release/v5.0 --> said it was already up to date
When running the one for the core, it still said: [✗] pihole-FTL: no process found
but then I ran pihole restartdns one last time and now it is up and running.
Not sure what fixed it...
...and in the course of typing this, it went down. I cannot keep this stuff straight.
Oh, so it ran longer this time? That's great news.
Does the backtrace in /var/log/pihole-FTL.log look any different?
Even if not: If you can get it running for a few seconds, this might be sufficient to attach the debugger. Please follow gdb - Pi-hole documentation This will definitely help us finding what is going wrong and where!
I dont think it lasted longer, but maybe i was paying more attention. Still seemed to last the same 6-7 seconds that I now saw it was taking before. Also said it was failing with the same 0x226 address.
So I tried the debugger you suggested. In one terminal I restarted the dns server, and the other I started the debugger to catch it before it crashed. Hope I did this right, here is the text from debugging:
pi@rpizero:/var/log $ sudo gdb -p $(pidof pihole-FTL)
GNU gdb (Raspbian 8.2.1-2) 8.2.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "arm-linux-gnueabihf".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
Attaching to process 16079
[New LWP 16080]
[New LWP 16081]
[New LWP 16082]
[New LWP 16083]
[New LWP 16084]
[New LWP 16085]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
0x00522a1c in sqlite3VdbeRecordCompareWithSkip ()
(gdb) handle SIGHUP nostop SIGPIPE nostop
Signal Stop Print Pass to program Description
SIGHUP No Yes Yes Hangup
SIGPIPE No Yes Yes Broken pipe
(gdb) continue
Continuing.
[New Thread 0xb39ff460 (LWP 16152)]
[Thread 0xb39ff460 (LWP 16152) exited]
[New Thread 0xb39ff460 (LWP 16153)]
[Detaching after fork from child process 16154]
[New Thread 0xb2fff460 (LWP 16156)]
[Thread 0xb39ff460 (LWP 16153) exited]
[New Thread 0xb39ff460 (LWP 16157)]
[Thread 0xb2fff460 (LWP 16156) exited]
[Thread 0xb39ff460 (LWP 16157) exited]
[New Thread 0xb39ff460 (LWP 16158)]
[Thread 0xb39ff460 (LWP 16158) exited]
[New Thread 0xb39ff460 (LWP 16159)]
[Thread 0xb39ff460 (LWP 16159) exited]
[New Thread 0xb39ff460 (LWP 16160)]
[Thread 0xb39ff460 (LWP 16160) exited]
[New Thread 0xb39ff460 (LWP 16161)]
[Thread 0xb39ff460 (LWP 16161) exited]
Thread 1 "pihole-FTL" received signal SIGSEGV, Segmentation fault.
0x005b4590 in nettle_sha1_init ()
(gdb) continue
Continuing.
[New Thread 0xb39ff460 (LWP 16210)]
[New Thread 0xb39ff460 (LWP 16211)]
[Thread 0xb39ff460 (LWP 16210) exited]
Thread 1 "pihole-FTL" received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) continue
Continuing.
Unable to fetch general registers.: No such process.
Unable to fetch general registers.: No such process.
(gdb) [Thread 0xb39ff460 (LWP 16211) exited]
[Thread 0xb43ee460 (LWP 16085) exited]
[Thread 0xb4bef460 (LWP 16084) exited]
[Thread 0xb5bf1460 (LWP 16082) exited]
[Thread 0xb63f2460 (LWP 16081) exited]
[Thread 0xb6bf3460 (LWP 16080) exited]
[Thread 0xb6fa0010 (LWP 16079) exited]
(gdb)
I have never had DNSSEC enabled. It is unchecked in the web interface right now as well. Regardless, I'll try fiddling with that setting and see what I get.
I also have the same problem after update pihole. Rasbery Zero model. At the first update the message that it cannot connect to git appeared,except for ftl services, the second attempt is the same. I found this solution:
I just updated to the latest version and it it working now. Thanks ya'll.
PS, this was the first time I have ever used a debugger in linux. This was the first time in 4 years that I monitored anything on git. This also got me looking through the code and understanding the development process here better. Very cool, and thanks a lot.