[RPi] ConnMan resource socket leak (1024 FD crash) when using kernel-space WireGuard (wg0)

  • To help other community members check if their systems are suffering from this ConnMan file descriptor leak, I have written a diagnostic script. Connect via SSH and create the script:

    Shell session
    mkdir -p /storage/.config/scripts
    nano /storage/.config/scripts/connman-leak-test.sh

    Paste the following code inside the file:

    Save and exit (Ctrl+O, Enter, Ctrl+X), then give it execution permissions and run it:

    Shell session
    chmod +x /storage/.config/scripts/connman-leak-test.sh
    /storage/.config/scripts/connman-leak-test.sh

    If you let it run full course or interrupt it, it will provide a direct paste link showing if your system is experiencing un-canceled socket tracking build-ups.

  • The patch looks structurally okay to me now, but I can't speak for the code. Denis and Marcel seem to be less active at the moment and I'm not sure if they are still working at Intel or were laid off, which might slow things up (not that ConnMan has been quick in recent years). If there is no comment in a week you might need to reply to your own email submission with a brief apology for the five previous messy iterations, and politely asking for feedback. If we see some positive feedback then I'm happy to pick the patch into LE images until ConnMan sees a version bump that includes it.