Bad address - failed to exec /usr/sbin/init.lxc


(Mugesh) #1

Continuing the discussion from Container fails with the sync.c:__sync_wait:57 - An error occurred in another process (expected sequence number 7):

Some times the below error also seen
lxc 20181114064145.879 ERROR lxc_execute - execute.c:execute_start:93 - Bad address - failed to exec /usr/sbin/init.lxc
lxc 20181114064145.879 ERROR lxc_sync - sync.c:__sync_wait:57 - An error occurred in another process (expected sequence number 7)
lxc 20181114064145.879 ERROR lxc_start - start.c:__lxc_start:1459 - Failed to spawn container “p2”.
lxc 20181114064145.879 WARN lxc_monitor - monitor.c:lxc_monitor_fifo_send:111 - Failed to open fifo to send message: No such file or directory.
lxc 20181114064145.879 WARN lxc_monitor - monitor.c:lxc_monitor_fifo_send:111 - Failed to open fifo to send message: No such file or directory.
lxc 20181114064145.881 ERROR lxc_cgfs - cgroups/cgfs.c:cgroup_rmdir:209 - Device or resource busy - Failed to delete /sys/fs/cgroup/cpuset/lxc/p2
lxc 20181114064145.882 ERROR lxc_cgfs - cgroups/cgfs.c:cgroup_rmdir:209 - Device or resource busy - Failed to delete /sys/fs/cgroup/memory/lxc/p2
lxc 20181114064145.884 ERROR lxc_cgfs - cgroups/cgfs.c:cgroup_rmdir:209 - Device or resource busy - Failed to delete /sys/fs/cgroup/cpu,cpuacct/lxc/p2
lxc 20181114064145.885 ERROR lxc_cgfs - cgroups/cgfs.c:cgroup_rmdir:209 - Device or resource busy - Failed to delete /sys/fs/cgroup/devices/lxc/p2
lxc 20181114064145.885 ERROR lxc_cgfs - cgroups/cgfs.c:cgroup_rmdir:209 - Device or resource busy - Failed to delete /sys/fs/cgroup/systemd/system.slice/lxc.service/lxc/p2


(Mugesh) #2

I solved the issue by adding the following line in the config file
lxc.mount.entry = /usr/sbin/init.lxc usr/sbin/init.lxc none ro,bind 0 0

but then facing another issue like below
lxc 20181114083626.788 ERROR lxc_start - start.c:lxc_serve_state_socket_pair:441 - Broken pipe - Failed to send state to 6
lxc 20181114083626.788 ERROR lxc_start - start.c:lxc_set_state:462 - Failed to synchronize via anonymous pair of unix sockets
lxc 20181114083626.788 ERROR lxc_start - start.c:lxc_spawn:1386 - Failed to set state for container “p2” to “RUNNING”.
lxc 20181114083626.788 ERROR lxc_start - start.c:lxc_serve_state_socket_pair:441 - Broken pipe - Failed to send state to 6
lxc 20181114083626.788 ERROR lxc_start - start.c:lxc_set_state:462 - Failed to synchronize via anonymous pair of unix sockets
lxc 20181114083626.791 ERROR lxc_start - start.c:__lxc_start:1459 - Failed to spawn container “p2”.
lxc 20181114083626.791 ERROR lxc_start - start.c:lxc_serve_state_socket_pair:441 - Broken pipe - Failed to send state to 6
lxc 20181114083626.791 ERROR lxc_start - start.c:lxc_set_state:462 - Failed to synchronize via anonymous pair of unix sockets
lxc 20181114083626.816 ERROR lxc_start - start.c:lxc_serve_state_socket_pair:441 - Broken pipe - Failed to send state to 6
lxc 20181114083626.816 ERROR lxc_start - start.c:lxc_set_state:462 - Failed to synchronize via anonymous pair of unix sockets