CivetWeb master spins in ppoll(), IPv4 accept queues full – still reproducible with FTL v6.7.1

My previous support topic was automatically closed, but the problem remains unresolved. I am opening this new topic because I have now captured another occurrence, including detailed live diagnostics, this time running FTL v6.7.1.

Expected Behaviour:

The Pi-hole web administration interface should remain accessible over HTTP/HTTPS, even after several days or weeks of continuous operation.

My setup:

  • Hardware: Raspberry Pi 3B
  • Operating system: Raspberry Pi OS (64-bit, Debian Trixie)
  • Installation: Native Pi-hole installation, not Docker
  • Pi-hole Core: v6.4.3
  • Pi-hole Web: v6.6
  • Pi-hole FTL: v6.7.1
  • Pi-hole IP: 192.168.178.2
  • Webserver: FTL's integrated CivetWeb server, listening on ports 80 and 443
  • Debugging: debug.webserver = true

The Raspberry Pi provides DNS resolution for my home network and is normally running continuously.

Actual Behaviour:

After an unpredictable period of normal operation, the Pi-hole web administration interface becomes completely unresponsive. DNS resolution continues working.

I originally documented this issue under FTL v6.7 in my previous topic, including an occurrence where the CivetWeb master thread appeared to spin continuously in ppoll() while the IPv4 accept queues were full.

On October 12, 2026, I discovered that the problem had occurred again, despite having updated to FTL v6.7.1 on September 21.

Fortunately, SSH was still working this time, so I collected the following diagnostics before restarting FTL.

1. DNS and SSH continue working, but the webserver does not

  • ping 192.168.178.2 succeeds.
  • nslookup heise.de 192.168.178.2 returns valid DNS responses.
  • SSH connections work normally.
  • The pihole-FTL systemd service remains active.
  • DNS queries are still recorded in the SQLite database. The latest query at the time of testing was timestamped 2026-10-12 09:35:27.
  • The admin interface is unreachable.

A local IPv4 HTTP request to 127.0.0.1:80 cannot establish a connection within the timeout.

I also tested IPv6 locally:

curl -6 -g --noproxy '*' --connect-timeout 3 --max-time 8 -v 'http://[::1]/admin/'

This successfully establishes a TCP connection and sends the HTTP GET request, but receives no response:

Connected to ::1 port 80
Request completely sent off
Operation timed out after 8002 milliseconds with 0 bytes received

Thus, although only the IPv4 accept queues are saturated, HTTP request processing also fails over IPv6.

2. IPv4 accept queues are completely full

The command

sudo ss -ltnp '( sport = :80 or sport = :443 )'

shows:

State   Recv-Q  Send-Q  Local Address:Port
LISTEN  201     200     0.0.0.0:443
LISTEN  201     200     0.0.0.0:80
LISTEN  0       200     [::]:443
LISTEN  0       200     [::]:80

The kernel counters show:

TcpExtListenOverflows  11032
TcpExtListenDrops      11032

Approximately 14 minutes earlier, both counters were at 10,949. They continued increasing while the problem was occurring.

For comparison, in the healthy state immediately after updating to v6.7.1, all four accept queues were empty and both counters were zero.

3. CivetWeb master thread continuously spins in ppoll()

FTL was running as PID 749.

The CivetWeb master thread was:

TID   %CPU  COMMAND
9391  43.7  civetweb-master

The CPU percentage is the lifetime average reported by ps, rather than an instantaneous measurement.

The eight remaining civetweb-worker threads were sleeping in futex_do_wait.

I attached strace to the CivetWeb master thread for five seconds:

sudo timeout 5 strace -tt -T -p 9391 \
  -e trace=ppoll,poll,accept,accept4,recvfrom,recvmsg,read,write,sendto,sendmsg

The output repeatedly showed calls equivalent to:

ppoll([{fd=37, events=POLLIN},
       {fd=38, events=POLLIN},
       {fd=39, events=POLLIN},
       {fd=40, events=POLLIN},
       {fd=35, events=POLLIN}], 5, ...)
  = 2 ([{fd=37, revents=POLLIN},
        {fd=38, revents=POLLIN}])

File descriptors 37 and 38 belong to the IPv4 listeners on ports 80 and 443.

The master thread repeatedly sees both IPv4 listening sockets as readable, but no accept() or accept4() calls appeared during the five-second trace.

The loop executes extremely rapidly, without waiting for the specified two-second poll timeout.

This is essentially the same behavior I observed and documented during a previous occurrence under FTL v6.7.

4. Possible start of the failure: October 5

The Pi-hole webserver debugging log provides an indication of when the problem might have started.

My home server (192.168.178.25) performs TCP connectivity checks against the Pi-hole HTTP and HTTPS ports every three minutes.

These checks regularly produce log entries such as:

Incoming connection from 192.168.178.25
http: none, error: No data received

Incoming SSL connection from 192.168.178.25
TLS handshake failed (-29312)

This has been the normal pattern for some time.

The last entries in webserver.log.1 are timestamped October 5, 2026, at 18:22:54.195 CEST.

During this final recorded check, both connections were still accepted, processed and closed normally, and the worker threads returned to idle.

No further connections appear in the debugging log. The next regular check would have been expected around 18:25:54.

The current webserver.log, created by log rotation on October 6, is empty.

