aind-containers / aind

AinD: Android in Docker. Ain't an emulator.
Apache License 2.0
1.49k stars 90 forks source link

'docker build .' produces an image with a fatal startup error #59

Closed concision closed 3 years ago

concision commented 3 years ago

Issue

The repository sources build a Docker image successfully, however the image is unusable with a fatal error during initialization (check the bottom of the attached log); no Anbox application manager appears, adb has no available devices, etc. This error does not occur on aind/aind:latest or aind/aind:0.0.3.

I forked this repository and executed the main workflow and it fails the tests with the same fatal startup error as seen on 3 other machines/environments.

108 of the dependencies installed (most are transitive) have been updated with a new version on the Ubuntu repositories - one of the dependency updates may have broken the master branch since the last successful build. If the underlying issue is an incompatible dependency update, then the dependencies should probably be version pinned for apt-get install in the future to ensure some determinism.

Can a project maintainer verify this issue and, if applicable, resolve the master branch build? As it stands, this appears to be blocking future pull requests.

Reproduction

Steps:

git clone https://github.com/aind-containers/aind.git
cd aind
docker build -t aind:aind/local .
./hack/translate-dockerfile-runopt-directive.sh < Dockerfile | DOCKER_BUILDKIT=1 docker build -f - -t aind/aind:local .

docker logs aind:

Created symlink /etc/systemd/system/systemd-firstboot.service → /dev/null.
Created symlink /etc/systemd/system/systemd-udevd.service → /dev/null.
Created symlink /etc/systemd/system/multi-user.target.wants/docker-entrypoint.service → /etc/systemd/system/docker-entrypoint.service.
/docker-entrypoint.sh: starting /lib/systemd/systemd --show-status=false --unit=docker-entrypoint.target
systemd 245.4-4ubuntu3.4 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN2 -IDN +PCRE2 default-hierarchy=hybrid)
Detected virtualization docker.
Detected architecture x86-64.
Set hostname to <248df8e4f52b>.
/lib/systemd/system/dbus.socket:5: ListenStream= references a path below legacy directory /var/run/, updating /var/run/dbus/system_bus_socket → /run/dbus/system_bus_socket; please update the unit file accordingly.
+ source /etc/docker-entrypoint-cmd
++ unsudo /home/user/docker-2ndboot.sh
+ car=/home/user/docker-2ndboot.sh
+ shift
+ cdr=
++ which /home/user/docker-2ndboot.sh
+ exec machinectl shell user@ /home/user/docker-2ndboot.sh
Connected to the local host. Press ^] three times within 1s to exit session.
+ mkdir -p /home/user/.vnc
+ '[' '!' -e /home/user/.vnc/passwdfile ']'
+ set +x
+ export DISPLAY=:0
+ DISPLAY=:0
+ '[' -e /tmp/.X11-unix/X0 ']'
+ sleep 1
+ Xvfb
+ '[' -e /tmp/.X11-unix/X0 ']'
+ : FIXME: remove this sleep
+ sleep 1
+ x11vnc -usepw -ncache 10 -forever -bg
28/02/2021 01:44:14 -usepw: found /home/user/.vnc/passwdfile
28/02/2021 01:44:14 x11vnc version: 0.9.16 lastmod: 2019-01-05  pid: 118
28/02/2021 01:44:14 Using X display :0
28/02/2021 01:44:14 rootwin: 0x50e reswin: 0x200001 dpy: 0x990df3c0
28/02/2021 01:44:14 
28/02/2021 01:44:14 ------------------ USEFUL INFORMATION ------------------
28/02/2021 01:44:14 X DAMAGE available on display, using it for polling hints.
28/02/2021 01:44:14   To disable this behavior use: '-noxdamage'
28/02/2021 01:44:14 
28/02/2021 01:44:14   Most compositing window managers like 'compiz' or 'beryl'
28/02/2021 01:44:14   cause X DAMAGE to fail, and so you may not see any screen
28/02/2021 01:44:14   updates via VNC.  Either disable 'compiz' (recommended) or
28/02/2021 01:44:14   supply the x11vnc '-noxdamage' command line option.
28/02/2021 01:44:14 
28/02/2021 01:44:14 Wireframing: -wireframe mode is in effect for window moves.
28/02/2021 01:44:14   If this yields undesired behavior (poor response, painting
28/02/2021 01:44:14   errors, etc) it may be disabled:
28/02/2021 01:44:14    - use '-nowf' to disable wireframing completely.
28/02/2021 01:44:14    - use '-nowcr' to disable the Copy Rectangle after the
28/02/2021 01:44:14      moved window is released in the new position.
28/02/2021 01:44:14   Also see the -help entry for tuning parameters.
28/02/2021 01:44:14   You can press 3 Alt_L's (Left "Alt" key) in a row to 
28/02/2021 01:44:14   repaint the screen, also see the -fixscreen option for
28/02/2021 01:44:14   periodic repaints.
28/02/2021 01:44:14 
28/02/2021 01:44:14 XFIXES available on display, resetting cursor mode
28/02/2021 01:44:14   to: '-cursor most'.
28/02/2021 01:44:14   to disable this behavior use: '-cursor arrow'
28/02/2021 01:44:14   or '-noxfixes'.
28/02/2021 01:44:14 using XFIXES for cursor drawing.
28/02/2021 01:44:14 GrabServer control via XTEST.
28/02/2021 01:44:14 
28/02/2021 01:44:14 Scroll Detection: -scrollcopyrect mode is in effect to
28/02/2021 01:44:14   use RECORD extension to try to detect scrolling windows
28/02/2021 01:44:14   (induced by either user keystroke or mouse input).
28/02/2021 01:44:14   If this yields undesired behavior (poor response, painting
28/02/2021 01:44:14   errors, etc) it may be disabled via: '-noscr'
28/02/2021 01:44:14   Also see the -help entry for tuning parameters.
28/02/2021 01:44:14   You can press 3 Alt_L's (Left "Alt" key) in a row to 
28/02/2021 01:44:14   repaint the screen, also see the -fixscreen option for
28/02/2021 01:44:14   periodic repaints.
28/02/2021 01:44:14 
28/02/2021 01:44:14 Client Side Caching: -ncache mode is in effect to provide
28/02/2021 01:44:14   client-side pixel data caching.  This speeds up
28/02/2021 01:44:14   iconifying/deiconifying windows, moving and raising
28/02/2021 01:44:14   windows, and reposting menus.  In the simple CopyRect
28/02/2021 01:44:14   encoding scheme used (no compression) a huge amount
28/02/2021 01:44:14   of extra memory (20-100MB) is used on both the server and
28/02/2021 01:44:14   client sides.  This mode works with any VNC viewer.
28/02/2021 01:44:14   However, in most you can actually see the cached pixel
28/02/2021 01:44:14   data by scrolling down, so you need to re-adjust its size.
28/02/2021 01:44:14   See http://www.karlrunge.com/x11vnc/faq.html#faq-client-caching.
28/02/2021 01:44:14   If this mode yields undesired behavior (poor response,
28/02/2021 01:44:14   painting errors, etc) it may be disabled via: '-ncache 0'
28/02/2021 01:44:14   You can press 3 Alt_L's (Left "Alt" key) in a row to 
28/02/2021 01:44:14   repaint the screen, also see the -fixscreen option for
28/02/2021 01:44:14   periodic repaints.
28/02/2021 01:44:14 
28/02/2021 01:44:14 XKEYBOARD: number of keysyms per keycode 7 is greater
28/02/2021 01:44:14   than 4 and 51 keysyms are mapped above 4.
28/02/2021 01:44:14   Automatically switching to -xkb mode.
28/02/2021 01:44:14   If this makes the key mapping worse you can
28/02/2021 01:44:14   disable it with the "-noxkb" option.
28/02/2021 01:44:14   Also, remember "-remap DEAD" for accenting characters.
28/02/2021 01:44:14 
28/02/2021 01:44:14 X FBPM extension not supported.
Xlib:  extension "DPMS" missing on display ":0".
28/02/2021 01:44:14 X display is not capable of DPMS.
28/02/2021 01:44:14 --------------------------------------------------------
28/02/2021 01:44:14 
28/02/2021 01:44:14 Default visual ID: 0x21
28/02/2021 01:44:14 Read initial data from X display into framebuffer.
28/02/2021 01:44:14 initialize_screen: fb_depth/fb_bpp/fb_Bpl 24/32/5120
28/02/2021 01:44:14 
28/02/2021 01:44:14 X display :0 is 32bpp depth=24 true color
28/02/2021 01:44:14 
28/02/2021 01:44:14 Autoprobing TCP port 
28/02/2021 01:44:14 Autoprobing selected TCP port 5900
28/02/2021 01:44:14 Autoprobing TCP6 port 
28/02/2021 01:44:14 Autoprobing selected TCP6 port 5900
28/02/2021 01:44:14 listen6: bind: Address already in use
28/02/2021 01:44:14 Not listening on IPv6 interface.
28/02/2021 01:44:14 
28/02/2021 01:44:14 Xinerama is present and active (e.g. multi-head).
28/02/2021 01:44:14 Xinerama: number of sub-screens: 1
28/02/2021 01:44:14 Xinerama: no blackouts needed (only one sub-screen)
28/02/2021 01:44:14 
28/02/2021 01:44:14 fb read rate: 692 MB/sec
28/02/2021 01:44:14 fast read: reset -wait  ms to: 10
28/02/2021 01:44:14 fast read: reset -defer ms to: 10
28/02/2021 01:44:14 The X server says there are 10 mouse buttons.
28/02/2021 01:44:14 screen setup finished.
28/02/2021 01:44:14 

