App runtime for chrome and NACL

124 views
Skip to first unread message

madana gopal

unread,
Jul 3, 2015, 9:01:20 PM7/3/15
to native-cli...@googlegroups.com
Hi Team,

I am simply trying to use the ARC NACL file (came from ARC welder/archon)  to be embedded in standalone HTML page (i.e not via extension) and trying to run a android application in linux desktop with chrome browser (after removing extension related calls). However i am getting the below error with NACL:

nacl_dyncode_map: mmap(0x1000000) failed with 22. Falling back to the slow path

This error is coming during mmap of libdvm.so. Errors looks as below:

W/libposix_translation_static: out/staging/src/posix_translation/file_wrap.cc:879, DANGER __wrap_mmap (addr=0x2db0000 length=1310720 prot=5 flags=18 fd=3 offset=65536: Invalid argument)

It looks mmap is failing with offset (not being multiple of page size) during mmap of dlvm .so file by NACL module. Is this error is anywhere related to not running android app(through ARC NACL ) via extensions?. Also, please clarify where ARC mandatorily requries to be invoked through extension. Please clarify. Thanks.

regards,
Madan

Elijah Taylor

unread,
Jul 9, 2015, 2:14:08 PM7/9/15
to native-cli...@googlegroups.com
Hi Madan,

I'd be curious to hear about what you're trying to do by running ARC outside of the chrome://extension environment.  It may be possible to satisfy your goals another way, but I think you will have many problems trying to get ARC to work outside of the extensions/app environment.


On Fri, Jul 3, 2015 at 6:01 PM, madana gopal <madanag...@gmail.com> wrote:
Hi Team,

I am simply trying to use the ARC NACL file (came from ARC welder/archon)  to be embedded in standalone HTML page (i.e not via extension) and trying to run a android application in linux desktop with chrome browser (after removing extension related calls). However i am getting the below error with NACL:

nacl_dyncode_map: mmap(0x1000000) failed with 22. Falling back to the slow path

This error is coming during mmap of libdvm.so. Errors looks as below:

W/libposix_translation_static: out/staging/src/posix_translation/file_wrap.cc:879, DANGER __wrap_mmap (addr=0x2db0000 length=1310720 prot=5 flags=18 fd=3 offset=65536: Invalid argument)

It looks mmap is failing with offset (not being multiple of page size) during mmap of dlvm .so file by NACL module. Is this error is anywhere related to not running android app(through ARC NACL ) via extensions?.

ARC takes advantage of a fast loading path for nexes loaded from chrome://extension URLs, but it has appropriate fallbacks for this (the "slow path" mentioned in the log).
 
Also, please clarify where ARC mandatorily requries to be invoked through extension. 

The requirements for running ARC through Chrome Apps are enforced by the APIs we use which are sometimes only available for Chrome Apps.  For instance, unlimited quota and full APIs for the HTML filesystem, full TCP/UDP network access, chrome.runtime and chrome.app APIs, etc.  There are many assumptions made for ARC that this environment and APIs exist across many layers of code, so I think this may not be possible from what is released.

-Elijah
 

madana gopal

unread,
Jul 10, 2015, 7:49:19 AM7/10/15
to native-cli...@googlegroups.com
Hi Ellijah,

Thanks for the details. Actually, we are trying to run android application in a chromium based browser (Chromium embedded framework)  that don't have any extension support as chrome.So, we are trying to use ARC along with static customized HTML page(having arguments to ARC harcoded say APK filename,enabling arc strace etc) that uses NACL to interact with ARC.  

Could you please tell the modules between which TCP and UDP sockets are being used here for communication?.

In other thread " CRX Filesystem,NACL and ARC ",i have told the problem we are facing currently, as /vendor/chromium/crx folder is not getting created and so apk is not picked from there. ARC is starting some native services, surface flinger. But it is not picking the APK file.

I thought, NACL is the mode for communication acting as interface between browser and ARC code, so necessary arguments are being passed to ARC layer to do it's work.So, i thought extension is only used as means for running multiple android apps at a time.But from your explanation, i understood some more things are present for it's need. But, it's feasible right to run without extension?. If possible, please suggest any way to try upon.

Also, ARC has not strict rules to run only when extenbsion is enabled, right?. Please clarify.

Regards,
Madan

Elijah Taylor

unread,
Jul 10, 2015, 1:40:12 PM7/10/15
to native-cli...@googlegroups.com
I think it would *technically* be possible to do this, but would require significant changes to ARC itself, and I don't think those changes would be possible by a third party at this point.
 

Also, ARC has not strict rules to run only when extenbsion is enabled, right?. Please clarify.

ARC does not have any specific checks to only run when extensions are enabled, but it depends heavily on the environment and APIs, so it can only really function properly with extension support.

Rather than modifying ARC, it might be easier to modify your chromium code to allow extension/app support.
 

Regards,
Madan

--
You received this message because you are subscribed to the Google Groups "Native-Client-Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to native-client-di...@googlegroups.com.
To post to this group, send email to native-cli...@googlegroups.com.
Visit this group at http://groups.google.com/group/native-client-discuss.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages