Skip to content
This repository has been archived by the owner on Feb 13, 2024. It is now read-only.

Enable Installation on more Distributions #3

Open
ghost opened this issue Apr 11, 2017 · 45 comments
Open

Enable Installation on more Distributions #3

ghost opened this issue Apr 11, 2017 · 45 comments

Comments

@ghost
Copy link

ghost commented Apr 11, 2017

Make sure you are running the latest version of Anbox before reporting an issue.

Anbox release (anbox version) and system info (anbox system-info):
latest

Description of the problem:
Anbox is just runnning (if it is running) on Ubuntu. Make it available on more Distris!

Expected:

Additional info:
I could help, making it available for Arch.

@morphis
Copy link
Member

morphis commented Apr 11, 2017

@ovalmartini Sounds good. I think the first step is to get things in the anbox-installer ajusted and then find a way to deploy the kernel modules on Arch.

@mac-linux-free
Copy link

arch has dkms also

@oleid
Copy link

oleid commented Apr 12, 2017

Please have a look on #29 considering that request.

@vamur
Copy link

vamur commented Apr 13, 2017

Looks like Anbox requires user namespaces and Archlinux kernel lacks those, so session manager can only run as root.

@abluelark
Copy link

abluelark commented Apr 13, 2017

Here's how I got it running on arch. Thanks to irtimmer for the AUR packages.

First, install the linux-headers and dkms packages
sudo pacman -S linux-headers dkms

Then install things from the AUR
pacaur -S anbox-git anbox-modules-dkms-git anbox-image
be patient...

Then you need to reboot. Make sure your system is up to date (pacman -Syu).

Then modprobe some things,,,
sudo modprobe ashmem_linux
sudo modprobe binder_linux

Then enable the container service.
sudo systemctl enable anbox-container-manager.service

After that, you should be good to go! Start anbox from the terminal with anbox session-manager or use the .desktop file.

edit: sometimes I have to start anbox session-manager in a terminal, then launch the .desktop file.
Proof: http://i.imgur.com/Lyqy5fF.png

@mac-linux-free
Copy link

nice work...need just arch openrc script

@subjectdenied
Copy link

@artex-files
also for me the session-manager crashes when not using --gles-driver=host

@atondwal
Copy link

atondwal commented Apr 14, 2017

hmm, I'm getting a segfault and @subjectdenied 's workaround doesn't seem to be working for me (on Arch, integrated graphics)

atondwal@hertz|~
) ANBOX_LOG_LEVEL=debug anbox session-manager                                                          --- COMMAND ---
[DD 2017-04-14 10:07:14] [gl_renderer_server.cpp:82@GLRendererServer] Using GLES-to-GL translator for rendering
[DD 2017-04-14 10:07:14] [Renderer.cpp:113@initialize] EGL doesn't support surfaceless context
[DD 2017-04-14 10:07:14] [Renderer.cpp:249@initialize] Successfully initialized EGL
[1]    7648 segmentation fault (core dumped)  ANBOX_LOG_LEVEL=debug anbox session-manager
-> [139]
atondwal@hertz|~
) ANBOX_LOG_LEVEL=debug anbox session-manager --gles-driver=host
[EE 2017-04-14 10:07:24] [Renderer.cpp:105@initialize] Failed to initialize EGL
[1]    8002 segmentation fault (core dumped)  ANBOX_LOG_LEVEL=debug anbox session-manager --gles-driver=host
-> [139]
atondwal@hertz|~
) ANBOX_LOG_LEVEL=debug anbox system-info
[1]    9412 segmentation fault (core dumped)  ANBOX_LOG_LEVEL=debug anbox system-info
-> [139]

@koldbyte
Copy link

I'm getting the segfault as well.
On first reboot, Systemd container service was not running. I had to manually start from the Systemd KCM. On further boots, service started automatically.

$ ANBOX_LOG_LEVEL=debug anbox session-manager
[DD 2017-04-14 11:35:20] [gl_renderer_server.cpp:82@GLRendererServer] Using GLES-to-GL translator for rendering
[DD 2017-04-14 11:35:20] [Renderer.cpp:113@initialize] EGL doesn't support surfaceless context
[DD 2017-04-14 11:35:20] [Renderer.cpp:249@initialize] Successfully initialized EGL
Segmentation fault (core dumped)