The VNC desktop is:      248df8e4f52b:0
PORT=5900
+ systemctl is-system-running --wait
+ fvwm
running
+ systemctl status --no-pager -l anbox-container-manager
● anbox-container-manager.service - Anbox Container Manager
     Loaded: loaded (]8;;file://248df8e4f52b/lib/systemd/system/anbox-container-manager.service/lib/systemd/system/anbox-container-manager.service]8;;; enabled; vendor preset: enabled)
     Active: active (running) since Sun 2021-02-28 01:44:12 UTC; 2s ago
    Process: 44 ExecStartPre=/usr/local/bin/anbox-container-manager-pre.sh (code=exited, status=0/SUCCESS)
    Process: 56 ExecStartPre=/usr/local/share/anbox/anbox-bridge.sh start (code=exited, status=0/SUCCESS)
   Main PID: 93 (anbox)
      Tasks: 10 (limit: 4619)
     Memory: 8.1M
     CGroup: /docker/248df8e4f52b27ff7f8ff66b6c02cdad445929c7bf18331d2065e40dc454b7a0/system.slice/anbox-container-manager.service
             ├─93 /usr/local/bin/anbox container-manager --daemon --data-path=/var/lib/anbox --android-image=/aind-android.img --use-rootfs-overlay --force-squashfuse
             └─98 squashfuse /aind-android.img /var/lib/anbox/rootfs -o rw,allow_other,dev,suid

