Android 7本机崩溃:libc.so tgkill [英] Android 7 Native Crash: libc.so tgkill

查看:931
本文介绍了Android 7本机崩溃:libc.so tgkill的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看到此本地崩溃与以下堆栈跟踪.

I'm seeing this native crash with the following stack trace.

这发生在Android 7.0及更高版本中;仅7.1.该应用程序已投入生产多年,但没有添加任何新内容,但是随着更多设备更新为Nougat,这种崩溃现在经常发生,并且正变得令人讨厌.

This happens in Android 7.0 & 7.1 only. Nothing new has been added to the app, which has been in production for a few years, but with more devices being updated to Nougat this crash happens frequently now and is becoming a nuisance.

任何建议将不胜感激.

native: pc 000000000007a6c4  /system/lib64/libc.so (tgkill+8)
  native: pc 0000000000077920  /system/lib64/libc.so (pthread_kill+64)
  native: pc 000000000002538c  /system/lib64/libc.so (raise+24)
  native: pc 000000000001d24c  /system/lib64/libc.so (abort+52)
  native: pc 000000000001225c  /system/lib64/libcutils.so (__android_log_assert+224)
  native: pc 00000000000610e0  /system/lib64/libhwui.so
  native: pc 000000000003908c  /system/lib64/libhwui.so
  native: pc 000000000003609c  /system/lib64/libhwui.so
  native: pc 000000000003b4fc  /system/lib64/libhwui.so
  native: pc 000000000003c520  /system/lib64/libhwui.so
  native: pc 000000000003e694  /system/lib64/libhwui.so (_ZN7android10uirenderer12renderthread12RenderThread10threadLoopEv+152)
  native: pc 00000000000127f0  /system/lib64/libutils.so (_ZN7android6Thread11_threadLoopEPv+336)
  native: pc 00000000000a50b0  /system/lib64/libandroid_runtime.so (_ZN7android14AndroidRuntime15javaThreadShellEPv+116)
  native: pc 00000000000770f4  /system/lib64/libc.so (_ZL15__pthread_startPv+204)
  native: pc 000000000001e7d0  /system/lib64/libc.so (__start_thread+16)

以下是受影响的设备的列表:

Here's a list of devices that are affected:

更新7/18:

仍然无法找到根源,因此我决定购买出现次数最多且价格合理的设备,结果发现它是带有Android 7.0的Samsung Galaxy J3 2017版本.不幸的是我仍然无法重现崩溃.

Still unable to get to the root of this, so I decided to purchase a device which had most occurrences and was reasonably priced, which turned out to be Samsung Galaxy J3 2017 version with Android 7.0. Unfortunately I am still unable to reproduce the crash.

我还在生产中对该应用程序进行了一些内存使用方面的改进,但是崩溃仍在发生.

I've also made some memory usage improvements to the app in production, but the crash is still happening.

从所有评论和我自己的研究来看,它似乎与动态链接的NDK有关,但是我没有使用它,因此很难确定是否有任何依赖项.

From all the comments and my own research it seems to be related to dynamically linked NDKs, but I'm not using any and its hard to find out if any of the dependencies do.

我想分享我的依赖关系,如果其他面临相同问题的人使用相同的依赖关系中的一个可以召集,那就太好了-也许我们可以这样找出罪魁祸首.

I would like to share my dependencies, it would be great if other folks facing the same issue could call out if they are using one of the same dependencies - perhaps we can spot the culprit this way.

// App Compat
    compile 'com.android.support:support-v4:23.0.1'
    compile 'com.android.support:appcompat-v7:23.0.1'
    compile 'com.android.support:cardview-v7:23.0.1'
    compile 'com.android.support:recyclerview-v7:23.0.1'

    // Play Services
    compile 'com.google.android.gms:play-services-location:8.3.0'
    compile 'com.google.android.gms:play-services-maps:8.3.0'
    compile 'com.google.android.gms:play-services-analytics:8.3.0'
    compile 'com.google.android.gms:play-services-appindexing:8.3.0'
    compile 'com.google.android.gms:play-services-ads:8.3.0'

    // Misc Libraries
    compile 'fr.avianey.com.viewpagerindicator:library:2.4.1@aar'
    compile files('app/libs/htmlcleaner-2.7.jar')
    compile files('app/libs/protobuf-java-2.6.0.jar')
    compile files('app/libs/nineoldandroids-2.4.0.jar')

    // Fabric
    compile('com.twitter.sdk.android:twitter:1.13.0@aar') { transitive = true; }
    compile('com.crashlytics.sdk.android:crashlytics:2.5.5@aar') { transitive = true; }

对于面临相同崩溃的人们,如果您正在使用这些依赖项/版本中的任何一个,请在评论中做出回应.也许我们可以挑出问题的依存关系.

For folks facing the same crash, please respond in comments if you are using any of these dependencies / versions. Maybe we can single out the problem dependency.

推荐答案

查看您提供的转储会提供一些线索:

Looking at the dump you provided gives some clues:

_ZN7android10uirenderer12renderthread12RenderThread10threadLoopEv

这表明UI线程中发生了错误.

This indicates that the error occurred in the UI thread.

libhwui.so x 6

这表明这是在某些与图形/用户界面相关的代码中发生的.

This indicates that this is happening in the middle of some graphics/ui related code.

libcutils.so-__android_log_assert

这是一个断言处理程序,因此很可能在libwhui中违反了某种断言.

This is an assert handler, so most likely some kind of assert was violated in libwhui.

中止:

这是告诉操作系统异常"关闭的应用程序.

This is the application telling the O/S to shut down "abnormally".

提高+ pthread_kill + tgkill: 这是操作系统(Android)关闭应用程序.

raise + pthread_kill + tgkill: This is the O/S (Android) shutting down the app.

您可以在此处.

无论如何,恐怕很难对这种粗略和不精确的解释进行推测.

Anyway, I am afraid it is really difficult to speculate beyond this coarse and imprecise interpretation of the data you presented.

也许如果您在将其附加到Android日志查看器时发现了该错误,则可能会有更多特定于应用程序的数据(甚至是assert函数通常会发出的错误消息).

Maybe if you caught the bug while it was attached to the Android log viewer, you would have more application specific data (or even an error message which the assert function usually puts out).

我的技巧是使用类似 ACRA 之类的方法来查找与该错误有关的所有详细信息,或抓住受影响的设备并在连接到调试器时实际对其进行复制.

My tip is to use something like ACRA to track down all the details pertaining to the error, or get hold of an affected device and actually reproduce it while attached to a debugger.

祝你好运!

编辑2017-06-16 :我只想添加一些额外的信息(由Fco P提供),显然Google已决定对允许本机库在最新版本中运行的内容进行一些更改. Android(7.x). 此链接.

EDIT 2017-06-16: I just want to add some extra info courtesy comment by Fco P. Apparently Google has decided to make some changes to what native libraries are allowed to run in latest versions of Android (7.x). More details are in this link.

这篇关于Android 7本机崩溃:libc.so tgkill的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