我使用t113-s3全志的tinasdk2.0,开启adb,进入板子,发现adbd cpu占用率高达45%,几乎都是在30%以上,请问各位大佬有遇到过吗?
Mem: 70476K used, 42192K free, 0K shrd, 3948K buff, 12116K cached
CPU: 40% usr 13% sys 0% nic 45% idle 0% io 0% irq 0% sirq
Load average: 1.00 1.00 1.00 2/62 249
PID PPID USER STAT VSZ %VSZ %CPU COMMAND
153 1 root S 1452 1% 45% /bin/adbd -D
249 161 root R 1048 1% 5% top
248 232 root S 5940 5% 0% ./lvgldemo
145 1 root S 2400 2% 0% wpa_supplicant -Dnl80211 -iwlan0 -c /e
1 0 root S 1048 1% 0% /sbin/init
232 153 root S 1048 1% 0% /bin/sh
161 1 root S 1048 1% 0% -/bin/sh
152 1 root S 696 1% 0% /sbin/swupdate-progress -w
10 2 root IW 0 0% 0% [rcu_preempt]
139 2 root IW 0 0% 0% [kworker/u4:2-ev]
7 2 root IW 0 0% 0% [kworker/u4:0-ev]
66 2 root SW 0 0% 0% [irq/37-mmc0]
21 2 root IW 0 0% 0% [kworker/0:1-eve]
20 2 root IW 0 0% 0% [kworker/1:1-ipv]
55 2 root SW 0 0% 0% [spi0]
100 2 root SW 0 0% 0% [jbd2/mmcblk0p7-]
9 2 root SW 0 0% 0% [ksoftirqd/0]
72 2 root IW< 0 0% 0% [kworker/0:1H-kb]
142 2 root SW 0 0% 0% [RTW_CMD_THREAD]
^C 71 2 root IW< 0 0% 0% [kworker/1:1H-kb]
最近编辑记录 帝国炮灰 (2024-02-06 11:39:43)
离线
我也是芒果派的tina,adb的cpu占用率和你一样,那估计就是软件的问题了
离线
我使用strace跟了一下,发现adbd里面有个线程在系统调用时出现了问题,一直在循环调用,估计是这里的问题,不清楚是不是musl库问题还是kernel阉割了什么导致的。
root@TinaLinux:/proc/154/task/202# strace -p 202
strace: Process 202 attached
futex(0xb6f07cd8, FUTEX_WAIT, 2, NULL) = -1 ENOSYS (Function not implemented)
futex(0xb6f07cd8, FUTEX_WAIT_PRIVATE, 2, NULL) = -1 ENOSYS (Function not implemented)
futex(0xb6f07cd8, FUTEX_WAIT, 2, NULL) = -1 ENOSYS (Function not implemented)
futex(0xb6f07cd8, FUTEX_WAIT_PRIVATE, 2, NULL) = -1 ENOSYS (Function not implemented)
futex(0xb6f07cd8, FUTEX_WAIT, 2, NULL) = -1 ENOSYS (Function not implemented)
futex(0xb6f07cd8, FUTEX_WAIT_PRIVATE, 2, NULL) = -1 ENOSYS (Function not implemented)
futex(0xb6f07cd8, FUTEX_WAIT, 2, NULL) = -1 ENOSYS (Function not implemented)
futex(0xb6f07cd8, FUTEX_WAIT_PRIVATE, 2, NULL) = -1 ENOSYS (Function not implemented)
futex(0xb6f07cd8, FUTEX_WAIT, 2, NULL) = -1 ENOSYS (Function not implemented)
futex(0xb6f07cd8, FUTEX_WAIT_PRIVATE, 2, NULL) = -1 ENOSYS (Function not implemented)
futex(0xb6f07cd8, FUTEX_WAIT, 2, NULL) = -1 ENOSYS (Function not implemented)
futex(0xb6f07cd8, FUTEX_WAIT_PRIVATE, 2, NULL) = -1 ENOSYS (Function not implemented)
futex(0xb6f07cd8, FUTEX_WAIT, 2, NULL) = -1 ENOSYS (Function not implemented)
futex(0xb6f07cd8, FUTEX_WAIT_PRIVATE, 2, NULL) = -1 ENOSYS (Function not implemented)
futex(0xb6f07cd8, FUTEX_WAIT, 2, NULL) = -1 ENOSYS (Function not implemented)
futex(0xb6f07cd8, FUTEX_WAIT_PRIVATE, 2, NULL) = -1 ENOSYS (Function not implemented)
futex(0xb6f07cd8, FUTEX_WAIT, 2, NULL) = -1 ENOSYS (Function not implemented)
futex(0xb6f07cd8, FUTEX_WAIT_PRIVATE, 2, NULL) = -1 ENOSYS (Function not implemented)
futex(0xb6f07cd8, FUTEX_WAIT, 2, NULL) = -1 ENOSYS (Function not implemented)
futex(0xb6f07cd8, FUTEX_WAIT_PRIVATE, 2, NULL) = -1 ENOSYS (Function not implemented)
futex(0xb6f07cd8, FUTEX_WAIT, 2, NULL) = -1 ENOSYS (Function not implemented)
futex(0xb6f07cd8, FUTEX_WAIT_PRIVATE, 2, NULL) = -1 ENOSYS (Function not implemented)
离线
确实不正常,插了USB线吗?
嗯嗯,晕哥,我都测了,扒了和插了,cpu占用率一直都是这么高,把这个进程kill掉,cpu就正常了,我使用strace跟了一下,好像是kernel里面某个系统调用出了问题,我也不是很清楚
root@TinaLinux:/proc/154/task/202# strace -p 202
strace: Process 202 attached
futex(0xb6f07cd8, FUTEX_WAIT, 2, NULL) = -1 ENOSYS (Function not implemented)
futex(0xb6f07cd8, FUTEX_WAIT_PRIVATE, 2, NULL) = -1 ENOSYS (Function not implemented)
futex(0xb6f07cd8, FUTEX_WAIT, 2, NULL) = -1 ENOSYS (Function not implemented)
futex(0xb6f07cd8, FUTEX_WAIT_PRIVATE, 2, NULL) = -1 ENOSYS (Function not implemented)
离线
@晕哥
感谢晕哥,您使用的是glibc还是musl?
离线
帝国炮灰 说:@晕哥
感谢晕哥,您使用的是glibc还是musl?都用过,但是没有发现过adb有问题。
晕哥,您使用的是procd init还是busybox init?
离线
帝国炮灰 说:晕哥 说:都用过,但是没有发现过adb有问题。
晕哥,您使用的是procd init还是busybox init?
都用过,都没有问题
晕哥我用了下您发的虚拟机带sdk,编译了下代码,发现如下报错,这个log好像有点问题,您遇到了吗?
离线
@帝国炮灰
也没有遇到,你lunch的是第几个?
我把芒果派的相关配置文件添加了,到了您的sdk中。
离线
晕哥 说:@帝国炮灰
也没有遇到,你lunch的是第几个?我把芒果派的相关配置文件添加了,到了您的sdk中。
晕哥,这个问题解决了,其实上个图已经很明显了,通过strace观察到某个线程调用futex,但是没有实现,果然内核上没有开启,开启后cpu就正常了。
离线
我也是芒果派的tina,adb的cpu占用率和你一样,那估计就是软件的问题了
这个问题解决了,内核开启futex就正常了
离线
804715358@qq.com 说:我也是芒果派的tina,adb的cpu占用率和你一样,那估计就是软件的问题了
这个问题解决了,内核开启futex就正常了
有用,就是这个问题,这个问题会导致 sleep函数等操作无法正常使用
离线