FTL service will not stay online for more than a few seconds

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

Expected Behaviour:

FTL service should stay running

Actual Behaviour:

FTL dies within a few moments with no logs

Debug Token:

q4ugz143qt

What I've tried so far:

  1. I am running the very latest version
  2. I did a cleanup of my various adlists, I had a couple that were quite large
  3. I have tried a repair install.

The good news is, the DNS server is running fine and I can still administer via the command line. I can't use the web service, however.

FTL restarts, then just dies and doesn't post any logs before it drops offline.

Just to spite me, it's been online ever since I filed this.

Hmm, in case of any further problem please run

sudo service pihole-FTL stop
sudo killall pihole-FTL
sudo -u pihole pihole-FTL debug

where the first two commands should ensure that no FTL process (in whatever status) is running and the last command should start pihole-FTL in debugging mode (i.e. more verbose output and no switching into daemon mode).

Tell us what you see in this case.

Will do if it starts acting up again (maybe the core update this morning fixed it? Who knows). Thank you.

@DL6ER - I wish I had something useful for you, but even with full debugging it just dies out:

[2017-12-05 09:34:06.021] Notice: Queries stored in DB: 42437
[2017-12-05 09:35:00.150] Notice: Queries stored in DB: 30
[2017-12-05 09:36:00.182] Notice: Queries stored in DB: 30
[2017-12-05 09:36:36.900] New domain: adaway.org (2 - 1778/2000)
[2017-12-05 09:36:41.311] New domain: hosts-file.net (2 - 1779/2000)
[2017-12-05 09:36:46.725] New domain: v.firebog.net (2 - 1780/2000)
[2017-12-05 09:37:00.068] Notice: Queries stored in DB: 28
[2017-12-05 09:37:05.365] New domain: pi.hole.horry.org (2 - 1781/2000)
[2017-12-05 09:37:07.774] New domain: mirror1.malwaredomains.com (2 - 1782/2000)
[2017-12-05 09:37:08.779] New domain: sysctl.org (2 - 1783/2000)
[2017-12-05 09:37:09.383] New domain: zeustracker.abuse.ch (2 - 1784/2000)
(FTL exited here)

Uploaded full logs with token: cdv246jcjb

I enabled core dumping and no core file was generated.

Yeah, so that seems like pihole-FTL was killed by some external program. Now, let's look at the last ultimate test for this:

Try

sudo -u pihole gdb pihole-FTL

followed by

handle SIGHUP nostop SIGPIPE nostop

and finally

run debug

Whatever happens to FTL from this point on (my guess: it receives a SIGKILL) will be recorded by gdb. Fingers crossed.

@DL6ER

Program received signal SIGHUP, Hangup.
[Thread 0xb6331460 (LWP 2424) exited]
[Thread 0xb6b31460 (LWP 2423) exited]

Program terminated with signal SIGHUP, Hangup.
The program no longer exists.

Not a KILL!

Ah, uhm, okay... Go for

pihole checkout ftl development

Alrighty, it's installed and hasn't quit working yet. If it crashes I'll run it through gdb again and send you the output.

Some more data for you:

Linux scooter 4.9.35+ #1014 Fri Jun 30 14:34:49 BST 2017 armv6l GNU/Linux
Machine model: Raspberry Pi Model B Rev 2

Thanks for letting me know! I think the issue should be resolved now.

More information:

It appears like - although your Pi-hole core was on development - you still used FTL on master. This was a problem was the current development version of Pi-hole is sending SIGTERM to FTL whenever the lists are updated. However, the master version of FTL wasn't able to catch this signal and react accordigly. Instead, it terminated as any other non-daemon software would have done as well.

I think I've found the trigger. FTL will crash when I trigger an adlist update from either command line or the web interface.

As soon as the update finishes:

Program received signal SIGHUP, Hangup.
[Thread 0xb6331460 (LWP 8907) exited]
[Thread 0xb6b31460 (LWP 8906) exited]

Program terminated with signal SIGHUP, Hangup.
The program no longer exists.
(gdb)

The FTL log shows nothing unusual still, it just stops running. So, for whatever reason pihole-FTL is not responding properly to the SIGHUP following an update.

Is this still happening to you? The current development version of FTL should react correctly to this signal (see also my post above).

Nope, looking good with FTL on development so far. I'll keep watching it and let you know if it misbehaves again.