Feb 28 01:44:12 248df8e4f52b anbox-container-manager-pre.sh[44]: + '[' 0 '!=' 0 ']'
Feb 28 01:44:12 248df8e4f52b anbox-container-manager-pre.sh[44]: + /sbin/modprobe ashmem_linux
Feb 28 01:44:12 248df8e4f52b anbox-container-manager-pre.sh[44]: + '[' '!' -e /dev/ashmem ']'
Feb 28 01:44:12 248df8e4f52b anbox-container-manager-pre.sh[44]: + /sbin/modprobe binder_linux
Feb 28 01:44:12 248df8e4f52b anbox-container-manager-pre.sh[44]: + grep binder /proc/filesystems
Feb 28 01:44:12 248df8e4f52b anbox-container-manager-pre.sh[53]: nodev        binder
Feb 28 01:44:12 248df8e4f52b anbox-container-manager-pre.sh[44]: + '[' '!' -e /dev/binderfs/binder-control ']'
Feb 28 01:44:12 248df8e4f52b anbox-container-manager-pre.sh[44]: + mkdir -p /dev/binderfs
Feb 28 01:44:12 248df8e4f52b anbox-container-manager-pre.sh[44]: + mount -t binder none /dev/binderfs
Feb 28 01:44:12 248df8e4f52b systemd[1]: Started Anbox Container Manager.
+ anbox wait-ready
+ anbox session-manager
[ 2021-02-28 01:44:15] [daemon.cpp:61@Run] [org.freedesktop.DBus.Error.ServiceUnknown] The name org.anbox was not provided by any .service files
+ sleep 1
[fvwm][FlocaleGetFontSet]: (-*-fixed-medium-r-semicondensed-*-13-*-*-*-*-*-*-*,-*-fixed-medium-r-normal-*-14-*-*-*-*-*-*-*,-*-*-medium-r-normal-*-16-*-*-*-*-*-*-*) Missing font charsets:
ISO8859-2, ISO8859-3, ISO8859-4, ISO8859-5, KOI8-R, ISO8859-7, ISO8859-9, ISO8859-13, ISO8859-14, ISO8859-15, JISX0208.1983-0, KSC5601.1987-0, GB2312.1980-0, JISX0201.1976-0, ISO10646-1
sh: 1: fvwm-menu-desktop: not found
[FvwmIconMan][FlocaleGetFontSet]: (-*-fixed-medium-r-semicondensed-*-13-*-*-*-*-*-*-*,-*-fixed-medium-r-normal-*-14-*-*-*-*-*-*-*,-*-*-medium-r-normal-*-16-*-*-*-*-*-*-*) Missing font charsets:
ISO8859-2, ISO8859-3, ISO8859-4, ISO8859-5, KOI8-R, ISO8859-7, ISO8859-9, ISO8859-13, ISO8859-14, ISO8859-15, JISX0208.1983-0, KSC5601.1987-0, GB2312.1980-0, JISX0201.1976-0, ISO10646-1
[FvwmPager][FlocaleGetFontSet]: (-*-fixed-medium-r-semicondensed-*-13-*-*-*-*-*-*-*,-*-fixed-medium-r-normal-*-14-*-*-*-*-*-*-*,-*-*-medium-r-normal-*-16-*-*-*-*-*-*-*) Missing font charsets:
ISO8859-2, ISO8859-3, ISO8859-4, ISO8859-5, KOI8-R, ISO8859-7, ISO8859-9, ISO8859-13, ISO8859-14, ISO8859-15, JISX0208.1983-0, KSC5601.1987-0, GB2312.1980-0, JISX0201.1976-0, ISO10646-1
libEGL warning: failed to open /dev/dri/card0: Permission denied

libEGL warning: failed to open /dev/dri/card0: Permission denied

+ anbox wait-ready
Stack trace (most recent call last) in thread 247:
#7    Object "[0xffffffffffffffff]", at 0xffffffffffffffff, in 
#6    Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7fbe6e37e292, in clone
#5    Object "/lib/x86_64-linux-gnu/libpthread.so.0", at 0x7fbe6e6ee608, in 
#4    Object "anbox", at 0x557d24263c14, in emugl::Thread::thread_main(void*)
#3    Object "anbox", at 0x557d24170f58, in RenderThread::main()
#2    Object "anbox", at 0x557d2425e960, in renderControl_decoder_context_t::decode(void*, unsigned long, IOStream*)
#1    Object "anbox", at 0x557d241def42, in 
#0    Object "anbox", at 0x557d241e1de9, in RendererConfigList::getPackInfo(int*, int*) const
Segmentation fault (Address not mapped to object [(nil)])
[ 2021-02-28 01:44:20] [daemon.cpp:61@Run] [org.freedesktop.DBus.Error.ServiceUnknown] The name org.anbox was not provided by any .service files
/home/user/docker-2ndboot.sh: line 38:   123 Segmentation fault      (core dumped) anbox session-manager
+ sleep 1
+ anbox wait-ready
[ 2021-02-28 01:44:21] [daemon.cpp:61@Run] [org.freedesktop.DBus.Error.ServiceUnknown] The name org.anbox was not provided by any .service files
+ sleep 1
+ anbox wait-ready
[ 2021-02-28 01:44:22] [daemon.cpp:61@Run] [org.freedesktop.DBus.Error.ServiceUnknown] The name org.anbox was not provided by any .service files
+ sleep 1
+ anbox wait-ready
[ 2021-02-28 01:44:23] [daemon.cpp:61@Run] [org.freedesktop.DBus.Error.ServiceUnknown] The name org.anbox was not provided by any .service files
...

The last several lines repeat ad infinitum.

nirweiner2 commented 3 years ago

I have the same problem

jc-lab commented 3 years ago

anbox version is different.

version of git source: 170f1e029e753e782c66bffb05e91dd770d47dc3 version of docker image: c898810050df67adccd64a84b2d763250a42e722

