New issue
Advanced search Search tips

Issue 624791 link

Starred by 3 users

Issue metadata

Status: Verified
Owner:
Closed: Jun 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

[Android N] Incremental install crashes on launch

Project Member Reported by dgn@chromium.org, Jun 30 2016

Issue description

E/NativeInitializationController: Unable to load native library.
E/NativeInitializationController: org.chromium.base.library_loader.ProcessInitException
E/NativeInitializationController: 	at org.chromium.base.library_loader.LibraryLoader.loadAlreadyLocked(LibraryLoader.java:308)
E/NativeInitializationController: 	at org.chromium.base.library_loader.LibraryLoader.ensureInitialized(LibraryLoader.java:143)
E/NativeInitializationController: 	at org.chromium.chrome.browser.init.NativeInitializationController$1.run(NativeInitializationController.java:87)
E/NativeInitializationController: Caused by: java.lang.UnsatisfiedLinkError: dlopen failed: library "libbase.cr.so" not found
E/NativeInitializationController: 	at java.lang.Runtime.loadLibrary0(Runtime.java:977)
E/NativeInitializationController: 	at java.lang.System.loadLibrary(System.java:1530)
E/NativeInitializationController: 	at org.chromium.base.library_loader.LibraryLoader.loadAlreadyLocked(LibraryLoader.java:294)
E/NativeInitializationController: 	... 2 more

From master checkout, I ran

> rm -rf out_android_gn/Debug
> gn gen out_android_gn/Debug --args='target_os="android" symbol_level=1 use_goma=true is_component_build=true enable_incremental_javac=true disable_incremental_isolated_processes=true use_signing_keys=true is_clang=true '
> ninja -j2000 -l150 -C out_android_gn/Debug chrome_apk_incremental

(I also tried without the clang flag, it still happens)
 
Status: Started (was: Assigned)
I've figured out that this is because the library load order is wrong. It's trying to load captive_portal.cr before base.cr.

Library load order became more fragile with https://codereview.chromium.org/2082453003
Interestingly, I tested that non-incremental component mode still works, even with the libs in the wrong order.
Project Member

Comment 4 by bugdroid1@chromium.org, Jun 30 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/fb7accc611d326aaee424a64ab974e3c04abe918

commit fb7accc611d326aaee424a64ab974e3c04abe918
Author: agrieve <agrieve@chromium.org>
Date: Thu Jun 30 19:48:19 2016

Revert to sorting android libraries with readelf

We were using GN's ordering of libraries, but GN isn't actually
providing them in dependency order. This change adds a TODO to add this
feature to GN, and in the meantime uses readelf to determine library
dependency order (as we used to do).

BUG= 624791 

Review-Url: https://codereview.chromium.org/2111233002
Cr-Commit-Position: refs/heads/master@{#403257}

[modify] https://crrev.com/fb7accc611d326aaee424a64ab974e3c04abe918/build/android/gyp/write_ordered_libraries.py
[modify] https://crrev.com/fb7accc611d326aaee424a64ab974e3c04abe918/build/config/android/rules.gni

Status: Fixed (was: Started)

Comment 6 by dgn@chromium.org, Jul 1 2016

Status: Verified (was: Fixed)
Yes, works now, thanks! 
Cc: pkotw...@chromium.org pasko@chromium.org agrieve@chromium.org sullivan@chromium.org lanwei@chromium.org yfried...@chromium.org perezju@chromium.org
 Issue 623840  has been merged into this issue.
Issue 624008 has been merged into this issue.

Sign in to add a comment