Update: Wi-Fi Specific Leak Profile & Optimized Service Mitigation.
Through further targeted testing with my custom monitor scripts, I discovered that this tracking leak is entirely Wi-Fi specific. When cycling the VPN over a hardwired Ethernet connection, the file descriptor counts remain completely flat and stable (with Service Mitigation). However, the moment the system switches to a wireless interface, disconnecting the WireGuard tunnel causes an immediate, massive spike in connmand file descriptors. Here is the live capture of the anomaly during a wireless test cycle:
1. VPN Connected (Baseline Stable):
=== Network & VPN Status ===
WireGuard (wg): CONNECTED
=== ConnMan Daemon Resources ===
VPN Daemon (connman-vpnd): 10
Main Daemon (connmand): 19
2. Immediately After Disconnecting VPN (The Wi-Fi Leak Trigger):
=== Network & VPN Status ===
WireGuard (wg): DISCONNECTED
=== ConnMan Daemon Resources ===
VPN Daemon (connman-vpnd): 10
Main Daemon (connmand): 91 <-- Leaked 72 FDs after ~15 minutes on a single disconnect!
It appears that when operating over Wi-Fi, ConnMan's underlying link/route scanning infrastructure fails to execute standard close() calls on its routing sockets when the virtual tunnel interface drops out-of-band. To prevent this aggressive accumulation from hitting the hard kernel wall of 1024 (which inevitably drops all system IP routes and kills SSH access), I have integrated a safe, proactive containment mechanism into my management addon.
By applying a custom systemd override template, we can restrict the process file allocation limits so the service safely self-reclaims without freezing the host system, while also ensuring aggressive logging loops don't choke the storage layer:
[Service]
ExecStart=
ExecStart=/usr/sbin/connmand -n --config=/storage/.config/connman_main.conf --nodnsproxy
LimitNOFILE=4096
LogRateLimitIntervalSec=0
connman_main.conf:
[General]
onlinecheckmode = none
onlinecheckurl =
onlinecheckinterval = 0
onlinecheckipv4url =
onlinecheckipv6url =
- --nodnsproxy: Completely bypasses ConnMan's corrupted DNS loop architecture.
- LimitNOFILE=4096: Explicitly raises the system descriptor ceiling from the default 1024 up to 4096. This provides a massive resource cushion to absorb slow, creeping wireless handle transitions, keeping the core operating system and active SSH terminal sessions completely stable for long-term use.
- LogRateLimitIntervalSec=0: Prevents systemd from locking out or throttling ConnMan diagnostic events during a rapid interface or connection shift.
- OnlineCheckMode=none: Completely disables ConnMan’s periodic internet accessibility probing subsystem, which prevents background testing loops when network gateways drop routing tables.
- OnlineCheckIPv4URL= & OnlineCheckIPv6URL=: Clears the default target endpoints. This blocks ConnMan from attempting out-of-band WPAD/PAC proxy lookups, resolving infinite retry loops triggered by routers like the Fritz!Box.
- OnlineCheckInterval=0: Sets the validation retry timer to zero, completely turning off background testing intervals.
Hopefully, this extra data point regarding the wireless-specific behavior helps the upstream maintainers narrow down exactly which wireless state tracking hooks or netlink socket callbacks are missing their proper garbage collection routines.
Salute!