The only big difference is this.

jc-lab commented 3 years ago

$ docker run --rm -it aind-local anbox version ... anbox local-c898810

c898810 also didn't work. I don't know why.

reated symlink /etc/systemd/system/systemd-firstboot.service → /dev/null.
Created symlink /etc/systemd/system/systemd-udevd.service → /dev/null.
Created symlink /etc/systemd/system/multi-user.target.wants/docker-entrypoint.service → /etc/systemd/system/docker-entrypoint.service.
/docker-entrypoint.sh: starting /lib/systemd/systemd --show-status=false --unit=docker-entrypoint.target
systemd 245.4-4ubuntu3.5 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN2 -IDN +PCRE2 default-hierarchy=hybrid)
Detected virtualization docker.
Detected architecture x86-64.
Set hostname to <180fae0e9cf6>.
/lib/systemd/system/dbus.socket:5: ListenStream= references a path below legacy directory /var/run/, updating /var/run/dbus/system_bus_socket → /run/dbus/system_bus_socket; please update the unit file accordingly.
+ source /etc/docker-entrypoint-cmd
++ unsudo /home/user/docker-2ndboot.sh
+ car=/home/user/docker-2ndboot.sh
+ shift
+ cdr=
++ which /home/user/docker-2ndboot.sh
+ exec machinectl shell user@ /home/user/docker-2ndboot.sh
Connected to the local host. Press ^] three times within 1s to exit session.
+ mkdir -p /home/user/.vnc
+ '[' '!' -e /home/user/.vnc/passwdfile ']'
+ set +x
+ export DISPLAY=:0
+ DISPLAY=:0
+ '[' -e /tmp/.X11-unix/X0 ']'
+ sleep 1
+ Xvfb
+ '[' -e /tmp/.X11-unix/X0 ']'
+ : FIXME: remove this sleep
+ sleep 1
+ x11vnc -usepw -ncache 10 -forever -bg
03/04/2021 02:59:51 -usepw: found /home/user/.vnc/passwdfile
03/04/2021 02:59:51 x11vnc version: 0.9.16 lastmod: 2019-01-05  pid: 117
03/04/2021 02:59:51 Using X display :0
03/04/2021 02:59:51 rootwin: 0x50e reswin: 0x200001 dpy: 0x8be723c0
03/04/2021 02:59:51 
03/04/2021 02:59:51 ------------------ USEFUL INFORMATION ------------------
03/04/2021 02:59:51 X DAMAGE available on display, using it for polling hints.
03/04/2021 02:59:51   To disable this behavior use: '-noxdamage'
03/04/2021 02:59:51 
03/04/2021 02:59:51   Most compositing window managers like 'compiz' or 'beryl'
03/04/2021 02:59:51   cause X DAMAGE to fail, and so you may not see any screen
03/04/2021 02:59:51   updates via VNC.  Either disable 'compiz' (recommended) or
03/04/2021 02:59:51   supply the x11vnc '-noxdamage' command line option.
03/04/2021 02:59:51 
03/04/2021 02:59:51 Wireframing: -wireframe mode is in effect for window moves.
03/04/2021 02:59:51   If this yields undesired behavior (poor response, painting
03/04/2021 02:59:51   errors, etc) it may be disabled:
03/04/2021 02:59:51    - use '-nowf' to disable wireframing completely.
03/04/2021 02:59:51    - use '-nowcr' to disable the Copy Rectangle after the
03/04/2021 02:59:51      moved window is released in the new position.
03/04/2021 02:59:51   Also see the -help entry for tuning parameters.
03/04/2021 02:59:51   You can press 3 Alt_L's (Left "Alt" key) in a row to 
03/04/2021 02:59:51   repaint the screen, also see the -fixscreen option for
03/04/2021 02:59:51   periodic repaints.
03/04/2021 02:59:51 
03/04/2021 02:59:51 XFIXES available on display, resetting cursor mode
03/04/2021 02:59:51   to: '-cursor most'.
03/04/2021 02:59:51   to disable this behavior use: '-cursor arrow'
03/04/2021 02:59:51   or '-noxfixes'.
03/04/2021 02:59:51 using XFIXES for cursor drawing.
03/04/2021 02:59:51 GrabServer control via XTEST.
03/04/2021 02:59:51 
03/04/2021 02:59:51 Scroll Detection: -scrollcopyrect mode is in effect to
03/04/2021 02:59:51   use RECORD extension to try to detect scrolling windows
03/04/2021 02:59:51   (induced by either user keystroke or mouse input).
03/04/2021 02:59:51   If this yields undesired behavior (poor response, painting
03/04/2021 02:59:51   errors, etc) it may be disabled via: '-noscr'
03/04/2021 02:59:51   Also see the -help entry for tuning parameters.
03/04/2021 02:59:51   You can press 3 Alt_L's (Left "Alt" key) in a row to 
03/04/2021 02:59:51   repaint the screen, also see the -fixscreen option for
03/04/2021 02:59:51   periodic repaints.
03/04/2021 02:59:51 
03/04/2021 02:59:51 Client Side Caching: -ncache mode is in effect to provide
03/04/2021 02:59:51   client-side pixel data caching.  This speeds up
03/04/2021 02:59:51   iconifying/deiconifying windows, moving and raising
03/04/2021 02:59:51   windows, and reposting menus.  In the simple CopyRect
03/04/2021 02:59:51   encoding scheme used (no compression) a huge amount
03/04/2021 02:59:51   of extra memory (20-100MB) is used on both the server and
03/04/2021 02:59:51   client sides.  This mode works with any VNC viewer.
03/04/2021 02:59:51   However, in most you can actually see the cached pixel
03/04/2021 02:59:51   data by scrolling down, so you need to re-adjust its size.
03/04/2021 02:59:51   See http://www.karlrunge.com/x11vnc/faq.html#faq-client-caching.
03/04/2021 02:59:51   If this mode yields undesired behavior (poor response,
03/04/2021 02:59:51   painting errors, etc) it may be disabled via: '-ncache 0'
03/04/2021 02:59:51   You can press 3 Alt_L's (Left "Alt" key) in a row to 
03/04/2021 02:59:51   repaint the screen, also see the -fixscreen option for
03/04/2021 02:59:51   periodic repaints.
03/04/2021 02:59:51 
03/04/2021 02:59:51 XKEYBOARD: number of keysyms per keycode 7 is greater
03/04/2021 02:59:51   than 4 and 51 keysyms are mapped above 4.
03/04/2021 02:59:51   Automatically switching to -xkb mode.
03/04/2021 02:59:51   If this makes the key mapping worse you can
03/04/2021 02:59:51   disable it with the "-noxkb" option.
03/04/2021 02:59:51   Also, remember "-remap DEAD" for accenting characters.
03/04/2021 02:59:51 
03/04/2021 02:59:51 X FBPM extension not supported.
Xlib:  extension "DPMS" missing on display ":0".
03/04/2021 02:59:51 X display is not capable of DPMS.
03/04/2021 02:59:51 --------------------------------------------------------
03/04/2021 02:59:51 
03/04/2021 02:59:51 Default visual ID: 0x21
03/04/2021 02:59:51 Read initial data from X display into framebuffer.
03/04/2021 02:59:51 initialize_screen: fb_depth/fb_bpp/fb_Bpl 24/32/5120
03/04/2021 02:59:51 
03/04/2021 02:59:51 X display :0 is 32bpp depth=24 true color
03/04/2021 02:59:51 
03/04/2021 02:59:51 Autoprobing TCP port 
03/04/2021 02:59:51 Autoprobing selected TCP port 5900
03/04/2021 02:59:51 Autoprobing TCP6 port 
03/04/2021 02:59:51 Autoprobing selected TCP6 port 5900
03/04/2021 02:59:51 listen6: bind: Address already in use
03/04/2021 02:59:51 Not listening on IPv6 interface.
03/04/2021 02:59:51 
03/04/2021 02:59:51 Xinerama is present and active (e.g. multi-head).
03/04/2021 02:59:51 Xinerama: number of sub-screens: 1
03/04/2021 02:59:51 Xinerama: no blackouts needed (only one sub-screen)
03/04/2021 02:59:51 
03/04/2021 02:59:51 fb read rate: 2040 MB/sec
03/04/2021 02:59:51 fast read: reset -wait  ms to: 10
03/04/2021 02:59:51 fast read: reset -defer ms to: 10
03/04/2021 02:59:51 The X server says there are 10 mouse buttons.
03/04/2021 02:59:51 screen setup finished.
03/04/2021 02:59:51 