This suggests that CivetWeb may have stopped processing connections around October 5. However, I cannot exclude a separate logging problem, and the exact onset is not proven.

The system journal around that time contains no obvious OOM, filesystem, kernel or FTL crash messages. A DHCP lease renewal was logged at 18:33, but there is no evidence that it caused the problem.

I do not know whether the regular TCP connectivity checks from my home server are related to the trigger or simply make the problem visible.

5. Recovery

After capturing the live diagnostics and uploading a Pi-hole debug report, I executed:

sudo systemctl restart pihole-FTL

The command completed successfully and the web administration interface immediately became accessible again.

No Raspberry Pi reboot was necessary.

6. Summary

This problem has now occurred repeatedly under FTL v6.7 and v6.7.1.

The most consistent findings are:

  • IPv4 accept queues on ports 80 and 443 fill to 201/200.
  • TCP listen overflows and drops increase continuously.
  • The CivetWeb master thread repeatedly returns from ppoll() with POLLIN on both IPv4 listening sockets.
  • No accept() calls are visible during the trace.
  • The web interface becomes unresponsive, including HTTP requests over IPv6.
  • DNS resolution continues working.
  • Restarting pihole-FTL immediately restores the web interface.

During an earlier occurrence, SSH was also unavailable and DNS query logging stopped. In the latest occurrence, SSH and database logging continued working.

I understand that v6.7.1 includes fixes related to CivetWeb workers, TLS handling and potential deadlocks. However, this particular issue is still reproducible.

Could this indicate a problem in CivetWeb's accept loop or its internal thread synchronization?

Are there any additional diagnostics, thread backtraces or tracing options I should collect if the problem happens again?

I have also saved a separate diagnostic archive containing the system journal, FTL and CivetWeb logs, thread states, file descriptors, listening sockets and TCP counters. I can provide relevant excerpts if needed.

Thank you for your help!

Debug Token:

YGcSmmSA

https://tricorder.pi-hole.net/YGcSmmSA/

The debug report was uploaded on October 12, 2026, at approximately 10:03 CEST, while the issue was still occurring and before restarting FTL.

The report will expire after 48 hours.

What monitoring tool are you using to initiate the checks? As an immediate workaround, modifying your monitoring setup to perform a complete, valid HTTP GET request rather than a simple port check should prevent these stale connections from accumulating.

Thanks a lot for looking into this and for pointing me to the related GitHub issues!

It’s reassuring to know that the problem has already been identified and that a fix is planned for FTL 7.0.

Since my Pi-hole is running in a production environment and provides DNS for my home network, I’d prefer not to experiment with development branches. I’ll stay on the stable release and wait for FTL 7.0.

In the meantime, I’ll continue checking the web interface regularly. If the issue occurs again, I’ll try to collect additional diagnostic information before restarting FTL.

Thanks again for your help!

Just a quick update: The issue occurred again today (October 17), still running FTL v6.7.1.

This time, SSH was still accessible, so I was able to collect diagnostics before restarting FTL.

The symptoms were essentially identical to my previous observations:

  • FTL had been running for approximately five days.
  • The web interface was completely unresponsive, including a local curl request to 127.0.0.1.
  • Both IPv4 listening sockets (ports 80 and 443) showed Recv-Q 201 / Send-Q 200, while the IPv6 queues were empty.
  • The civetweb-master thread was consuming approximately 16% CPU.
  • A five-second strace of the master thread produced 35,139 lines, almost exclusively repeated ppoll() calls returning immediately with two ready file descriptors.

Restarting only pihole-FTL immediately restored the web interface, and all listening queues returned to zero.

Afterwards, I updated to the newly released stable versions (Core v6.5, Web v6.6.1, FTL v6.8). The update completed successfully, and initial DNS and socket checks look normal.

I’ll continue monitoring the system to see whether the issue also occurs with FTL v6.8. Since this Pi-hole is used in production, I’d still prefer to avoid development builds and wait for a stable release containing the confirmed fix.

Thanks again for your help!

I had a closer look at your strace, and this is a different bug than the TLS issue linked earlier. FTL v6.8 does not fix it.

CivetWeb's mg_poll() checks errno even when poll() succeeds. If an earlier call left EINTR or EAGAIN behind and two listening sockets become ready at the same moment, it mistakes this for a timeout and returns without calling accept(). Both sockets stay ready, so it loops forever - exactly the endless ppoll() = 2 you captured.

Your monitor checking ports 80 and 443 at the same time makes this much more likely. Until the fix is released, staggering the two checks by a few seconds should make it rare.

The fix is proposed upstream in Ignore a stale errno when poll() reports more than one ready socket - Pull Request #1442 - civetweb/civetweb - GitHub and included in webserver: serve every configured TLS port, and DoH behind a reverse proxy - Pull Request #3017 - pi-hole/FTL - GitHub, so it ships with FTL v7.0.

Thank you very much for taking a closer look at the strace and identifying the actual cause!

I’ve also looked at both pull requests now. It’s great to see that you’ve already implemented such a targeted fix, including a regression test, and incorporated it into the FTL development code.

I’ve updated to the stable FTL v6.8 and will continue monitoring the web interface. Since this Pi-hole is my production DNS server, I’d prefer to stick with stable releases and wait for FTL v7.0 rather than testing development builds.

Thanks again for your thorough investigation and all your work on Pi-hole. I really appreciate it!