Is there any way to get the details of the core dump?

@mateusfccp
Copy link

I'm also getting a segfault:

$ ANBOX_LOG_LEVEL=debug anbox session-manager
[II 2017-04-14 12:13:57] [session_manager.cpp:126@operator()] Detected properietary nvidia driver; forcing use of the host EGL driver.
[EE 2017-04-14 12:13:58] [Renderer.cpp:105@initialize] Failed to initialize EGL
Falha de segmentação (imagem do núcleo gravada)

@shameempk
Copy link

I am trying to run anbox on arch.

Started container manager using:
sudo ANBOX_LOG_LEVEL=debug anbox container-manager --privilaged
Output:

[DD 2017-04-14 13:02:03] [service.cpp:49@create] Everything setup. Waiting for incoming connections.
[DD 2017-04-14 13:02:17] [service.cpp:76@new_client] Got connection from pid 1929
[DD 2017-04-14 13:02:18] [lxc_container.cpp:90@start] Containers are stored in /var/lib/anbox/containers
[DD 2017-04-14 13:02:18] [lxc_container.cpp:127@start] Using rootfs path /var/lib/anbox/rootfs
[DD 2017-04-14 13:03:01] [service.cpp:76@new_client] Got connection from pid 1965
[DD 2017-04-14 13:03:01] [lxc_container.cpp:90@start] Containers are stored in /var/lib/anbox/containers
[DD 2017-04-14 13:03:01] [lxc_container.cpp:127@start] Using rootfs path /var/lib/anbox/rootfs

Then started session manager:
ANBOX_LOG_LEVEL=debug anbox session-manager
Output:

[DD 2017-04-14 13:03:01] [gl_renderer_server.cpp:82@GLRendererServer] Using GLES-to-GL translator for rendering
[DD 2017-04-14 13:03:01] [Renderer.cpp:113@initialize] EGL doesn't support surfaceless context
[DD 2017-04-14 13:03:01] [Renderer.cpp:249@initialize] Successfully initialized EGL
[EE 2017-04-14 13:03:07] [client.cpp:49@start] Failed to start container: Failed to start container: Failed to start container
[WW 2017-04-14 13:03:07] [session_manager.cpp:140@operator()] Lost connection to container manager, terminating.
[EE 2017-04-14 13:03:07] [daemon.cpp:58@Run] Container is not running
[WW 2017-04-14 13:03:07] [session_manager.cpp:140@operator()] Lost connection to container manager, terminating.
[1] 1965 segmentation fault (core dumped) ANBOX_LOG_LEVEL=debug anbox session-manager

Then tried launching anbox using:
ANBOX_LOG_LEVEL=debug anbox launch --package=org.anbox.appmgr --component=org.anbox.appmgr.AppViewActivity
Output:

[DD 2017-04-14 13:00:49] [launch.cpp:96@operator()] Android hasn't fully booted yet. Waiting a bit..
[WW 2017-04-14 13:01:19] [launch.cpp:115@operator()] Stop waiting as we're already waiting for too long. Something is wrong
[WW 2017-04-14 13:01:19] [launch.cpp:116@operator()] with your setup and the container may have failed to boot.

As expected it didn't launch because session manager had a segfault. A different segfault here.

@flipflop97
Copy link

I seem to get the same error as @mateusfccp but with Intel graphics instead of nvidia.

> anbox --gles-driver=host session-manager
[EE 2017-04-14 13:16:32] [Renderer.cpp:105@initialize] Failed to initialize EGL
fish: “anbox --gles-driver=host sessio…” terminated by signal SIGSEGV (Address boundary error)

Switching between xorg or wayland doesn't seem to matter.

@mateusfccp
Copy link

@flipflop97 I'm actually using Bumblebee. It should be running with Intel, as I didn't used primusrun in front.

@flipflop97
Copy link

@mateusfccp Oh, then we're having the same problem, I also have hybrid graphics with bumblebee. Maybe it's detecting the nvidia card and (tries) forcing to use nvidia drivers while actually starting it with intel graphics.

@mateusfccp
Copy link

@flipflop97 I also though on it. Using primusrun on front of anbox don't work. Is there a way to force Intel? Maybe compiling the kernel without nvidia dkms.

@Zestar-77
Copy link

