waydroid container start failed with execute waydroid session start
Hello
I have a problem running waydroid on Alpine Linux
When I start waydroid everything works until I run waydroid session start when I do this the waydroid container crashes and closes after 10 seconds.
S.O: Alpine Linux v3.11 with wayfire
Screenshot

Log
waydroid log
(014086) [06:36:08] % chmod 666 -R /dev/binder
(014086) [06:36:08] % chmod 666 -R /dev/vndbinder
(014086) [06:36:08] % chmod 666 -R /dev/hwbinder
(014086) [06:36:08] Container manager is waiting for session to load
(014097) [06:36:12] XDG Session is not "wayland"
(014097) [06:36:12] Save session config: /var/lib/waydroid/session.cfg
(014097) [06:36:12] UserMonitor service is not even started
(014097) [06:36:12] Clipboard service is not even started
(014086) [06:36:12] % /usr/lib/waydroid/data/scripts/waydroid-net.sh start
waydroid-net is already running
(014086) [06:36:12] % umount /var/lib/waydroid/rootfs/vendor/waydroid.prop
(014086) [06:36:12] % umount /var/lib/waydroid/rootfs/vendor
(014086) [06:36:12] % umount /var/lib/waydroid/rootfs
(014086) [06:36:12] % mount /usr/share/waydroid-extra/images/system.img /var/lib/waydroid/rootfs
(014086) [06:36:13] % mount -o remount,ro /usr/share/waydroid-extra/images/system.img /var/lib/waydroid/rootfs
(014086) [06:36:13] % mount /usr/share/waydroid-extra/images/vendor.img /var/lib/waydroid/rootfs/vendor
(014086) [06:36:13] % mount -o remount,ro /usr/share/waydroid-extra/images/vendor.img /var/lib/waydroid/rootfs/vendor
(014086) [06:36:13] % mount -o bind /var/lib/waydroid/waydroid.prop /var/lib/waydroid/rootfs/vendor/waydroid.prop
(014086) [06:36:13] % chmod 777 -R /dev/ashmem
(014086) [06:36:13] % chmod 777 -R /dev/dri
(014086) [06:36:13] % chmod 777 -R /dev/fb0
(014086) [06:36:13] % lxc-start -P /var/lib/waydroid/lxc -F -n waydroid -- /init
(014086) [06:36:13] New background process: pid=14130, output=background
lxc-start: waydroid: conf.c: mount_entry: 2247 No such file or directory - Failed to mount "tmpfs" on "/usr/lib/lxc/rootfs/tmp"
lxc-start: waydroid: conf.c: lxc_setup: 4104 Failed to setup mount entries
lxc-start: waydroid: start.c: do_start: 1291 Failed to setup container "waydroid"
lxc-start: waydroid: sync.c: sync_wait: 36 An error occurred in another process (expected sequence number 3)
lxc-start: waydroid: start.c: __lxc_start: 2053 Failed to spawn container "waydroid"
(014086) [06:36:13] waiting 10 seconds for container to start...
lxc-start: waydroid: conf.c: run_buffer: 323 Script exited with status 126
lxc-start: waydroid: start.c: lxc_end: 996 Failed to run lxc.hook.post-stop for container "waydroid"
lxc-start: waydroid: tools/lxc_start.c: main: 308 The container failed to start
lxc-start: waydroid: tools/lxc_start.c: main: 313 Additional information can be obtained by setting the --logfile and --logpriority options
(014086) [06:36:14] waiting 9 seconds for container to start...
(014086) [06:36:15] waiting 8 seconds for container to start...
(014086) [06:36:16] waiting 7 seconds for container to start...
(014086) [06:36:17] waiting 6 seconds for container to start...
(014086) [06:36:18] waiting 5 seconds for container to start...
(014086) [06:36:19] waiting 4 seconds for container to start...
(014086) [06:36:20] waiting 3 seconds for container to start...
(014086) [06:36:21] waiting 2 seconds for container to start...
(014097) [06:36:22] UserMonitor service is not even started
(014097) [06:36:22] Clipboard service is not even started
(014086) [06:36:22] waiting 1 seconds for container to start...
(014086) [06:36:23] ERROR: container failed to start
(014086) [06:36:23] See also: <https://github.com/waydroid>
(014086) [06:36:23] Traceback (most recent call last):
File "/usr/lib/waydroid/tools/__init__.py", line 64, in main
actions.container_manager.start(args)
File "/usr/lib/waydroid/tools/actions/container_manager.py", line 160, in start
raise OSError("container failed to start")
OSError: container failed to start
(014162) [06:36:27] % tail -n 60 -F /var/lib/waydroid/waydroid.log
(014162) [06:36:27] *** output passed to waydroid stdout, not to this log ***
Am also having this issue with Alpine edge
Same here on Arch Linux, the log is the basically same except the target directory where tmpfs will be mounted:
lxc-start: waydroid: conf.c: mount_entry: 2397 No such file or directory - Failed to mount "tmpfs" on "/usr/lib/lxc/rootfs/mnt_extra"
This line said Waydroid failed to mount tmpfs to /usr/lib/lxc/rootfs/mnt_extra (which yours is /usr/lib/lxc/rootfs/tmp)
I don't know much about Alpine Linux or how OpenRC works in general, but in my case (and after dug in Waydroid source code), I found that LXC can't mount the tmpfs to the container so Waydroid failed (the error occurred on this line) where Waydroid start the LXC container. I hope we can find a way to workaround this :P, and if the devs see this then I hope it'll be somewhat helpful to them too
Edit 1: LXC can actually mount the tmpfs but the image I'm using is from chaotic-aur so it's outdated and doesn't have the folder that Waydroid needed (/usr/lib/lxc/rootfs/mnt_extra is wrong, LXC is referring to /var/lib/waydroid/rootfs/mnt_extra), I'm trying the latest image from Waydroid directly now, will give more info when its done :p
Edit 2: Yes, installing the latest image actually fixed it for me
hm... edge should be fully up to date, perhaps some work with LXC needs to be done, I'll look around and see if I can fix things over on Alpine
if wayfire didn't set XDG_SESSION_TYPE (env to check) u can try to set it manually for current terminal session:
export XDG_SESSION_TYPE=wayland
@ThatGeekyWeeb I'm not an alpine user but u should try linux-lts. I don't see ashmem and binder modules in edge config
I have already tried with export XDG_SESSION_TYPE=wayland and XDG_SESSION_TYPE=wayland waydroid container start/session start
but I still get the error
hi,do you solve this problem ? I have the same issue.
Oh, I tried version 1.3.1 and the problem seems to be solved.
so I proceed to close the issue