蓝牙压力測试报抛android.os.TransactionTooLargeException异常分析总结
1、从main日志中找到异常点,例如以下:
08-20 11:05:19.754 5023 5023 E AndroidRuntime: FATAL EXCEPTION: main
08-20 11:05:19.754 5023 5023 E AndroidRuntime: Process: com.android.bluetooth, PID: 5023
08-20 11:05:19.754 5023 5023 E AndroidRuntime: java.lang.RuntimeException: Unable to start receiver com.android.bluetooth.opp.BluetoothOppHandoverReceiver: java.lang.RuntimeException: Adding window failed
08-20 11:05:19.754 5023 5023 E AndroidRuntime: at android.app.ActivityThread.handleReceiver(ActivityThread.java:2913)
08-20 11:05:19.754 5023 5023 E AndroidRuntime: at android.app.ActivityThread.access$1700(ActivityThread.java:177)
08-20 11:05:19.754 5023 5023 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1611)
08-20 11:05:19.754 5023 5023 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:111)
08-20 11:05:19.754 5023 5023 E AndroidRuntime: at android.os.Looper.loop(Looper.java:194)
08-20 11:05:19.754 5023 5023 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5733)
08-20 11:05:19.754 5023 5023 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
08-20 11:05:19.754 5023 5023 E AndroidRuntime: at java.lang.reflect.Method.invoke(Method.java:372)
08-20 11:05:19.754 5023 5023 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:959)
08-20 11:05:19.754 5023 5023 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:754)
08-20 11:05:19.754 5023 5023 E AndroidRuntime: Caused by: java.lang.RuntimeException: Adding window failed
08-20 11:05:19.754 5023 5023 E AndroidRuntime: at android.view.ViewRootImpl.setView(ViewRootImpl.java:668)
08-20 11:05:19.754 5023 5023 E AndroidRuntime: at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:289)
08-20 11:05:19.754 5023 5023 E AndroidRuntime: at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:85)
08-20 11:05:19.754 5023 5023 E AndroidRuntime: at android.app.Dialog.show(Dialog.java:311)
08-20 11:05:19.754 5023 5023 E AndroidRuntime: at android.app.AlertDialog.show(AlertDialog.java:1127)
08-20 11:05:19.754 5023 5023 E AndroidRuntime: at com.android.bluetooth.opp.MzBluetoothTurnOffPromptDialog.showDialog(MzBluetoothTurnOffPromptDialog.java:64)
08-20 11:05:19.754 5023 5023 E AndroidRuntime: at com.android.bluetooth.opp.BluetoothOppHandoverReceiver.onReceive(BluetoothOppHandoverReceiver.java:251)
08-20 11:05:19.754 5023 5023 E AndroidRuntime: at android.app.ActivityThread.handleReceiver(ActivityThread.java:2906)
08-20 11:05:19.754 5023 5023 E AndroidRuntime: ... 9 more
08-20 11:05:19.754 5023 5023 E AndroidRuntime: Caused by: android.os.TransactionTooLargeException
08-20 11:05:19.754 5023 5023 E AndroidRuntime: at android.os.BinderProxy.transactNative(Native Method)
08-20 11:05:19.754 5023 5023 E AndroidRuntime: at android.os.BinderProxy.transact(Binder.java:504)
08-20 11:05:19.754 5023 5023 E AndroidRuntime: at android.view.IWindowSession$Stub$Proxy.addToDisplay(IWindowSession.java:768)
08-20 11:05:19.754 5023 5023 E AndroidRuntime: at android.view.ViewRootImpl.setView(ViewRootImpl.java:657)
08-20 11:05:19.754 5023 5023 E AndroidRuntime: ... 16 more
能够看出是由于binder通信是抛了一个TransactionTooLargeException异常导致,这时我们须要借助Kernel日志进一步定位问题。
2、从Kernel日志中搜索keyword“5023”和"binder",例如以下:
Line 5: Line 18110: <6>[72111.734216]<0> (2)[1546:Binder_9]binder: 812:1546 to 5023 failed due to 5023 no unused fd available(5023:droid.bluetooth fd leak?), -24
Line 5: Line 18110: <6>[72111.734216]<0> (2)[1546:Binder_9]binder: 812:1546 to 5023 failed due to 5023 no unused fd available(5023:droid.bluetooth fd leak?), -24
Line 6: Line 18110: <6>[72111.734216]<0> (2)[1546:Binder_9]binder: 812:1546 to 5023 failed due to 5023 no unused fd available(5023:droid.bluetooth fd leak?), -24
Line 6: Line 18110: <6>[72111.734216]<0> (2)[1546:Binder_9]binder: 812:1546 to 5023 failed due to 5023 no unused fd available(5023:droid.bluetooth fd leak? ), -24
Line 7: Line 18110: <6>[72111.734216]<0> (2)[1546:Binder_9]binder: 812:1546 to 5023 failed due to 5023 no unused fd available(5023:droid.bluetooth fd leak?), -24
Line 7: Line 18110: <6>[72111.734216]<0> (2)[1546:Binder_9]binder: 812:1546 to 5023 failed due to 5023 no unused fd available(5023:droid.bluetooth fd leak? ), -24
Line 8: Line 18112: <6>[72111.734239]<0> (2)[1546:Binder_9]binder: send failed reply for transaction 5183251 to 5023:5023
Line 8: Line 18112: <6>[72111.734239]<0> (2)[1546:Binder_9]binder: send failed reply for transaction 5183251 to 5023:5023
Line 9: Line 18112: <6>[72111.734239]<0> (2)[1546:Binder_9]binder: send failed reply for transaction 5183251 to 5023:5023
Line 9: Line 18112: <6>[72111.734239]<0> (2)[1546:Binder_9]binder: send failed reply for transaction 5183251 to 5023:5023
Line 10: Line 18114: <3>[72111.734447]<0> (1)[5023:droid.bluetooth]binder: read put err 29201 to user 00000000f4f2f708, thread error 29201:29185
Line 21: Line 26440: <7>[72131.351513]<1>-(2)[1634:Binder_C][1634:Binder_C] sig 9 to [5023:droid.bluetooth] stat=x
Line 21: Line 26440: <7>[72131.351513]<1>-(2)[1634:Binder_C][1634:Binder_C] sig 9 to [5023:droid.bluetooth] stat=x
驱动Binder.c文件里
target_fd = task_get_unused_fd_flags(target_proc, O_CLOEXEC);
if (target_fd < 0) {
fput(file);
#ifdef MTK_BINDER_DEBUG
binder_user_error("%d:%d to %d failed due to %d no unused fd available(%d:%s fd leak?), %d\n",
proc->pid, thread->pid,
target_proc->pid, target_proc->pid, target_proc->pid,
target_proc->tsk ? target_proc->tsk->comm : "",
target_fd);
#endif
return_error = BR_FAILED_REPLY;
goto err_get_unused_fd_failed;
}
task_fd_install(target_proc, target_fd, file);
5、接下来的事情就是查句柄泄露了,可用以下两个命令。做压力測试。然后隔一段时间就“ls -l”一下,看哪个句柄在不停地涨。
cd /proc/pid/fd/
ls -l
6、最后发现是蓝牙传输小于3M的文件会产生socket泄露。
蓝牙压力測试报抛android.os.TransactionTooLargeException异常分析总结的更多相关文章
- Viewpager+Fragment 跳转Activity报错android.os.TransactionTooLargeException: data parcel size xxxxx bytes
Viewpager + Fragment 跳转Activity报错android.os.TransactionTooLargeException: data parcel size xxxxx byt ...
- Android开发之按键、触摸屏和手势输入专业压力測试方法
按键输入.触摸屏输入和手势笔画输入等功能是Android开发的基本功能.其稳定性和健壮性对移动应用系统开发很重要.按键.触摸屏和手势输入专业压力測试方法能够使用Monkey,相应用程序进行压力測试,检 ...
- ubuntu 14.04 LTS 安装webbentch压力測试工具
近期在做 压力測试工具,除了apache的ab測试工具外,发现webbentch工具也不错,这里简介下这两个工具. 一.webbentch安装: wget http://blog.s135.com/s ...
- 【金阳光測试】大话Android自己主动化測试--Android自己主动化系列(1)--金阳光于2013年4月份
Android自己主动化測试框架和工具在四年多的发展日趋成熟. 从五年前的第一代自己主动化架构演进到眼下第四代(本系列讲座第7篇后将具体剖析第三代和第四代自己主动化框架)从曾经最早谷歌推崇的monke ...
- APP压力測试新手教程
Daniel Knott 用过各种不同编程语言和软件质量保证工具.他在软件开发和測试方面干了七年,自2010年,他一直在德国汉堡的XING AG公司就职,几个项目里,比方XING调查和XING建议,他 ...
- 站点系统压力測试Jmeter+Badboy
近期项目须要压力測试,因此搜了几款试用,首选的是LoadRunner这款大名鼎鼎的測试软件: LoadRunner11 下载请猛戳这里 传送门LoadRunner破解文件 下载请猛戳这里 传送门Loa ...
- php性能优化(一)压力測试工具篇
ab使用 Apache附带的压力測试工具ab,很easy使用,而且全然能够摸你各种条件对Webserver发起測试请求.ab能够直接在Webserver本地发起測试请求.这对于须要了解server的处 ...
- 怎样使用 Apache ab 以及 OneAPM 进行压力測试?
下一个 release 准备小长假后就要 go-live .全部的測试 case 都 cover 过了.但还未进行过压力測试,有点不放心,刚好过节期间家人都回家去了,假期最终能够抽点时间压測一把. A ...
- 学习使用Jmeter做压力測试(一)--压力測试基本概念
一.性能測试的概念 性能測试是通过自己主动化的測试工具模拟多种正常峰值及异常负载条件来对系统的各项性能指标进行測试.负载測试和压力測试都属于性能測试,两者能够结合进行. 通过负载測试, ...
随机推荐
- echarts如何更改表格主题颜色
vue项目中,需要使用echarts时,需要根据UI设计图进行图标颜色修改 方法一: 1.在script中引入echarts以及主题样式: import echarts from 'echarts'; ...
- Python-基础-day4
深浅copy 1.先看赋值运算 h1 = [1,2,3,['aihuidi','hhhh']] h2 = h1 h1[0] = 111 print(h1) print(h2) #结果: # [111, ...
- spring security中当前用户信息
1:如果在jsp页面中获取可以使用spring security的标签库 在页面中引入标签 1 <%@ taglib prefix="sec" uri="htt ...
- word上怎么打钩
原文:http://www.wordlm.com/html/2291.html 有时我们在Word中制作一份特殊的表格时,可能会用到这样一些特殊符号,“在方框里打钩”或打叉.这些符号虽看起来简单不起眼 ...
- 【codeforces 794A】Bank Robbery
[题目链接]:http://codeforces.com/contest/794/problem/A [题意] 每个位置上可能有物品(>=1)或是没物品 你一开始在某一个位置b; 然后你最左可以 ...
- 【BZOJ3270】博物馆 概率DP 高斯消元
链接: #include <stdio.h> int main() { puts("转载请注明出处[辗转山河弋流歌 by 空灰冰魂]谢谢"); puts("网 ...
- 微软柯塔娜(Cortana)的一句名言
近日.媒体频传Win 10装机量已经超过多少千万台.我操心的问题是,集成在Win 10操作系统中的柯塔娜小姐将怎样面对各色各样的人群.由于,在这个世界上.人是最复杂的生物,什么人都有. 依据国外媒体报 ...
- hdu1276(士兵队列训练问题) java集合水过
点击打开链接 有人说这题属于栈或者队列,个人认为说集合应该比較准确点. Problem Description 某部队进行新兵队列训练,将新兵从一開始按顺序依次编号.并排成一行横队,训练的规则例如以下 ...
- [luogu P2123] 皇后游戏 解题报告(贪心)
题目链接:https://www.luogu.org/problemnew/show/P2123 题目大意: 给定a数组和b数组,要求最小化c数组中的最大值 题解: 考虑微扰法,推一波式子先 设$x= ...
- [LeetCode] 2. Add Two Numbers 两个数字相加 java语言实现 C++语言实现
[LeetCode] Add Two Numbers 两个数字相加 You are given two non-empty linked lists representing two non-ne ...