Android 7 原生崩溃:libc.so tgkill [英] Android 7 Native Crash: libc.so tgkill

查看:43
本文介绍了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 更新:

仍然无法解决这个问题,所以我决定购买一台出现次数最多且价格合理的设备,结果是三星 Galaxy J3 2017 版本,搭载 Android 7.0.不幸的是,我仍然无法重现崩溃.

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

这表明这发生在一些图形/ui相关代码的中间.

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".

raise + pthread_kill + tgkill:这是关闭应用程序的 O/S (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 日志查看器时发现了该错误,您可能会获得更多特定于应用程序的数据(甚至是断言函数通常会发出的错误消息).

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天全站免登陆