The assert here[1] is hit, because network service tries to initialize ApplicationStatus in a utility process. This is because there is a usage of base::android::ApplicationStatusListener in net/ here[2]. 1. https://cs.chromium.org/chromium/src/base/android/java/src/org/chromium/base/ApplicationStatus.java?l=73&rcl=a91df97e284e497ecf1222b4ada5af66306718a5 2. https://cs.chromium.org/chromium/src/net/disk_cache/simple/simple_index.cc?l=183&rcl=a91df97e284e497ecf1222b4ada5af66306718a5
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/16acd1cbfadccc05fe68cec64526d788a2554fa2 commit 16acd1cbfadccc05fe68cec64526d788a2554fa2 Author: Clark DuVall <cduvall@chromium.org> Date: Fri Sep 21 00:54:58 2018 Fix crash when running NetworkService out of process on Android SimpleIndex uses an ApplicationStatusListener to know when to write the cache to disk. This is used in the network service, and when network service is run out of process, this causes a crash since ApplicationStatusListener should only be used from the main process. To fix this, I changed ApplicationStatusListener to have a SetCallback interface, that can then have an implementation in the network service. If the cache is being created in the network service, we can pass the network service implementation of ApplicationStatusListener. The NetworkServiceClient will then notify network service of status changes from the main process. Bug: 881572 Cq-Include-Trybots: luci.chromium.try:linux_mojo Change-Id: I1824e8e8c13f4294fd3a500545714c13a90db08b Reviewed-on: https://chromium-review.googlesource.com/1225606 Reviewed-by: Maks Orlovich <morlovich@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Tommy Nyquist <nyquist@chromium.org> Reviewed-by: John Abd-El-Malek <jam@chromium.org> Commit-Queue: Clark DuVall <cduvall@chromium.org> Cr-Commit-Position: refs/heads/master@{#593032} [modify] https://crrev.com/16acd1cbfadccc05fe68cec64526d788a2554fa2/base/android/application_status_listener.cc [modify] https://crrev.com/16acd1cbfadccc05fe68cec64526d788a2554fa2/base/android/application_status_listener.h [modify] https://crrev.com/16acd1cbfadccc05fe68cec64526d788a2554fa2/base/android/application_status_listener_unittest.cc [modify] https://crrev.com/16acd1cbfadccc05fe68cec64526d788a2554fa2/chrome/browser/android/ntp/content_suggestions_notifier_service.cc [modify] https://crrev.com/16acd1cbfadccc05fe68cec64526d788a2554fa2/chrome/browser/metrics/thread_watcher_android.cc [modify] https://crrev.com/16acd1cbfadccc05fe68cec64526d788a2554fa2/chrome/browser/offline_pages/android/load_termination_listener_impl.cc [modify] https://crrev.com/16acd1cbfadccc05fe68cec64526d788a2554fa2/components/data_reduction_proxy/core/browser/data_reduction_proxy_config_service_client.cc [modify] https://crrev.com/16acd1cbfadccc05fe68cec64526d788a2554fa2/components/data_use_measurement/core/data_use_measurement.cc [modify] https://crrev.com/16acd1cbfadccc05fe68cec64526d788a2554fa2/content/browser/memory/memory_monitor_android.cc [modify] https://crrev.com/16acd1cbfadccc05fe68cec64526d788a2554fa2/content/browser/network_service_browsertest.cc [modify] https://crrev.com/16acd1cbfadccc05fe68cec64526d788a2554fa2/content/browser/network_service_client.cc [modify] https://crrev.com/16acd1cbfadccc05fe68cec64526d788a2554fa2/content/browser/network_service_client.h [modify] https://crrev.com/16acd1cbfadccc05fe68cec64526d788a2554fa2/content/browser/renderer_host/compositor_impl_android.cc [modify] https://crrev.com/16acd1cbfadccc05fe68cec64526d788a2554fa2/content/browser/renderer_host/media/video_capture_manager.cc [modify] https://crrev.com/16acd1cbfadccc05fe68cec64526d788a2554fa2/net/disk_cache/disk_cache.cc [modify] https://crrev.com/16acd1cbfadccc05fe68cec64526d788a2554fa2/net/disk_cache/disk_cache.h [modify] https://crrev.com/16acd1cbfadccc05fe68cec64526d788a2554fa2/net/disk_cache/simple/simple_backend_impl.cc [modify] https://crrev.com/16acd1cbfadccc05fe68cec64526d788a2554fa2/net/disk_cache/simple/simple_backend_impl.h [modify] https://crrev.com/16acd1cbfadccc05fe68cec64526d788a2554fa2/net/disk_cache/simple/simple_index.cc [modify] https://crrev.com/16acd1cbfadccc05fe68cec64526d788a2554fa2/net/disk_cache/simple/simple_index.h [modify] https://crrev.com/16acd1cbfadccc05fe68cec64526d788a2554fa2/net/http/http_cache.cc [modify] https://crrev.com/16acd1cbfadccc05fe68cec64526d788a2554fa2/net/http/http_cache.h [modify] https://crrev.com/16acd1cbfadccc05fe68cec64526d788a2554fa2/net/url_request/url_request_context_builder.cc [modify] https://crrev.com/16acd1cbfadccc05fe68cec64526d788a2554fa2/net/url_request/url_request_context_builder.h [modify] https://crrev.com/16acd1cbfadccc05fe68cec64526d788a2554fa2/services/network/network_context.cc [modify] https://crrev.com/16acd1cbfadccc05fe68cec64526d788a2554fa2/services/network/network_context.h [modify] https://crrev.com/16acd1cbfadccc05fe68cec64526d788a2554fa2/services/network/network_service.cc [modify] https://crrev.com/16acd1cbfadccc05fe68cec64526d788a2554fa2/services/network/network_service.h [add] https://crrev.com/16acd1cbfadccc05fe68cec64526d788a2554fa2/services/network/public/cpp/network_param_android.typemap [modify] https://crrev.com/16acd1cbfadccc05fe68cec64526d788a2554fa2/services/network/public/cpp/network_param_mojom_traits.cc [modify] https://crrev.com/16acd1cbfadccc05fe68cec64526d788a2554fa2/services/network/public/cpp/network_param_mojom_traits.h [modify] https://crrev.com/16acd1cbfadccc05fe68cec64526d788a2554fa2/services/network/public/cpp/typemaps.gni [modify] https://crrev.com/16acd1cbfadccc05fe68cec64526d788a2554fa2/services/network/public/mojom/network_param.mojom [modify] https://crrev.com/16acd1cbfadccc05fe68cec64526d788a2554fa2/services/network/public/mojom/network_service.mojom
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/1e6e30b0e19a1d2d2db6e6b7184d26c741959d78 commit 1e6e30b0e19a1d2d2db6e6b7184d26c741959d78 Author: Clark DuVall <cduvall@chromium.org> Date: Fri Sep 21 20:59:43 2018 Enable network service out of process on Android Mojo bots Note: Many (all?) of the android_webview multiprocess_mode tests fail when running NS OOP. Bug: 881572 Change-Id: Icca5d99cbaa655153d7ae19eb9283dcb3e4c1946 Reviewed-on: https://chromium-review.googlesource.com/1238820 Commit-Queue: Clark DuVall <cduvall@chromium.org> Reviewed-by: John Abd-El-Malek <jam@chromium.org> Cr-Commit-Position: refs/heads/master@{#593329} [modify] https://crrev.com/1e6e30b0e19a1d2d2db6e6b7184d26c741959d78/testing/buildbot/chromium.fyi.json [modify] https://crrev.com/1e6e30b0e19a1d2d2db6e6b7184d26c741959d78/testing/buildbot/filters/mojo.fyi.network_chrome_public_test_apk.filter [modify] https://crrev.com/1e6e30b0e19a1d2d2db6e6b7184d26c741959d78/testing/buildbot/filters/mojo.fyi.network_webview_instrumentation_test_apk.filter [modify] https://crrev.com/1e6e30b0e19a1d2d2db6e6b7184d26c741959d78/testing/buildbot/test_suites.pyl
Comment 1 by cduvall@chromium.org
, Sep 6