FTL goes offline after ~24 hours

Please follow the below template, it will help us to help you!

Expected Behaviour:

FTL/Web interface functions normally after ~24 hours

Actual Behaviour:

FTL crashes when drawing UI after being up for about ~24 hours, php-cgi goes to 100%, "Lost connection to API" error message. Only way to recover is to delete /var/log/pihole.log.

Backtrace:
Program received signal SIGABRT, Aborted.
[Switching to Thread 0x754ff460 (LWP 11539)]
0x76e39f70 in __GI_raise (sig=sig@entry=6)
at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0 0x76e39f70 in __GI_raise (sig=sig@entry=6)
at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1 0x76e3b324 in __GI_abort () at abort.c:89
#2 0x76e75954 in __libc_message (do_abort=do_abort@entry=2,
fmt=0x76f2f840 "*** %s ***: %s terminated\n")
at ../sysdeps/posix/libc_fatal.c:175
#3 0x76eeebd0 in __GI___fortify_fail (
msg=0x76f2f828 "stack smashing detected") at fortify_fail.c:31
#4 0x76eeeb8c in __stack_chk_fail () at stack_chk_fail.c:28
#5 0x00445664 in getClientsOverTime (sock=) at request.c:1155
#6 0x20302030 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

I've tried many repairs and uninstalls with no luck.

Debug Token:

Token after crash - kteworxmsd

Sorry for responding so late but it has been very busy here lately, so I haven't checked new Discourse post for a few days. I have also seen your reply in

https://github.com/pi-hole/FTL/issues/198

and I guess you are right. However, there is one strange thing with your backtrace, that is

#5 0x00445664 in getClientsOverTime (sock=) at request.c:1155

where there is no value given for sock.

Have you tried the possible solution I posted in the issue mentioned above?

I deployed a fix for a likely cause of this issue, but as we are already preparing for FTL v3.0, the current development version won't work for you. I prepared a backported fix, you can try it with

sudo pihole checkout ftl master-fix/ssend

Thanks so much for the reply. After posting on the GIT issue, i saw the arch was different that mine (x86_64-linux-gnu), so I thought perhaps it wasn't the exact same thing. In any case, I installed using the branch you mentioned ("master-fix/ssend") but no luck. I still get the crash.

Let me run it for another day or so. I did another log flush, which usually solves the problem temporarily. Like I mention, it dies regularly after about ~24 hours.

What is the output of pihole-FTL version?

Okay, it is not guaranteed to be the same issue, I was just hoping it. We'll surely be able to tackle your problem as well.

After flushing the logs and restarting the system (with the patch), things have been stable so far!

FYI version:

pi@pi:~ $ pihole-FTL -v
vDev-21f5c2a

1 Like

So far, so good with the patch. I think we can consider this issue closed.