Crash in android webview_zygote32 causing all applications using WebView to crash

686 views
Skip to first unread message

jyotsna srivastava

unread,
Jan 29, 2020, 10:51:50 AM1/29/20
to android-platform
Hi,

I am facing an issue where after using an app (NowForce app) for few days, app crashes and also all other applications like Chrome which uses web view crashes.

The issue is only there when the language is set to Hebrew(Right to left). Issue is not there when language set is English.

Please find the logs below :
01-27 10:43:36.936 10485 10485 F DEBUG   : pid: 10485, tid: 10485, name: /system/bin/webview_zygote32  >>> main <<<
01-27 10:43:36.936 10485 10485 F DEBUG   : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
01-27 10:43:36.947 10485 10485 F DEBUG   : Abort message: 'Unable to find static method dynamicPolicyCallbackFromNative'
01-27 10:43:36.947 10485 10485 F DEBUG   :     r0 00000000  r1 000028f5  r2 00000006  r3 00000008
01-27 10:43:36.947 10485 10485 F DEBUG   :     r4 000028f5  r5 000028f5  r6 ffa71b54  r7 0000010c
01-27 10:43:36.947 10485 10485 F DEBUG   :     r8 00000000  r9 af8f3318  sl ffa7207c  fp ffa720ec
01-27 10:43:36.947 10485 10485 F DEBUG   :     ip ffa720f8  sp ffa71b40  lr f23a4c09  pc f239e6aa  cpsr 200f0030
01-27 10:43:36.951 10485 10485 F DEBUG   :
01-27 10:43:36.951 10485 10485 F DEBUG   : backtrace:
01-27 10:43:36.951 10485 10485 F DEBUG   :     #00 pc 0001a6aa  /system/lib/libc.so (abort+63)
01-27 10:43:36.951 10485 10485 F DEBUG   :     #01 pc 0000655d  /system/lib/liblog.so (__android_log_assert+156)
01-27 10:43:36.951 10485 10485 F DEBUG   :     #02 pc 000d9743  /system/lib/libandroid_runtime.so (register_android_media_AudioSystem(_JNIEnv*)+4062)
01-27 10:43:36.951 10485 10485 F DEBUG   :     #03 pc 0006e231  /system/lib/libandroid_runtime.so (android::AndroidRuntime::startReg(_JNIEnv*)+64)
01-27 10:43:36.951 10485 10485 F DEBUG   :     #04 pc 0006df6d  /system/lib/libandroid_runtime.so (android::AndroidRuntime::start(char const*, android::Vector<android::String8> const&, bool)+252)
01-27 10:43:36.951 10485 10485 F DEBUG   :     #05 pc 000012bb  /system/bin/webview_zygote32
01-27 10:43:36.951 10485 10485 F DEBUG   :     #06 pc 000797d1  /system/lib/libc.so (__libc_init+48)
01-27 10:43:36.951 10485 10485 F DEBUG   :     #07 pc 00001160  /system/bin/webview_zygote32

Also, whenever any app using webview is started, following Exceptions occur:
01-27 12:26:54.511  1000  1708  3211 E WebViewZygote: Timed out waiting for webview_zygote32
01-27 12:26:54.515  1000  1708  3211 E ActivityManager: Failure starting process com.android.chrome:sandboxed_process0
01-27 12:26:54.515  1000  1708  3211 E ActivityManager: java.lang.NullPointerException: Attempt to invoke virtual method 'android.os.Process$ProcessStartResult android.os.ZygoteProcess.start(java.lang.String, java.lang.String, int, int, int[], int, int, int, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String[])' on a null object reference
01-27 12:26:54.515  1000  1708  3211 E ActivityManager:     at android.os.Process.startWebView(Process.java:479)
01-27 12:26:54.515  1000  1708  3211 E ActivityManager:     at com.android.server.am.ActivityManagerService.startProcessLocked(ActivityManagerService.java:4025)
01-27 12:26:54.515  1000  1708  3211 E ActivityManager:     at com.android.server.am.ActivityManagerService.startProcessLocked(ActivityManagerService.java:3852)
01-27 12:26:54.515  1000  1708  3211 E ActivityManager:     at com.android.server.am.ActivityManagerService.startProcessLocked(ActivityManagerService.java:3738)
01-27 12:26:54.515  1000  1708  3211 E ActivityManager:     at com.android.server.am.ActiveServices.bringUpServiceLocked(ActiveServices.java:2216)
01-27 12:26:54.515  1000  1708  3211 E ActivityManager:     at com.android.server.am.ActiveServices.bindServiceLocked(ActiveServices.java:1444)
01-27 12:26:54.515  1000  1708  3211 E ActivityManager:     at com.android.server.am.ActivityManagerService.bindService(ActivityManagerService.java:18742)
01-27 12:26:54.515  1000  1708  3211 E ActivityManager:     at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:584)
01-27 12:26:54.515  1000  1708  3211 E ActivityManager:     at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:3003)
01-27 12:26:54.515  1000  1708  3211 E ActivityManager:     at android.os.Binder.execTransact(Binder.java:697)
01-27 12:26:54.515  1000  1708  3211 I ActivityManager: Force stopping com.android.chrome appid=99012 user=0: start failure

Any help is appreciated.

Thanks
Jyotsna

Satish Patel

unread,
Jan 30, 2020, 11:23:37 AM1/30/20
to android-...@googlegroups.com
Hi,

Which version of Android are you using? Looks like your app is running 32 bit.

Anyways, you can also try installing latest version of webview and see if issues still exist with that.

--
satish

--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-platfo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-platform/91abe915-0c68-40d6-b990-85d2e6f1f075%40googlegroups.com.


--
Regards,
satish patel

arun sandip panigrahi

unread,
Jan 31, 2020, 12:57:02 PM1/31/20
to android-platform
Hi Satish,

I have Android Oreo OS in my device with the latest WebView v79.0.3945.136 and still getting the same error when I am changing my device language from English US to Norsk Bokmal (Norge).


Regards
Sandip
To unsubscribe from this group and stop receiving emails from it, send an email to android-...@googlegroups.com.


--
Regards,
satish patel

Satish Patel

unread,
Feb 11, 2020, 2:09:29 PM2/11/20
to android-...@googlegroups.com
Hi,

Missed this thread to reply..
Anyways,
from the crash log - it seems "dynamicPolicyCallbackFromNative" method is not present. Could you cross check with the Android source you are using?
File name is : AudioSystem.java (where the method is defined)

-
satish

To unsubscribe from this group and stop receiving emails from it, send an email to android-platfo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-platform/c4709806-8cc4-4bcd-b44a-fd7809736a1b%40googlegroups.com.


--
Regards,
satish patel

jyotsna srivastava

unread,
Feb 12, 2020, 10:33:38 AM2/12/20
to android-platform
Hi Satish,

We checked our source code, method is defined.
Also, we are not getting error when device language is set as English/French/Spanish.
As of now, we have observed this issue with Hebrew, Norsk Bokmal/Danish.

We have also observed that issue is due to Sepolicy.
We tried to set sepolicies in permissive mode and observed that crash was not observed.

Following are the avc denials observed:
02-12 11:01:16.829  4474  4474 I auditd  : type=1400 audit(0.0:95): avc: denied { read open } for comm="main" path="/system/bin/idmap" dev="dm-0" ino=902 scontext=u:r:webview_zygote:s0 tcontext=u:object_r:idmap_exec:s0 tclass=file permissive=0
02-12 11:01:16.829  4474  4474 W main    : type=1400 audit(0.0:95): avc: denied { read open } for path="/system/bin/idmap" dev="dm-0" ino=902 scontext=u:r:webview_zygote:s0 tcontext=u:object_r:idmap_exec:s0 tclass=file permissive=0
02-12 11:01:16.899  4235  4235 I auditd  : type=1400 audit(0.0:96): avc: denied { open } for comm="main" path="/system/usr/icu" dev="dm-0" ino=4191 scontext=u:r:webview_zygote:s0 tcontext=u:object_r:system_file:s0 tclass=dir permissive=0

Some other denials also in the context of webview_zygote is observed.
We tried to add the missing policies in system/sepolicies folder for trying purpose and observed that none of the sepolicies is being reflected on the device. Even after adding the policies the denials remain the same.

It will be of great help if we get to know why addition of policies are not getting reflected.

Thanks
Jyotsna


--
Regards,
satish patel

Satish Patel

unread,
Feb 13, 2020, 10:03:00 AM2/13/20
to android-...@googlegroups.com
On Wed, Feb 12, 2020 at 9:02 PM jyotsna srivastava <jyotsnasr...@gmail.com> wrote:
Hi Satish,

We checked our source code, method is defined.
Also, we are not getting error when device language is set as English/French/Spanish.
As of now, we have observed this issue with Hebrew, Norsk Bokmal/Danish.