The VNC desktop is:      180fae0e9cf6:0
PORT=5900
+ systemctl is-system-running --wait
+ fvwm
running
+ systemctl status --no-pager -l anbox-container-manager
● anbox-container-manager.service - Anbox Container Manager
     Loaded: loaded (/lib/systemd/system/anbox-container-manager.service; enabled; vendor preset: enabled)
     Active: active (running) since Sat 2021-04-03 02:59:49 UTC; 1s ago
    Process: 43 ExecStartPre=/usr/local/bin/anbox-container-manager-pre.sh (code=exited, status=0/SUCCESS)
    Process: 57 ExecStartPre=/usr/local/share/anbox/anbox-bridge.sh start (code=exited, status=0/SUCCESS)
   Main PID: 100 (anbox)
      Tasks: 10 (limit: 4618)
     Memory: 4.2M
     CGroup: /docker/180fae0e9cf6d52ccda2b3011dd64d42a514fadaf93af8b306ec4192ada984a7/system.slice/anbox-container-manager.service
             ├─100 /usr/local/bin/anbox container-manager --daemon --data-path=/var/lib/anbox --android-image=/aind-android.img --use-rootfs-overlay --force-squashfuse
             └─107 squashfuse /aind-android.img /var/lib/anbox/rootfs -o rw,allow_other,dev,suid

Apr 03 02:59:48 180fae0e9cf6 anbox-container-manager-pre.sh[43]: + '[' 0 '!=' 0 ']'
Apr 03 02:59:48 180fae0e9cf6 anbox-container-manager-pre.sh[43]: + /sbin/modprobe ashmem_linux
Apr 03 02:59:48 180fae0e9cf6 anbox-container-manager-pre.sh[43]: + '[' '!' -e /dev/ashmem ']'
Apr 03 02:59:48 180fae0e9cf6 anbox-container-manager-pre.sh[43]: + /sbin/modprobe binder_linux
Apr 03 02:59:48 180fae0e9cf6 anbox-container-manager-pre.sh[43]: + grep binder /proc/filesystems
Apr 03 02:59:48 180fae0e9cf6 anbox-container-manager-pre.sh[52]: nodev        binder
Apr 03 02:59:48 180fae0e9cf6 anbox-container-manager-pre.sh[43]: + '[' '!' -e /dev/binderfs/binder-control ']'
Apr 03 02:59:48 180fae0e9cf6 anbox-container-manager-pre.sh[43]: + mkdir -p /dev/binderfs
Apr 03 02:59:48 180fae0e9cf6 anbox-container-manager-pre.sh[43]: + mount -t binder none /dev/binderfs
Apr 03 02:59:49 180fae0e9cf6 systemd[1]: Started Anbox Container Manager.
+ anbox wait-ready
+ anbox session-manager
[fvwm][FlocaleGetFontSet]: (-*-fixed-medium-r-semicondensed-*-13-*-*-*-*-*-*-*,-*-fixed-medium-r-normal-*-14-*-*-*-*-*-*-*,-*-*-medium-r-normal-*-16-*-*-*-*-*-*-*) Missing font charsets:
ISO8859-2, ISO8859-3, ISO8859-4, ISO8859-5, KOI8-R, ISO8859-7, ISO8859-9, ISO8859-13, ISO8859-14, ISO8859-15, JISX0208.1983-0, KSC5601.1987-0, GB2312.1980-0, JISX0201.1976-0, ISO10646-1
[ 2021-04-03 02:59:51] [daemon.cpp:61@Run] Application manager service is not running yet
+ sleep 1
sh: 1: fvwm-menu-desktop: not found
[FvwmIconMan][FlocaleGetFontSet]: (-*-fixed-medium-r-semicondensed-*-13-*-*-*-*-*-*-*,-*-fixed-medium-r-normal-*-14-*-*-*-*-*-*-*,-*-*-medium-r-normal-*-16-*-*-*-*-*-*-*) Missing font charsets:
ISO8859-2, ISO8859-3, ISO8859-4, ISO8859-5, KOI8-R, ISO8859-7, ISO8859-9, ISO8859-13, ISO8859-14, ISO8859-15, JISX0208.1983-0, KSC5601.1987-0, GB2312.1980-0, JISX0201.1976-0, ISO10646-1
[FvwmPager][FlocaleGetFontSet]: (-*-fixed-medium-r-semicondensed-*-13-*-*-*-*-*-*-*,-*-fixed-medium-r-normal-*-14-*-*-*-*-*-*-*,-*-*-medium-r-normal-*-16-*-*-*-*-*-*-*) Missing font charsets:
ISO8859-2, ISO8859-3, ISO8859-4, ISO8859-5, KOI8-R, ISO8859-7, ISO8859-9, ISO8859-13, ISO8859-14, ISO8859-15, JISX0208.1983-0, KSC5601.1987-0, GB2312.1980-0, JISX0201.1976-0, ISO10646-1
libEGL warning: failed to open /dev/dri/card0: Permission denied

libEGL warning: failed to open /dev/dri/card0: Permission denied

+ anbox wait-ready
Stack trace (most recent call last) in thread 241:
#7    Object "[0xffffffffffffffff]", at 0xffffffffffffffff, in 
#6    Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7f8e3bb72292, in clone
#5    Object "/lib/x86_64-linux-gnu/libpthread.so.0", at 0x7f8e3bee2608, in 
#4    Object "anbox", at 0x561e00fc8f74, in emugl::Thread::thread_main(void*)
#3    Object "anbox", at 0x561e00eedfbf, in RenderThread::main()
#2    Object "anbox", at 0x561e00fc3cc0, in renderControl_decoder_context_t::decode(void*, unsigned long, IOStream*)
#1    Object "anbox", at 0x561e00f4d992, in 
#0    Object "anbox", at 0x561e00f50849, in RendererConfigList::getPackInfo(int*, int*) const
Segmentation fault (Address not mapped to object [(nil)])
[ 2021-04-03 02:59:54] [daemon.cpp:61@Run] Failed to retrieve ready property from application manager
/home/user/docker-2ndboot.sh: line 38:   122 Segmentation fault      (core dumped) anbox session-manager
+ sleep 1
+ anbox wait-ready
[ 2021-04-03 02:59:55] [daemon.cpp:61@Run] Application manager service is not running yet
+ sleep 1
+ anbox wait-ready
[ 2021-04-03 02:59:56] [daemon.cpp:61@Run] Application manager service is not running yet
+ sleep 1
+ anbox wait-ready
[ 2021-04-03 02:59:57] [daemon.cpp:61@Run] Application manager service is not running yet
+ sleep 1
+ anbox wait-ready
[ 2021-04-03 02:59:58] [daemon.cpp:61@Run] Application manager service is not running yet
+ sleep 1
+ anbox wait-ready
[ 2021-04-03 02:59:59] [daemon.cpp:61@Run] Application manager service is not running yet
+ sleep 1
+ anbox wait-ready
[ 2021-04-03 03:00:00] [daemon.cpp:61@Run] Application manager service is not running yet
+ sleep 1
+ anbox wait-ready
[ 2021-04-03 03:00:01] [daemon.cpp:61@Run] Application manager service is not running yet
+ sleep 1
+ anbox wait-ready
[ 2021-04-03 03:00:02] [daemon.cpp:61@Run] Application manager service is not running yet
+ sleep 1
+ anbox wait-ready
[ 2021-04-03 03:00:03] [daemon.cpp:61@Run] Application manager service is not running yet
+ sleep 1

And 829471d7a296a8a719c99771718666ab6301810f commit also does not worked.

jc-lab commented 3 years ago

After installing swiftshader, set ANBOX_FORCE_SOFTWARE_RENDERING to true, so it works well. Something seems to be a problem with dependencies and anbox's wrong GL handling.


The above solution is for the c898810 commit. The latest commit still has DBus issues(org.freedesktop.DBus.Error.ServiceUnknown).

Fuseteam commented 3 years ago

i managed to build and run the image fine on the current master, granted I do see a [ 2021-04-21 16:59:55] [daemon.cpp:61@Run] [org.freedesktop.DBus.Error.ServiceUnknown] The name org.anbox was not provided by any .service files in the logs, it seems to run fine

concision commented 3 years ago

Resolved as of PR #65. Thank you @jc-lab for investigating and resolving this issue!