I’ve observed that if “lxc-ls” is executed when this process is doing its job, one of the container either stops or disappear after creating successfully.
There is no messages in the dmesg either to suggest that what might be going on.
Yes, I know the cause and I have sent a PR https://github.com/lxc/lxc/pull/2526 that fixes this. The problem is that a while back we switched to OFD locks for thread-safety reasons. The kernel does a few things differently with those locks. One this is that it doesn’t want the l_pid field of the lock struct to be set to anything else than 0 and also that it initializes the l_pid field to -1. I didn’t account for that before. With that fix your error is not reproducible.