[Debian] Help users to debug a failure on lxc-stop

Hey,

@brauner or @stgraber if you have some time to help me, I got a bug report on lxc-stop failing in specific environments, see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=961584#32

The “no such file or directory” error is too vague, and I don’t know how to dive into that and help the user understand the issue. Do you have ideas I could follow to start working on that?

I’m not opening a bug report because I’m pretty sure it’s en environment issue and not a bug from LXC.

Thanks!

Small bump. I’ve read a bit of the code without being able to figure out how to understand the origin of the “no such file or directory” message.

In commands.c, at line 289, there is ret = lxc_cmd_rsp_recv(client_fd, cmd);, and this return value is what triggers the error output line 707.

lxc_cmd_rps_recv probably returns with the log_debug call line 156, this return feeds the ret line 289. The ret in argument line 156 is filled from the output of lxc_abstract_unix_recv_fds call line 118. The ret being positive, I guess it’s the recvmsg call lline 192 of af_unix.c that returns a positive value where a 0 length response is expected for lxc-stop.

I wonder if the issue could lie in the fact that the lxc-stop is ran in a docker environment, and therefore a network permission could fail?

Bests!