New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 597596 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Mar 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 1
Type: Bug



Sign in to add a comment

Add android_cronet_tester to tools/mb/mb_config.pyl

Project Member Reported by xunji...@chromium.org, Mar 24 2016

Issue description

Following https://codereview.chromium.org/1750743002/, to make android_cronet_tester work, we need to add it to tools/mb/mb_config.pyl
Probably can duplicate the config of the current
chromium.android bots.

 
Owner: xunji...@chromium.org
Status: Assigned (was: Available)
Started a CL https://codereview.chromium.org/1832843002/. Not sure if it works, will send it to infra folks.
Project Member

Comment 2 by bugdroid1@chromium.org, Mar 24 2016

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

commit 2a56b36b8744bdf0ce95eadce89e14e55c5af971
Author: xunjieli <xunjieli@chromium.org>
Date: Thu Mar 24 18:15:25 2016

Add a mb config to android_cronet_tester trybot

BUG= 597596 

Review URL: https://codereview.chromium.org/1832843002

Cr-Commit-Position: refs/heads/master@{#383099}

[modify] https://crrev.com/2a56b36b8744bdf0ce95eadce89e14e55c5af971/tools/mb/mb_config.pyl

Current url: 
https://build.chromium.org/p/tryserver.chromium.android/builders/android_cronet_tester/builds/75/steps/Instrumentation%20test%20CronetTestInstrumentation/logs/stdio

It looks like the trybot is still not usable. I will take a look.

It is complaining that:

C   97.060s Main  [FAIL]
C   97.060s Main  java.lang.UnsatisfiedLinkError: Couldn't load cronet_tests from loader dalvik.system.PathClassLoader[DexPathList[[zip file "/system/framework/android.test.runner.jar", zip file "/data/app/org.chromium.net.tests-1.apk", zip file "/data/app/org.chromium.net-1.apk"],nativeLibraryDirectories=[/data/app-lib/org.chromium.net.tests-1, /data/app-lib/org.chromium.net-1, /vendor/lib, /system/lib]]]: findLibrary returned null
Cc: jbudorick@chromium.org martiniss@chromium.org
jbudorick@, martiniss@: do you know why the trybot is building libcronet_tests.cr.so instead of libcronet_tests.so (which is what other bots are building https://build.chromium.org/p/chromium.android/builders/Android%20Cronet%20Builder%20%28dbg%29/builds/1540/steps/compile/logs/stdio) ?
guessing it should be doing a static library build: https://code.google.com/p/chromium/codesearch#chromium/src/build/common.gypi&l=4785
(if you want libcronet_tests.so specifically)
That said, having the shared_library build fail also seems bad. I'll look into it later today.
Cc: dpranke@chromium.org
cc-ing dirk, since this might have something to do with mb?
this has to do with our mb_config entry for that trybot, not mb itself.
That bot is configured to be doing a static build:

https://code.google.com/p/chromium/codesearch?q=mb_config.pyl#chromium/src/tools/mb/mb_config.pyl&l=31
https://build.chromium.org/p/chromium.android/builders/Android%20Cronet%20Builder%20%28dbg%29/builds/1540/steps/generate_build_files/logs/stdio

The trybot is configured to be a shared build, however.

You should probably change the chromium.android bot.
Thanks, everyone! So android_cronet_tester is doing a shared build, while other bots like android_cronet_gyp_debug_static_bot is doing a static build.  But I don't really know understand why the instrumentation test would complain that the libcronet_test.so is not found on the shared build bot (android_cronet_tester). I will get back to this tomorrow and wait for jbudorick@ to get a chance to take a look. 
This is cronet-specific because of how cronet loads native libraries in CronetEngine :(

CronetTestFramework creates a CronetEngine.Builder that looks explicitly for cronet_tests (https://code.google.com/p/chromium/codesearch#chromium/src/components/cronet/android/test/src/org/chromium/net/CronetTestFramework.java&l=238). CronetEngine.Builder then tries to load that library, which it can't because the library is libcronet_test.cr.so instead of libcronet_test.so.

The quick solution here would be to switch android_cronet_tester to a static build, but  in the longer term the native library loading logic in cronet either needs to handle shared libraries better or should simply defer to LibraryLoader/NativeLibraries (https://code.google.com/p/chromium/codesearch#chromium/src/base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java and https://code.google.com/p/chromium/codesearch#chromium/src/base/android/java/templates/NativeLibraries.template&q=NativeLibraries.template)

Comment 13 by mef@chromium.org, Mar 25 2016

I thinks switching android_cronet_tester to a static build makes total sense as that's the way cronet is packaged (single native library libcronet.so) and used by embedders.
#13: CL doing is here: https://codereview.chromium.org/1838433002/
Project Member

Comment 15 by bugdroid1@chromium.org, Mar 25 2016

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

commit 348a13d830f6f7e3c3f73f97c0f7f206bc3763fa
Author: jbudorick <jbudorick@chromium.org>
Date: Fri Mar 25 20:33:59 2016

[cronet] Switch android_cronet_tester to static_library.

BUG= 597596 

Review URL: https://codereview.chromium.org/1838433002

Cr-Commit-Position: refs/heads/master@{#383344}

[modify] https://crrev.com/348a13d830f6f7e3c3f73f97c0f7f206bc3763fa/tools/mb/mb_config.pyl

Status: Fixed (was: Assigned)
Verified that android_cronet_tester is working as expected. Thanks, everyone.
Hooray! Glad everything is working now.

Sign in to add a comment