java 文件句柄不释放,文件句柄耗光造成系统重启BUG排查

本文记录了一次Android系统在休眠唤醒后因文件句柄耗尽导致系统重启的问题排查过程。日志显示多个系统服务出现Binder通信异常,进程被杀,进一步分析发现是由于libsuspend库中的文件句柄未释放,耗尽了系统资源。通过检查系统文件句柄限制和使用lsof工具定位问题,最终确定并解决了句柄泄漏的问题。
摘要由CSDN通过智能技术生成

本系列文章用于记录日常工作中遇到的疑难杂症排查经过,转载请注明出处!!

问题背景:android7.1+linux3.10

问题现象:做休眠唤醒压力测试,一个晚上后发现系统重启,参与测试的所有机器都必现

抓取异常时候的日志,内核log只看到zygote等系统进程在被kill前,几个进程的binder通信出现了异常,bootanim服务被启动,其余无法再看出什么

02-20 02:58:07.828 I/binder ( 0): send failed reply for transaction 2785419 to 1049:1064

02-20 02:58:07.829 I/binder ( 0): send failed reply for transaction 2785424 to 1203:1274

02-20 02:58:07.829 I/binder ( 0): send failed reply for transaction 2785429 to 1720:2201

02-20 02:58:07.829 I/binder ( 0): undelivered transaction 2785440

02-20 02:58:07.830 I/alarm_release( 0): clear alarm, pending 0

02-20 02:58:07.830 I/alarm_release( 0): clear alarm, pending 0

02-20 02:58:07.831 I/binder ( 0): 1049:1049 transaction failed 29189, size 116-0

02-20 02:58:07.832 I/binder ( 0): 1049:1049 transaction failed 29189, size 168-8

02-20 02:58:07.833 I/binder ( 0): 1753:1849 transaction failed 29189, size 68-0

02-20 02:58:07.852 I/init ( 0): Starting service 'bootanim'...

02-20 02:58:07.852 I/binder ( 0): 1807:27628 transaction failed 29189, size 60-0

02-20 02:58:07.853 I/binder ( 0): 1049:1049 transaction failed 29189, size 160-0

02-20 02:58:09.718 I/init ( 0): Service 'zygote' (pid 640) killed by signal 9

02-20 02:58:09.718 I/init ( 0): Service 'zygote' (pid 640) killing any children in process group

02-20 02:58:09.719 I/init ( 0): write_file: Unable to open '/sys/android_power/request_state': No such file or directory

02-20 02:58:09.719 I/init ( 0): write_file: Unable to write to '/sys/power/state': Invalid argument

02-20 02:58:09.720 E/init ( 0): Service 'audioserver' is being killed...

02-20 02:58:09.721 E/init ( 0): Service 'cameraserver' is being killed...

02-20 02:58:09.721 E/init ( 0): Service 'media' is being killed...

02-20 02:58:09.721 E/init ( 0): Service 'netd' is being killed...

02-20 02:58:09.724 I/init ( 0): Starting service 'zygote'...

02-20 02:58:09.748 I/init ( 0): Service 'netd' (pid 650) killed by signal 9

02-20 02:58:09.748 I/init ( 0): Service 'netd' (pid 650) killing any children in process group

02-20 02:58:09.749 I/init ( 0): Service 'audioserver' (pid 641) killed by signal 9

02-20 02:58:09.749 I/init ( 0): Service 'audioserver' (pid 641) killing any children in process group

02-20 02:58:09.750 I/init ( 0): Service 'cameraserver' (pid 643) killed by signal 9

02-20 02:58:09.750 I/init ( 0): Service 'cameraserver' (pid 643) killing any children in process group

02-20 02:58:09.751 I/ini

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值