using the flag --gles-driver=host seems to fix the segfault issue. (Thanks to subjectdenied over on the AUR page.)

@subjectdenied
Copy link

anyone has networking available? you can test it in webview app in anbox

@oxygala
Copy link

oxygala commented Apr 14, 2017

@subjectdenied I don't have it either.

@koldbyte
Copy link

I made some progress.
My Current setup: Manjaro KDE with kernel 4.9.20-1-MANJARO
Using Bumblebee with hybrid graphics
Make sure anbox-container-manager.service running in Systemd
Also, you must be able to run primusrun glxgears

I ran the following command to start session manager:

$ ANBOX_LOG_LEVEL=debug primusrun anbox session-manager
[DD 2017-04-14 17:47:35] [gl_renderer_server.cpp:82@GLRendererServer] Using GLES-to-GL translator for rendering
[DD 2017-04-14 17:47:35] [Renderer.cpp:113@initialize] EGL doesn't support surfaceless context
[DD 2017-04-14 17:47:35] [Renderer.cpp:249@initialize] Successfully initialized EGL
[DD 2017-04-14 17:47:43] [session_manager.cpp:208@operator()] Android successfully booted

Note that i was not able to use optirun and its throwing the same segfault as earlier when not using optirun or primusrun.

Afterwards, I tried launching applications like Clock, Gallery etc from the menu but it appeared for a second with garbage displayed in the window.
I tried running Anbox from menu as well, but it got hanged.

@mac-linux-free
Copy link

I also use Manjaro KDE but the more free OpenRC Version. I need the openrc script to test because I have bumblebee, too.

@koldbyte
Copy link

@mac-linux-free I don't think you would require any init scripts.

Try running these separately:
/usr/bin/anbox container-manager --privileged

@ghost
Copy link
Author

ghost commented Apr 15, 2017

DKMS make.log for anbox-modules-ashmem-466 for kernel 4.10.9-zen-nightglare-lizen-g2589ab7cf9c6-dirty (x86_64)
Sat Apr 15 06:17:31 IST 2017
make -C /lib/modules/4.10.9-zen-nightglare-lizen-g2589ab7cf9c6-dirty/build V=0 M=$PWD
make[1]: Entering directory '/usr/src/linux-4.10.9-zen-nightglare-lizen-g2589ab7cf9c6-dirty'
  LD      /var/lib/dkms/anbox-modules-ashmem/466/build/built-in.o
make[2]: *** No rule to make target '/var/lib/dkms/anbox-modules-ashmem/466/build/deps.o', needed by '/var/lib/dkms/anbox-modules-ashmem/466/build/ashmem_linux.o'.  Stop.
make[1]: *** [Makefile:1500: _module_/var/lib/dkms/anbox-modules-ashmem/466/build] Error 2
make[1]: Leaving directory '/usr/src/linux-4.10.9-zen-nightglare-lizen-g2589ab7cf9c6-dirty'
make: *** [Makefile:8: all] Error 2

Am I the only one still stuck? 😞

@ghost
Copy link
Author

ghost commented Apr 15, 2017

DKMS make.log for anbox-modules-ashmem-466 for kernel 4.10.9-zen-nightglare-lizen-g2589ab7cf9c6-dirty (x86_64)
Sat Apr 15 20:07:28 IST 2017
make -C /lib/modules/4.10.9-zen-nightglare-lizen-g2589ab7cf9c6-dirty/build V=0 M=$PWD
make[1]: Entering directory '/usr/src/linux-4.10.9-zen-nightglare-lizen-g2589ab7cf9c6-dirty'
LD /var/lib/dkms/anbox-modules-ashmem/466/build/built-in.o
make[2]: *** No rule to make target '/var/lib/dkms/anbox-modules-ashmem/466/build/deps.o', needed by '/var/lib/dkms/anbox-modules-ashmem/466/build/ashmem_linux.o'. Stop.
make[1]: *** [Makefile:1500: _module_/var/lib/dkms/anbox-modules-ashmem/466/build] Error 2
make[1]: Leaving directory '/usr/src/linux-4.10.9-zen-nightglare-lizen-g2589ab7cf9c6-dirty'
make: *** [Makefile:8: all] Error 2