We have also observed that issue is due to Sepolicy.
We tried to set sepolicies in permissive mode and observed that crash was not observed.

Following are the avc denials observed:
02-12 11:01:16.829  4474  4474 I auditd  : type=1400 audit(0.0:95): avc: denied { read open } for comm="main" path="/system/bin/idmap" dev="dm-0" ino=902 scontext=u:r:webview_zygote:s0 tcontext=u:object_r:idmap_exec:s0 tclass=file permissive=0
02-12 11:01:16.829  4474  4474 W main    : type=1400 audit(0.0:95): avc: denied { read open } for path="/system/bin/idmap" dev="dm-0" ino=902 scontext=u:r:webview_zygote:s0 tcontext=u:object_r:idmap_exec:s0 tclass=file permissive=0
02-12 11:01:16.899  4235  4235 I auditd  : type=1400 audit(0.0:96): avc: denied { open } for comm="main" path="/system/usr/icu" dev="dm-0" ino=4191 scontext=u:r:webview_zygote:s0 tcontext=u:object_r:system_file:s0 tclass=dir permissive=0

Some other denials also in the context of webview_zygote is observed.
We tried to add the missing policies in system/sepolicies folder for trying purpose and observed that none of the sepolicies is being reflected on the device. Even after adding the policies the denials remain the same.
The best way I follow to fix the sepolicy is to use audit2allow
 
Let me know if this does not work for you either

To unsubscribe from this group and stop receiving emails from it, send an email to android-platfo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-platform/7ec263b6-286b-401d-a9b8-026d79947174%40googlegroups.com.


--
Regards,
satish patel

jyotsna srivastava

unread,
Feb 16, 2020, 5:09:10 PM2/16/20
to android-platform
Hi Satish,

We have generated the sepolicies from audit2allow itself with all the denials that we were observing.

We had observed few denials in system_server, audioserver also along with the denials from webview_zygote.
Just for testing purpose we had added all the sepoilices irrespective of being relevant for the particular issue. We observed from the logs that, after adding all policies, denials were not seen in logs for system_server and audioserver. But still webview_zygote denials are observed.

We had added the following policies:
allow webview_zygote idmap_exec:file execute;
allow webview_zygote overlay_prop:file read;
allow webview_zygote resourcecache_data_file:dir search;
allow webview_zygote system_file:dir read;
allow webview_zygote tombstoned_crash_socket:sock_file write;

We have tried to make changes to webview_zygote.te file in system/sepolicy/public, system/sepolicy/private, system/sepolicy/prebuilts/api/26.0/private/ and also we tried o create a new file in system/sepolicy/vendor. Changes from none of these files are being reflected on the device and we are still getting the same avc denial.

Thanks
Jyotsna

Satish Patel

unread,
Feb 18, 2020, 10:43:36 AM2/18/20
to android-...@googlegroups.com
On Mon, Feb 17, 2020 at 3:38 AM jyotsna srivastava <jyotsnasr...@gmail.com> wrote:
Hi Satish,

We have generated the sepolicies from audit2allow itself with all the denials that we were observing.

We had observed few denials in system_server, audioserver also along with the denials from webview_zygote.
Just for testing purpose we had added all the sepoilices irrespective of being relevant for the particular issue. We observed from the logs that, after adding all policies, denials were not seen in logs for system_server and audioserver. But still webview_zygote denials are observed.

We had added the following policies:
allow webview_zygote idmap_exec:file execute;
allow webview_zygote overlay_prop:file read;
allow webview_zygote resourcecache_data_file:dir search;
allow webview_zygote system_file:dir read;
allow webview_zygote tombstoned_crash_socket:sock_file write;
Looks like you have not given all permission for system file.. It needs read & open ( from above logs it looks like only read permission is there). if you re-run the audit2allow it will show options to fix it. 
Note: audit2allow will not show exact fix in oneshot. You might need to re-run once you fix first denial and see if still more denials are there to fix the same. So it might need few iteration of fix - flash - running the android - again audit2allow :) 

We have tried to make changes to webview_zygote.te file in system/sepolicy/public, system/sepolicy/private, system/sepolicy/prebuilts/api/26.0/private/ and also we tried o create a new file in system/sepolicy/vendor. Changes from none of these files are being reflected on the device and we are still getting the same avc denial.

Thanks
Jyotsna

--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-platfo...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages