--- title: Fix commands hanging in Incus container when host OS is Ubuntu date: 2025-11-02 04:47:24.225113 UTC --- I have used Incus-based containers for nearly a year. From Ubuntu 25.04, somethings weird happened, many commands just hang, not return. This post spot the cause: [AppArmor blocks sending signals on Ubuntu 25.04 host](https://discuss.linuxcontainers.org/t/apparmor-blocks-sending-signals-on-ubuntu-25-04-host/23962). There is no true fix yet, there are two workarounds: 1. Disable `apparmor_unconfined_restriction` ```sh sudo sysctl -w kernel.apparmor_restrict_unprivileged_unconfined=0 ``` ([Ref](https://bugs.launchpad.net/ubuntu/+source/apparmor/+bug/2109394)) 2. Using Incus profile ```sh incus profile create apparmor-fix incus profile set apparmor-fix raw.apparmor="signal peer=@{profile_name}//&unconfined," incus profile assign ubuntu-in-incus default,apparmor-fix ``` Replace "ubuntu-in-incus" with your container name. Another issue: Starting Redis with systemctl also fails in Incus, with error log like this: ``` redis-server.service: Failed to set up user namespacing: No such file or directory ``` The fix is to enable nesting namespace: ```sh incus profile set default security.nesting true ```