Am i really the only one facing this issue? Please Help. :(

@Admicos
Copy link

Admicos commented Apr 15, 2017

Using --gles-driver=host, anbox doesn't show any windows.

Log:

[DD 2017-04-15 20:38:30] [Renderer.cpp:166@initialize] Using a surfaceless EGL context
[DD 2017-04-15 20:38:30] [Renderer.cpp:249@initialize] Successfully initialized EGL
libEGL warning: FIXME: egl/x11 doesn't support front buffer rendering.
libEGL warning: FIXME: egl/x11 doesn't support front buffer rendering.
libEGL warning: FIXME: egl/x11 doesn't support front buffer rendering.
libEGL warning: FIXME: egl/x11 doesn't support front buffer rendering.
[DD 2017-04-15 20:38:44] [session_manager.cpp:208@operator()] Android successfully booted
libEGL warning: FIXME: egl/x11 doesn't support front buffer rendering.
libEGL warning: FIXME: egl/x11 doesn't support front buffer rendering.
libEGL warning: FIXME: egl/x11 doesn't support front buffer rendering.
libEGL warning: FIXME: egl/x11 doesn't support front buffer rendering.

@Zestar-77
Copy link

when running with --gles-driver=host, run anbox session-manager elsewhere to actually open the session manager.

@Admicos
Copy link

Admicos commented Apr 16, 2017

when running with --gles-driver=host, run anbox session-manager elsewhere to actually open the session manager.

Just running anbox session-manager doesn't work, but running the .desktop file does.

gameltb pushed a commit to gameltb/anbox that referenced this issue Sep 16, 2019
gameltb pushed a commit to gameltb/anbox that referenced this issue Sep 16, 2019
Amit Pundir and Youling in parallel reported crashes with recent
mainline kernels running Android:

  F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
  F DEBUG   : Build fingerprint: 'Android/db410c32_only/db410c32_only:Q/OC-MR1/102:userdebug/test-key
  F DEBUG   : Revision: '0'
  F DEBUG   : ABI: 'arm'
  F DEBUG   : pid: 2261, tid: 2261, name: zygote  >>> zygote <<<
  F DEBUG   : signal 7 (SIGBUS), code 2 (BUS_ADRERR), fault addr 0xec00008
  ... <snip> ...
  F DEBUG   : backtrace:
  F DEBUG   :     #00 pc 00001c04  /system/lib/libc.so (memset+48)
  F DEBUG   :     anbox#1 pc 0010c513  /system/lib/libart.so (create_mspace_with_base+82)
  F DEBUG   :     anbox#2 pc 0015c601  /system/lib/libart.so (art::gc::space::DlMallocSpace::CreateMspace(void*, unsigned int, unsigned int)+40)
  F DEBUG   :     anbox#3 pc 0015c3ed  /system/lib/libart.so (art::gc::space::DlMallocSpace::CreateFromMemMap(art::MemMap*, std::__1::basic_string<char, std::__ 1::char_traits<char>, std::__1::allocator<char>> const&, unsigned int, unsigned int, unsigned int, unsigned int, bool)+36)
  ...

This was bisected back to commit bfd40eaff5ab ("mm: fix
vma_is_anonymous() false-positives").

create_mspace_with_base() in the trace above, utilizes ashmem, and with
ashmem, for shared mappings we use shmem_zero_setup(), which sets the
vma->vm_ops to &shmem_vm_ops.  But for private ashmem mappings nothing
sets the vma->vm_ops.

Looking at the problematic patch, it seems to add a requirement that one
call vma_set_anonymous() on a vma, otherwise the dummy_vm_ops will be
used.  Using the dummy_vm_ops seem to triggger SIGBUS when traversing
unmapped pages.

Thus, this patch adds a call to vma_set_anonymous() for ashmem private
mappings and seems to avoid the reported problem.

Fixes: bfd40eaff5ab ("mm: fix vma_is_anonymous() false-positives")
Cc: Kirill Shutemov <kirill.shutemov@linux.intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Hugh Dickins <hughd@google.com>
Cc: Joel Fernandes <joelaf@google.com>
Cc: Colin Cross <ccross@google.com>
Cc: Matthew Wilcox <willy@infradead.org>
Reported-by: Amit Pundir <amit.pundir@linaro.org>
Reported-by: Youling 257 <youling257@gmail.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests