Skip to content

pihole allow list Hangs the CLI Instead of Listing the Allowlist

🛑 Problem

Running pihole allow list to see what's currently on the Pi-hole allowlist does not print a list. It hangs — no output, no error, no return to the shell prompt — and appears to spin indefinitely. ps aux on the host shows a /opt/pihole/list.sh allow list process pegging CPU.

🔁 Why This Happens

list is not a recognized subcommand flag here — it's being parsed as a domain argument. pihole allow <domain> adds <domain> to the allowlist; without the -- prefix, pihole allow list is indistinguishable from "add the domain list to the allowlist," and something in /opt/pihole/list.sh's handling of that input path hangs rather than failing cleanly. It does not error immediately the way a genuinely invalid command would — it just spins, which makes it easy to run it two or three times in a row before noticing via ps aux that earlier invocations never exited.

The correct flag to list the current allowlist is --list (or its short form -l), not the bare word list.

🔍 Diagnosis

ps aux | grep list.sh
# root   12345  99.8  0.1  ...  /opt/pihole/list.sh allow list

Multiple stacked instances of list.sh allow list confirm the same mistake was repeated before the hang was noticed.

Check whether any damage was actually done — confirm the literal domain list was never persisted:

sqlite3 /etc/pihole/gravity.db "SELECT id, type, enabled, domain FROM domainlist WHERE domain = 'list';"
# (no rows) — the hang means the add never completed either

✅ Fix

Kill the hung process(es):

sudo kill -9 <pid> [<pid> ...]

Use the correct syntax to actually list the allowlist:

pihole allow --list
# or
pihole allow -l

Since the hang prevents the add from completing, no cleanup of a bogus list domain entry is normally needed — but it's worth the one-line sqlite3 check above to confirm, rather than assuming.