Comments (8)
Thanks for this very good bug report!
lxc 20170412165833.483 DEBUG lxc_start - start.c:signal_handler:326 - Container init process 6991 exited.
is the interesting line here. Somehow the container init fails. Did you just manually compile and load the binder/ashmem kernel modules on Fedora?
As a next step we need to look at the logcat output from within the container. Can you try to use adb shell
to get into the container and dump the log?
from anbox.
About the modules, yes, I first installed dkms on Fedora and then placed the contents of the .deb package in their proper places. The modules compiled without any problem and both /dev/binder
and /dev/ashmem
exist. I also made sure to add the udev rules from the installer.
~ $ lsmod | grep -E "binder|ashmem"
binder_linux 98304 0
ashmem_linux 16384 0
~ $ ls -l /dev/binder
crw-rw-rw- 1 root root 10, 57 abr 12 16:30 /dev/binder
~ $ ls -l /dev/ashmem
crw-rw-rw- 1 root root 10, 58 abr 12 16:30 /dev/ashmem
Running adb says that no devices are attached.
~ $ adb shell
error: no devices/emulators found
I suspect that the container init process fails as quickly as it launched, leaving no time to attach to the container.
from anbox.
The same problem here. Even the container.log is the same.
from anbox.
I have the same problem on archlinux (anbox installed from aur)
from anbox.
After some work I've tried to launch the container anbox creates by myself so I could see what is the output from init itself:
# lxc-start -P /var/lib/anbox/containers/ -F --name default
lxc-start: cgroups/cgfsng.c: create_path_for_hierarchy: 1306 Path "/sys/fs/cgroup/systemd//lxc/default" already existed.
lxc-start: cgroups/cgfsng.c: cgfsng_create: 1363 No such file or directory - Failed to create /sys/fs/cgroup/systemd//lxc/default: No such file or directory
lxc-start: cgroups/cgfsng.c: create_path_for_hierarchy: 1306 Path "/sys/fs/cgroup/systemd//lxc/default-1" already existed.
lxc-start: cgroups/cgfsng.c: cgfsng_create: 1363 No such file or directory - Failed to create /sys/fs/cgroup/systemd//lxc/default-1: No such file or directory
lxc-start: utils.c: safe_mount: 1751 Permission denied - Failed to mount /run/user/1000/anbox/input onto /usr/lib64/lxc/rootfs//dev/input
lxc-start: utils.c: safe_mount: 1751 Permission denied - Failed to mount /run/user/1000/anbox/sockets/anbox_audio onto /usr/lib64/lxc/rootfs//dev/anbox_audio
lxc-start: utils.c: safe_mount: 1751 Permission denied - Failed to mount /run/user/1000/anbox/sockets/anbox_bridge onto /usr/lib64/lxc/rootfs//dev/anbox_bridge
lxc-start: utils.c: safe_mount: 1751 Permission denied - Failed to mount /run/user/1000/anbox/sockets/qemu_pipe onto /usr/lib64/lxc/rootfs//dev/qemu_pipe
Waiting for filesystem being prepared ...
chown: '/dev/qemu_pipe' to 'system:system': Invalid argument
Starting real init now ...
libc: fsetxattr failed to set context (u:object_r:dalvik_prop:s0) for "/dev/__properties__/u:object_r:dalvik_prop:s0"
libc: fsetxattr failed to set context (u:object_r:config_prop:s0) for "/dev/__properties__/u:object_r:config_prop:s0"
libc: fsetxattr failed to set context (u:object_r:nfc_prop:s0) for "/dev/__properties__/u:object_r:nfc_prop:s0"
libc: fsetxattr failed to set context (u:object_r:fingerprint_prop:s0) for "/dev/__properties__/u:object_r:fingerprint_prop:s0"
libc: fsetxattr failed to set context (u:object_r:vold_prop:s0) for "/dev/__properties__/u:object_r:vold_prop:s0"
libc: fsetxattr failed to set context (u:object_r:default_prop:s0) for "/dev/__properties__/u:object_r:default_prop:s0"
libc: fsetxattr failed to set context (u:object_r:security_prop:s0) for "/dev/__properties__/u:object_r:security_prop:s0"
libc: fsetxattr failed to set context (u:object_r:restorecon_prop:s0) for "/dev/__properties__/u:object_r:restorecon_prop:s0"
libc: fsetxattr failed to set context (u:object_r:safemode_prop:s0) for "/dev/__properties__/u:object_r:safemode_prop:s0"
libc: fsetxattr failed to set context (u:object_r:mmc_prop:s0) for "/dev/__properties__/u:object_r:mmc_prop:s0"
libc: fsetxattr failed to set context (u:object_r:logpersistd_logging_prop:s0) for "/dev/__properties__/u:object_r:logpersistd_logging_prop:s0"
libc: fsetxattr failed to set context (u:object_r:device_logging_prop:s0) for "/dev/__properties__/u:object_r:device_logging_prop:s0"
libc: fsetxattr failed to set context (u:object_r:logd_prop:s0) for "/dev/__properties__/u:object_r:logd_prop:s0"
libc: fsetxattr failed to set context (u:object_r:persist_debug_prop:s0) for "/dev/__properties__/u:object_r:persist_debug_prop:s0"
libc: fsetxattr failed to set context (u:object_r:audio_prop:s0) for "/dev/__properties__/u:object_r:audio_prop:s0"
libc: fsetxattr failed to set context (u:object_r:shell_prop:s0) for "/dev/__properties__/u:object_r:shell_prop:s0"
libc: fsetxattr failed to set context (u:object_r:wifi_log_prop:s0) for "/dev/__properties__/u:object_r:wifi_log_prop:s0"
libc: fsetxattr failed to set context (u:object_r:log_tag_prop:s0) for "/dev/__properties__/u:object_r:log_tag_prop:s0"
libc: fsetxattr failed to set context (u:object_r:log_prop:s0) for "/dev/__properties__/u:object_r:log_prop:s0"
libc: fsetxattr failed to set context (u:object_r:dumpstate_prop:s0) for "/dev/__properties__/u:object_r:dumpstate_prop:s0"
libc: fsetxattr failed to set context (u:object_r:debuggerd_prop:s0) for "/dev/__properties__/u:object_r:debuggerd_prop:s0"
libc: fsetxattr failed to set context (u:object_r:debug_prop:s0) for "/dev/__properties__/u:object_r:debug_prop:s0"
libc: fsetxattr failed to set context (u:object_r:bluetooth_prop:s0) for "/dev/__properties__/u:object_r:bluetooth_prop:s0"
libc: fsetxattr failed to set context (u:object_r:pan_result_prop:s0) for "/dev/__properties__/u:object_r:pan_result_prop:s0"
libc: fsetxattr failed to set context (u:object_r:dhcp_prop:s0) for "/dev/__properties__/u:object_r:dhcp_prop:s0"
libc: fsetxattr failed to set context (u:object_r:ffs_prop:s0) for "/dev/__properties__/u:object_r:ffs_prop:s0"
libc: fsetxattr failed to set context (u:object_r:powerctl_prop:s0) for "/dev/__properties__/u:object_r:powerctl_prop:s0"
libc: fsetxattr failed to set context (u:object_r:cppreopt_prop:s0) for "/dev/__properties__/u:object_r:cppreopt_prop:s0"
libc: fsetxattr failed to set context (u:object_r:system_prop:s0) for "/dev/__properties__/u:object_r:system_prop:s0"
libc: fsetxattr failed to set context (u:object_r:radio_prop:s0) for "/dev/__properties__/u:object_r:radio_prop:s0"
libc: fsetxattr failed to set context (u:object_r:system_radio_prop:s0) for "/dev/__properties__/u:object_r:system_radio_prop:s0"
libc: fsetxattr failed to set context (u:object_r:net_radio_prop:s0) for "/dev/__properties__/u:object_r:net_radio_prop:s0"
libc: fsetxattr failed to set context (u:object_r:properties_serial:s0) for "/dev/__properties__/properties_serial"
lxc-start: tools/lxc_start.c: main: 366 The container failed to start.
lxc-start: tools/lxc_start.c: main: 370 Additional information can be obtained by setting the --logfile and --logpriority options.
I'm not totally sure if this is the error actually created when trying to run the container within anbox, or if it is just an error due to the missing pipes which are bind mounted.
from anbox.
After I realised that the Android container was writing to the kernel log, here is what I think is the relevant part of the dmesg
output, I think it may contain more than one attempt at booting the container (which is identified as init
in these logs):
[38472.727405] anboxbr0: port 1(vethW8B54C) entered blocking state
[38472.727408] anboxbr0: port 1(vethW8B54C) entered disabled state
[38472.727537] device vethW8B54C entered promiscuous mode
[38472.728176] IPv6: ADDRCONF(NETDEV_UP): vethW8B54C: link is not ready
[38472.752081] eth0: renamed from vethUDM4II
[38472.770332] IPv6: ADDRCONF(NETDEV_CHANGE): vethW8B54C: link becomes ready
[38472.770383] anboxbr0: port 1(vethW8B54C) entered blocking state
[38472.770386] anboxbr0: port 1(vethW8B54C) entered listening state
[38473.115883] init: init first stage started!
[38473.116219] init: init second stage started!
[38473.119104] init: Running restorecon...
[38473.119129] init: waitpid failed: No child processes
[38473.119217] init: (Loading properties from /default.prop took 0.00s.)
[38473.119807] init: (Parsing /init.environ.rc took 0.00s.)
[38473.123870] init: (Parsing /init.usb.rc took 0.00s.)
[38473.123932] init: (Parsing /init.goldfish.rc took 0.00s.)
[38473.123963] init: (Parsing /init.zygote64_32.rc took 0.00s.)
[38473.123966] init: (Parsing /init.rc took 0.00s.)
[38473.123999] init: write_file: Unable to open '/proc/sys/kernel/sysrq': Read-only file system
[38473.125405] ueventd: ueventd started!
[38473.128226] ueventd: Coldboot took 0.00s.
[38473.135440] cgroup: new mount options do not match the existing superblock, will be ignored
[38473.485148] fs_mgr: No entries found in fstab
[38473.980942] healthd: No battery devices found
[38473.991983] init: 137 output lines suppressed due to ratelimiting
[38474.070263] anboxbr0: port 1(vethW8B54C) entered disabled state
[38474.082324] device vethW8B54C left promiscuous mode
[38474.082348] anboxbr0: port 1(vethW8B54C) entered disabled state
[38477.221962] anboxbr0: port 1(vethR642NM) entered blocking state
[38477.221965] anboxbr0: port 1(vethR642NM) entered disabled state
[38477.222067] device vethR642NM entered promiscuous mode
[38477.222518] IPv6: ADDRCONF(NETDEV_UP): vethR642NM: link is not ready
[38477.250111] eth0: renamed from vethE6GOJS
[38477.270225] IPv6: ADDRCONF(NETDEV_CHANGE): vethR642NM: link becomes ready
[38477.270299] anboxbr0: port 1(vethR642NM) entered blocking state
[38477.270302] anboxbr0: port 1(vethR642NM) entered listening state
[38477.328408] init: init first stage started!
[38477.328805] init: init second stage started!
[38477.329398] init: Running restorecon...
[38477.329436] init: waitpid failed: No child processes
[38477.329547] init: (Loading properties from /default.prop took 0.00s.)
[38477.330370] init: (Parsing /init.environ.rc took 0.00s.)
[38477.330557] init: (Parsing /init.usb.rc took 0.00s.)
[38477.330651] init: (Parsing /init.goldfish.rc took 0.00s.)
[38477.330689] init: (Parsing /init.zygote64_32.rc took 0.00s.)
[38477.330694] init: (Parsing /init.rc took 0.00s.)
[38477.330740] init: write_file: Unable to open '/proc/sys/kernel/sysrq': Read-only file system
[38477.331532] ueventd: ueventd started!
[38477.332195] ueventd: Coldboot took 0.00s.
[38477.342726] cgroup: new mount options do not match the existing superblock, will be ignored
[38477.370611] fs_mgr: No entries found in fstab
[38477.382541] binder_linux: 19229:19229 transaction failed 29189, size 0-0
[38477.395065] binder_linux: 19231:19231 transaction failed 29189, size 0-0
[38477.406590] binder_linux: 19250:19250 transaction failed 29189, size 0-0
[38477.473888] Netfilter messages via NETLINK v0.30.
[38478.382875] healthd: No battery devices found
[38489.579042] capability: warning: `main' uses 32-bit capabilities (legacy support in use)
[38492.392654] anboxbr0: port 1(vethR642NM) entered learning state
[38505.955999] healthd: battery l=100 v=0 t=42.4 h=2 st=2 chg=a
[38506.889541] init: write_file: Unable to open '/proc/sys/vm/extra_free_kbytes': No such file or directory
[38507.753696] anboxbr0: port 1(vethR642NM) entered forwarding state
[38507.753703] anboxbr0: topology change detected, propagating
[38508.845435] show_signal_msg: 68 callbacks suppressed
[38508.845437] anbox[19478]: segfault at 10 ip 00007fb00f9240e8 sp 00007fafc10227d8 error 4 in radeonsi_dri.so[7fb00f5ab000+a75000]
[38510.657662] init: 139 output lines suppressed due to ratelimiting
[38510.657984] binder_linux: release 19234:19287 transaction 957 in, still active
[38510.657986] binder_linux: send failed reply for transaction 957 to 19351:19367
[38510.718361] anboxbr0: port 1(vethR642NM) entered disabled state
[38510.723106] device vethR642NM left promiscuous mode
[38510.723131] anboxbr0: port 1(vethR642NM) entered disabled state
[38820.582920] anboxbr0: port 1(veth9X41Q3) entered blocking state
[38820.582922] anboxbr0: port 1(veth9X41Q3) entered disabled state
[38820.583185] device veth9X41Q3 entered promiscuous mode
[38820.583619] IPv6: ADDRCONF(NETDEV_UP): veth9X41Q3: link is not ready
[38820.620417] anboxbr0: port 1(veth9X41Q3) entered disabled state
[38820.627567] device veth9X41Q3 left promiscuous mode
[38820.627578] anboxbr0: port 1(veth9X41Q3) entered disabled state
[38825.718566] traps: anbox[19912] general protection ip:4bad18 sp:7f53577fd200 error:0
[38825.718571] in anbox[400000+1f9000]
Although anbox did segfault due to radeonsi in the middle there, I don't think it is relevant to this bug in specific... perhaps.
from anbox.
After launching both the session manager followed immediately by a container after removing the uid and gid mappings from its config, the container launched successfully (if with some bugs).
New logs show the container refuses to launch if the mappings do not match the ones allowed for the user, and I'll open a bug report aside for that.
from anbox.
Working even further into it, if I remove all id_map
s from the config file, the container boots. Otherwise, it fails to launch with the init error above.
The whole output of adb logcat
is in this gist:
https://gist.github.com/PedroArvela/37a2de588e4cc457c9a7265be0057553
It includes, I think, both a few failed boots as well as a few successful ones.
from anbox.
Related Issues (20)
- I want to use socks5 port in the host machine HOT 2
- Thanks
- Thanks
- rooted device detection when launching game, any way to bypass? HOT 1
- adb connection lost after executing adb root command HOT 1
- Application manager service is not running yet
- Failed to start session manager on Anbox HOT 2
- Setting up google on anbox HOT 1
- Anbox crashing on startup on Ubuntu 23.04 HOT 1
- snap is out of date
- How to remove the "xxx MB Volume" from my OS with anbox uninstalled?
- Anbox could not start for first time on Ubuntu 22.04.3 LTS
- how to install anbox on ubuntu full installation in ubuntu 23.10
- how to install full installation anbox application on ubuntu 23.10
- How to build from sources on Debian-trixie
- Failed to start as either binder or ashmem kernel drivers are not loaded (ubuntu 22.04.2)
- adding storage capacity
- Failed to start session manager instance via dbus /usr/share/libdrm/amdgpu.ids: No such file or directory
- Tiktok apk installed as Desktop app and no as mobile app
- Anbox-crash-on-start-up
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from anbox.