Lxc exec stuck at 100% cpu

I’ve this lxc exec command stuck since hours:
lxc exec vm622368 – head -n 1 /etc/resolv.conf

Using 100% of a core.

A strace give:

[pid 17928] sched_yield() = 0
[pid 17928] sched_yield() = 0
[pid 17928] sched_yield() = 0
[pid 17928] sched_yield( <unfinished …>
[pid 17931] <… pselect6 resumed> ) = 0 (Timeout)
[pid 17928] <… sched_yield resumed> ) = 0
[pid 17931] epoll_pwait(4, <unfinished …>
[pid 17928] sched_yield( <unfinished …>
[pid 17931] <… epoll_pwait resumed> [], 128, 0, NULL, 0) = 0
[pid 17928] <… sched_yield resumed> ) = 0
[pid 17931] pselect6(0, NULL, NULL, NULL, {tv_sec=0, tv_nsec=10000000}, NULL <unfinished …>
[pid 17928] sched_yield() = 0
[pid 17928] sched_yield() = 0
[pid 17928] sched_yield() = 0
[pid 17928] sched_yield() = 0
(this last line many times)

Is that a bug ?

This is weird because the command head -n 1 /etc/resolv.conf should exit as soon as it runs.
You could be out of memory and lxc exec does not get the chance to initiate.

You might be able to get a better insight as to what is happening with a tool like sysdig,

To be a bug, it should be somehow reproducible (i.e. what steps should I perform in order to get the same result on my installation of LXD). You might also be able to find the source of the issue and diagnose that it’s a bug.

Can you show ps fauxww while this is going on?

We also need the LXD version to make sure it’s not a fixed bug.