-
-
Notifications
You must be signed in to change notification settings - Fork 188
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 crashed #987
Comments
@jensgersdorf Is this everything from the log file? I'd expect a lot more output, containing further crash details such as a (hopefulyl complete) backtrace of the crash location. I'd be great if could check Could you also try whether running
fixes the crash for you? |
I just added some more logging what happened before. After the crash of course nothing happened - besides my manual restart some minutes later. The pihole installation is rather fresh - the server has been running since [2020-12-18 13:35:16.045 8174M] before the crash occured - so approx. 8 hours. It's the first and so far only time a crash occured (which does not say anything, as the whole installation is only a 9 hours older). I'd first stick to the current version of pihole and wait and see if it will crash again in the next days. If so, I will tell in this ticket and install the fix/all_the_things branch. |
I can reproduce the problem. It occurs when I use the "Audit log". When I click on two audit buttons in a row, FTL crashes. [2020-12-19 19:32:48.337 37366M] ########## FTL started! ########## |
Looking at
it is really very likely that the fix we have prepared in the custom branch will resolve this for you. You can go back to |
I installed fix/all_the_things - and I still can reproduce the error. [2020-12-21 05:17:25.574 69050M] ########## FTL started! ########## |
I have attached gdb to the process (as described in https://docs.pi-hole.net/ftldns/debugging/). Here is the output when it crashes [New Thread 0xffffa1bec1e0 (LWP 72454)] Thread 1 "pihole-FTL" received signal SIG34, Real-time event 34. Thread 1 "pihole-FTL" received signal SIG34, Real-time event 34. Thread 1 "pihole-FTL" received signal SIG34, Real-time event 34. Thread 1 "pihole-FTL" received signal SIG34, Real-time event 34. Thread 1 "pihole-FTL" received signal SIG34, Real-time event 34. Thread 1 "pihole-FTL" received signal SIG34, Real-time event 34. Thread 1 "pihole-FTL" received signal SIG34, Real-time event 34. Thread 18 "telnet-19" received signal SIGSEGV, Segmentation fault. |
Thanks! When you see
could you then run |
edit Code formatting added. |
This looks very much similar to what @yubiuser is seeing (#960 (comment)). It is a crash deep down when preparing the audit database statement. With all the information, I'm not pretty confident that this is an original SQLite3 bug. Could one of you report it to the SQLite3 maintainers? https://www.sqlite.org/src/wiki?name=Bug+Reports The crashing statement is SELECT EXISTS(SELECT domain, CASE WHEN substr(domain, 1, 1) = '*' THEN '*' || substr(:input, - length(domain) + 1) ELSE :input END matcher FROM domain_audit WHERE matcher = domain); Others than that I can work out an alternative query doing the same (wildcard matching) and substitute this. This may circumvent the problem in SQLite3. It would obviously be nicer if we could get it fixed upstream without any needs for working around it (we can never be sure it doesn't happen again). The SQL statement above together with the backtrace should give the SQLite3 maintainers enough to work on this. You can also give them the schema of the corresponding table as they may need it: CREATE TABLE domain_audit
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
domain TEXT UNIQUE NOT NULL,
date_added INTEGER NOT NULL DEFAULT (cast(strftime('%s', 'now') as int))
); |
I reported it in sqlite3 (https://www.sqlite.org/forum/forumpost/bd706d2342) |
First reaction is that they think it's a heap corruption caused by the calling programm - and until someone proves it's not, they will not have a closer look. But I saw that you just changed the code of the prepared statemen in #992. If its integrated in some branch I can retest. |
Saying it's the other application's fault is the easy solution, however, as they can always be right, there isn't much we can do about it unless we could truly identify the bug ourselves in the 228.449 lines of What I'm just seeing is that both reports we have for the crashing (@jens1205 @yubiuser) are on the Unfortunately, their suggestion of using the AddressSanitizer is not going to help here as From your reports, I see
so I'll likely try to former to reproduce this myself. Unfortunately, I do not have a 64bit NanoPi around (only the NanoPi NEO which is Cortex-A7 = 32bit), however, the bug should be similarly reproducible on the Raspberry Pi. |
It has already been tested here #960 (comment) and found to make no difference. |
You could also try to crash FTL using
so without any need to click on really any auditing button fast. It should have a very similar effect. |
It's a Raspberry Pi 4 Model B |
I tried
But no crash. Only a lot of "Reloading DNS Cache" entries in the logfile. I'm still on
|
I only have a Raspberry Pi 3 available so I'll first try with this one. If it doesn't work, I'll order a Raspberry Pi 4 ... edit Looking good so far, I'll be able to do more tests later:
|
Valgrind is supported on ARM64/Linux (for ARMv8) . I installed the latest version 3.16.1, but I failed to run pihole inside valgrind
|
@yubiuser To remove capabilities from FTL use the
They'll be reinstalled by |
Even without the Add And with the loop:
|
looks perfectly fine. Do you see any hint why it stopped? Is there anything in the Pi-hole log files in Edit @yubiuser from your valgrind.log:
|
I tried with the loop again and got the same result: The dashboard shows FTL offline but DNS resolution still running (My fault....of course... it's running as root... ) |
You may need to try |
I tried really hard to get it to crash, however, it did it only once (and this was when my SD card got full). Nonetheless, I added some smaller improvements to the code so please update your FTLs before trying to continue to crash it. |
Which is the branch to go? Last update to |
|
The next version of FTL has been released. Please update and run
to get back on-track. Thanks for helping us to make Pi-hole better for us all! If you still experience any issues, please either reopen this ticket or (preferably) create a new ticket describing the issues in further detail and only reference this ticket. This will help us to help you best. |
Versions
Platform
Expected behavior
FTL should not crash
Actual behavior / bug
FTL crashed
Steps to reproduce
Steps to reproduce the behavior:
Don't know, it just happened
Debug Token
none
Screenshots
none
Additional context
[2020-12-18 13:43:22.637 8176M] Resizing "FTL-dns-cache" from 8192 to (768 * 16) == 12288 (/dev/shm: 1.7MB used, 2.0GB total)
[2020-12-18 13:47:33.987 8176M] Resizing "FTL-dns-cache" from 12288 to (1024 * 16) == 16384 (/dev/shm: 1.7MB used, 2.0GB total)
[2020-12-18 14:02:23.797 8176M] Resizing "FTL-dns-cache" from 16384 to (1280 * 16) == 20480 (/dev/shm: 1.7MB used, 2.0GB total)
[2020-12-18 14:02:36.339 8176M] Resizing "FTL-strings" from 49152 to (53248 * 1) == 53248 (/dev/shm: 1.7MB used, 2.0GB total)
[2020-12-18 14:14:49.518 8176M] Resizing "FTL-dns-cache" from 20480 to (1536 * 16) == 24576 (/dev/shm: 1.7MB used, 2.0GB total)
[2020-12-18 14:51:40.031 8176M] Resizing "FTL-dns-cache" from 24576 to (1792 * 16) == 28672 (/dev/shm: 1.7MB used, 2.0GB total)
[2020-12-18 15:28:51.744 8176M] Resizing "FTL-strings" from 53248 to (57344 * 1) == 57344 (/dev/shm: 1.7MB used, 2.0GB total)
[2020-12-18 15:54:05.965 8176M] Resizing "FTL-queries" from 1310720 to (24576 * 64) == 1572864 (/dev/shm: 1.8MB used, 2.0GB total)
[2020-12-18 15:56:13.104 8176M] Resizing "FTL-dns-cache" from 28672 to (2048 * 16) == 32768 (/dev/shm: 2.0MB used, 2.0GB total)
[2020-12-18 16:15:16.812 8176M] Resizing "FTL-dns-cache" from 32768 to (2304 * 16) == 36864 (/dev/shm: 2.0MB used, 2.0GB total)
[2020-12-18 16:50:37.075 8176M] Resizing "FTL-strings" from 57344 to (61440 * 1) == 61440 (/dev/shm: 2.0MB used, 2.0GB total)
[2020-12-18 16:57:31.745 8176M] Resizing "FTL-dns-cache" from 36864 to (2560 * 16) == 40960 (/dev/shm: 2.0MB used, 2.0GB total)
[2020-12-18 17:19:25.576 8176M] Resizing "FTL-dns-cache" from 40960 to (2816 * 16) == 45056 (/dev/shm: 2.0MB used, 2.0GB total)
[2020-12-18 18:07:10.629 8176M] Resizing "FTL-dns-cache" from 45056 to (3072 * 16) == 49152 (/dev/shm: 2.0MB used, 2.0GB total)
[2020-12-18 18:07:49.104 8176M] Resizing "FTL-strings" from 61440 to (65536 * 1) == 65536 (/dev/shm: 2.0MB used, 2.0GB total)
[2020-12-18 18:10:14.762 8176M] Resizing "FTL-queries" from 1572864 to (28672 * 64) == 1835008 (/dev/shm: 2.0MB used, 2.0GB total)
[2020-12-18 18:33:44.563 8176M] Resizing "FTL-dns-cache" from 49152 to (3328 * 16) == 53248 (/dev/shm: 2.3MB used, 2.0GB total)
[2020-12-18 19:45:14.451 8176M] Resizing "FTL-dns-cache" from 53248 to (3584 * 16) == 57344 (/dev/shm: 2.3MB used, 2.0GB total)
[2020-12-18 19:50:41.622 8176M] Resizing "FTL-strings" from 65536 to (69632 * 1) == 69632 (/dev/shm: 2.3MB used, 2.0GB total)
[2020-12-18 19:50:47.569 8176M] Resizing "FTL-dns-cache" from 57344 to (3840 * 16) == 61440 (/dev/shm: 2.3MB used, 2.0GB total)
[2020-12-18 19:51:17.066 8176M] Resizing "FTL-dns-cache" from 61440 to (4096 * 16) == 65536 (/dev/shm: 2.3MB used, 2.0GB total)
[2020-12-18 19:52:05.326 8176M] Resizing "FTL-strings" from 69632 to (73728 * 1) == 73728 (/dev/shm: 2.3MB used, 2.0GB total)
[2020-12-18 19:52:15.994 8176M] Resizing "FTL-queries" from 1835008 to (32768 * 64) == 2097152 (/dev/shm: 2.3MB used, 2.0GB total)
[2020-12-18 19:52:29.785 8176M] Resizing "FTL-dns-cache" from 65536 to (4352 * 16) == 69632 (/dev/shm: 2.6MB used, 2.0GB total)
[2020-12-18 19:53:37.687 8176M] Resizing "FTL-dns-cache" from 69632 to (4608 * 16) == 73728 (/dev/shm: 2.6MB used, 2.0GB total)
[2020-12-18 19:54:57.638 8176M] Resizing "FTL-dns-cache" from 73728 to (4864 * 16) == 77824 (/dev/shm: 2.6MB used, 2.0GB total)
[2020-12-18 19:55:29.563 8176M] Resizing "FTL-strings" from 73728 to (77824 * 1) == 77824 (/dev/shm: 2.6MB used, 2.0GB total)
[2020-12-18 19:59:35.480 8176M] Resizing "FTL-dns-cache" from 77824 to (5120 * 16) == 81920 (/dev/shm: 2.6MB used, 2.0GB total)
[2020-12-18 20:07:51.431 8176M] Resizing "FTL-dns-cache" from 81920 to (5376 * 16) == 86016 (/dev/shm: 2.6MB used, 2.0GB total)
[2020-12-18 20:16:14.121 8176M] Resizing "FTL-strings" from 77824 to (81920 * 1) == 81920 (/dev/shm: 2.6MB used, 2.0GB total)
[2020-12-18 20:31:31.079 8176M] Resizing "FTL-dns-cache" from 86016 to (5632 * 16) == 90112 (/dev/shm: 2.6MB used, 2.0GB total)
[2020-12-18 20:56:16.188 8176M] Received: Real-time signal 0 (34 -> 0)
[2020-12-18 20:56:16.248 8176/T8180] Compiled 0 whitelist and 12 blacklist regex filters for 24 clients in 22.9 msec
[2020-12-18 20:56:39.663 8176M] Received: Real-time signal 0 (34 -> 0)
[2020-12-18 20:56:39.733 8176/T8180] Compiled 0 whitelist and 13 blacklist regex filters for 24 clients in 25.8 msec
[2020-12-18 20:57:05.072 8176M] Received: Real-time signal 0 (34 -> 0)
[2020-12-18 20:57:05.218 8176/T8180] Compiled 0 whitelist and 13 blacklist regex filters for 24 clients in 26.1 msec
[2020-12-18 21:03:20.675 8176M] Resizing "FTL-queries" from 2097152 to (36864 * 64) == 2359296 (/dev/shm: 2.6MB used, 2.0GB total)
[2020-12-18 21:21:07.601 8176M] Received: Real-time signal 0 (34 -> 0)
[2020-12-18 21:21:07.710 8176/T8180] Compiled 0 whitelist and 13 blacklist regex filters for 24 clients in 24.5 msec
[2020-12-18 21:22:31.555 8176M] Received: Real-time signal 0 (34 -> 0)
[2020-12-18 21:22:31.702 8176/T8180] Compiled 0 whitelist and 13 blacklist regex filters for 24 clients in 24.7 msec
[2020-12-18 21:22:31.876 8176M] Received: Real-time signal 0 (34 -> 0)
[2020-12-18 21:22:31.954 8176/T8180] Compiled 0 whitelist and 13 blacklist regex filters for 24 clients in 26.3 msec
[2020-12-18 21:23:00.218 8176/T8180] !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[2020-12-18 21:23:00.218 8176/T8180] ----------------------------> FTL crashed! <----------------------------
[2020-12-18 21:23:00.218 8176/T8180] !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[2020-12-18 21:23:00.218 8176/T8180] Please report a bug at https://github.com/pi-hole/FTL/issues
[2020-12-18 21:23:00.218 8176/T8180] and include in your report already the following details:
[2020-12-18 21:23:00.218 8176/T8180] FTL has been running for 28064 seconds
[2020-12-18 21:23:00.219 8176/T8180] FTL branch: master
[2020-12-18 21:23:00.219 8176/T8180] FTL version: v5.3.2
[2020-12-18 21:23:00.219 8176/T8180] FTL commit: 0790cf7
[2020-12-18 21:23:00.219 8176/T8180] FTL date: 2020-12-02 21:28:39 +0000
[2020-12-18 21:23:00.219 8176/T8180] FTL user: started as pihole, ended as pihole
[2020-12-18 21:23:00.219 8176/T8180] Compiled for aarch64 (compiled on CI) using aarch64-linux-gnu-gcc (Debian 6.3.0-18) 6.3.0 20170516
[2020-12-18 21:23:00.219 8176/T8180] Process details: MID: 8176
[2020-12-18 21:23:00.219 8176/T8180] PID: 8176
[2020-12-18 21:23:00.219 8176/T8180] TID: 8180
[2020-12-18 21:23:00.219 8176/T8180] Name: database
[2020-12-18 21:23:00.219 8176/T8180] Received signal: Segmentation fault
[2020-12-18 21:23:00.219 8176/T8180] at address: 0xa206574756f
[2020-12-18 21:23:00.219 8176/T8180] with code: SEGV_MAPERR (Address not mapped to object)
2020-12-18 21:29:46.192 18626M] Using log file /var/log/pihole-FTL.log
[2020-12-18 21:29:46.192 18626M] ########## FTL started! ##########
[2020-12-18 21:29:46.192 18626M] FTL branch: master
[2020-12-18 21:29:46.192 18626M] FTL version: v5.3.2
[2020-12-18 21:29:46.192 18626M] FTL commit: 0790cf7
[2020-12-18 21:29:46.192 18626M] FTL date: 2020-12-02 21:28:39 +0000
[2020-12-18 21:29:46.192 18626M] FTL user: pihole
The text was updated successfully, but these errors were encountered: