Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请教下,判断anr的时候为啥需要监听BIONIC_SIGNAL_DEBUGGER #852

Closed
kbjay opened this issue Jun 16, 2023 · 2 comments
Closed

Comments

@kbjay
Copy link

kbjay commented Jun 16, 2023

Issue /提问须知

在提交 issue 之前,我们应该先查询是否已经有相关的 issue 以及常见问题。提交 issue 时,我们需要写明 issue 的原因,以及编译或运行过程的日志。issue 需要以下面的格式:

异常类型:app 运行时异常/编译异常

手机型号:如: Nexus 5(如是编译异常,则可以不填)

手机系统版本:如:Android 5.0 (如是编译异常,则可以不填)

matrix版本:如: 0.4.7

gradle版本:如: 3.0.0

问题描述:如:在 android O 出现系统不兼容 

堆栈/日志:
1. 如是编译异常,请在执行 gradle 命令时,加上 --stacktrace;
2. 日志我们需要过滤" Matrix. "关键字;

提问题时若使用不能用/没效果/有问题/报错此类模糊表达,但又没给出任何代码截图报错的,将绝对不会有任何反馈。这种 issue 也是一律直接关闭的,大家可以参阅提问的智慧

Matrix 是一个开源项目,希望大家遇到问题时要学会先思考,看看 Sample 与 Matrix 的源码,更鼓励大家给我们提 pr .

@kbjay kbjay changed the title Android 判断anr的时候为啥需要监听BIONIC_SIGNAL_DEBUGGER 请教下,判断anr的时候为啥需要监听BIONIC_SIGNAL_DEBUGGER Jun 16, 2023
@kbjay
Copy link
Author

kbjay commented Jun 20, 2023

提交记录中看到了“SignalAnrTrace monitors signal 35, which will be sent by system in case signal 3 is timed out”,这里的quit信号超时具体是指什么?

@yeleaveszi
Copy link
Collaborator

就像commit里说的,signal3流程如果超时或者失败,系统会发送sig35来dump native back trace,可以参考源码ActivityManagerService#dumpJavaTracesTombstoned,可以在onAnrDetected里面sleep一段时间来简单模拟出这种情况

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants