从Android中的SDK 28迁移到SDK 29之后,我的应用程序崩溃并面临:信号11(SIGSEGV),代码2(SEGV_ACCERR),Android Studio 3.4.1中的错误 [英] After migrating from SDK 28 to SDK 29 in Android my app crashed and facing : signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), error in Android studio 3.4.1

查看:121
本文介绍了从Android中的SDK 28迁移到SDK 29之后,我的应用程序崩溃并面临:信号11(SIGSEGV),代码2(SEGV_ACCERR),Android Studio 3.4.1中的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Iam仅在具有Android OS版本10的OnePlus,Samsung,Poco F1中面临此问题.

Iam facing the issue only in OnePlus, Samsung , Poco F1 with Android OS version 10.

它可以在Android 10的像素设备中使用.

It's working in pixel devices with Android 10.

请在下面找到错误日志

Build fingerprint: 'Xiaomi/beryllium/beryllium:10/QKQ1.190828.002/V11.0.6.0.QEJMIXM:user/release-keys'
Revision: '0'
ABI: 'arm64'
Timestamp: 2020-03-16 18:10:34+0530
pid: 2594, tid: 2737, name: JavaBridge  >>> com.mymobile<<<
uid: 10362
signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0x7188e089db
Cause: execute-only (no-read) memory access error; likely due to data in .text.
    x0  0000000000000100  x1  000000705d3f2fb0  x2  0000000000000000  x3  0000000000000008
    x4  00000000000000e2  x5  000000705d3fbd60  x6  000000705d3fbd60  x7  707265676e69662e
    x8  0000007188e089d4  x9  0000000000000000  x10 0000000000000007  x11 0000000000000000
    x12 0000000000000000  x13 0000000000000001  x14 000000705d3f2f58  x15 000000705d3f4bcc
    x16 00000060a530d558  x17 0000007188e0ae20  x18 000000001ba3a243  x19 000000705d3f7038
    x20 0000000000000001  x21 000000705d3f4188  x22 000000705d3f6f1c  x23 0000000000000002
    x24 0000000000000002  x25 0000007081ea45b0  x26 000000710786b8b0  x27 0000000000000005
    x28 0000000000000001  x29 000000705d3f6f90
    sp  000000705d3f31e0  lr  000000708c9058d8  pc  000000708c9063d8

backtrace:
      #00 pc 00000000000053d8  /data/app/com.mymobile-_0ls0Aom7N8BP86o4bZVYQ==/lib/arm64/libag3.so (BuildId: 25ee893fb2620c6009ca1a6ef581e24e27c00a36)
      #01 pc 000000000000c2c4  /data/app/com.mymobile-_0ls0Aom7N8BP86o4bZVYQ==/lib/arm64/libag3.so (BuildId: 25ee893fb2620c6009ca1a6ef581e24e27c00a36)
      #02 pc 000000000002b0d4  /data/app/com.mymobile-_0ls0Aom7N8BP86o4bZVYQ==/lib/arm64/libag3.so (Java_com_apiguard3_signals_NdkManager_collectSignal+196) (BuildId: 25ee893fb2620c6009ca1a6ef581e24e27c00a36)
      #03 pc 00000000000b90fc  /data/app/com.mymobile-_0ls0Aom7N8BP86o4bZVYQ==/oat/arm64/base.odex (art_jni_trampoline+236)
      #04 pc 0000000000136334  /apex/com.android.runtime/lib64/libart.so (art_quick_invoke_stub+548) (BuildId: 2bc2e11d57f839316bf2a42bbfdf943a)
      #05 pc 0000000000144fec  /apex/com.android.runtime/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+244) (BuildId: 2bc2e11d57f839316bf2a42bbfdf943a)
      #06 pc 00000000002e27cc  /apex/com.android.runtime/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+384) (BuildId: 2bc2e11d57f839316bf2a42bbfdf943a)
      #07 pc 00000000002dda2c  /apex/com.android.runtime/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+892) (BuildId: 2bc2e11d57f839316bf2a42bbfdf943a)
      #08 pc 00000000005a20b0  /apex/com.android.runtime/lib64/libart.so (MterpInvokeDirect+424) (BuildId: 2bc2e11d57f839316bf2a42bbfdf943a)
      #09 pc 0000000000130914  /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_direct+20) (BuildId: 2bc2e11d57f839316bf2a42bbfdf943a)
      #10 pc 0000000000de4afa  /data/app/com.mymobile-_0ls0Aom7N8BP86o4bZVYQ==/oat/arm64/base.vdex (com.apiguard3.signals.NdkManager.b0414ДДДД0414+20)
      #11 pc 00000000002b3ae0  /apex/com.android.runtime/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEbb.llvm.17460956533834400288+240) (BuildId: 2bc2e11d57f839316bf2a42bbfdf943a)
      #12 pc 00000000005912f0  /apex/com.android.runtime/lib64/libart.so (artQuickToInterpreterBridge+1032) (BuildId: 2bc2e11d57f839316bf2a42bbfdf943a)
      #13 pc 000000000013f468  /apex/com.android.runtime/lib64/libart.so (art_quick_to_interpreter_bridge+88) (BuildId: 2bc2e11d57f839316bf2a42bbfdf943a)
      #14 pc 0000000000136334  /apex/com.android.runtime/lib64/libart.so (art_quick_invoke_stub+548) (BuildId: 2bc2e11d57f839316bf2a42bbfdf943a)
      #15 pc 0000000000144fec  /apex/com.android.runtime/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JVal

任何人都可以帮助解决此问题吗?预先感谢

Can any one help in resolving this Thanks in advance

推荐答案

此崩溃的根本原因是来自Android 10的行为更改.请参阅以下页面以了解问题: https://developer.android.com/about/versions/10/行为改变全部 https://developer.android.com/about/versions/10/行为改变全部

The root cause of this crash is caused by behavior change from Android 10. Please refer to the following pages to understand the problem: https://developer.android.com/about/versions/10/behavior-changes-all https://developer.android.com/about/versions/10/behavior-changes-all

总而言之,问题是:从Android 10开始,系统二进制文件和库的可执行段被映射到仅执行内存(不可读)中,作为一种针对代码重用攻击的强化技术.如果您的应用程序对标记为仅执行"的内存段执行了读取操作(无论是从错误,漏洞还是有意进行内存检查),系统都会向您的应用程序发送SIGSEGV信号.

In a summary the issue is: Starting in Android 10, executable segments of system binaries and libraries are mapped into memory execute-only (non-readable) as a hardening technique against code-reuse attacks. If your app performs read operations into memory segments marked as execute-only – whether from bug, vulnerability, or intentional memory inspection – the system sends a SIGSEGV signal to your app.

作为变通方法,它说是调用"mprotect".执行发生崩溃的方法.您可以在这里参考以了解如何调用此方法: https://man7.org/linux/man-pages/man2/mprotect.2.html

As workaround it says to call "mprotect" to execute the method where crash happen. You can refer here to understand how to call this method: https://man7.org/linux/man-pages/man2/mprotect.2.html

我想说这种解决方法很烦人,因为它增加了额外的系统调用,而且根本不方便.但是我看不出更好的方法.

I would say it is very annoying to implement this workaround as it add additional system call and not convenient at all.However i don't see a better way.

这篇关于从Android中的SDK 28迁移到SDK 29之后,我的应用程序崩溃并面临:信号11(SIGSEGV),代码2(SEGV_ACCERR),Android Studio 3.4.1中的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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