Android P-9.0.0_r53 Logcat 主缓冲区超出定义大小
Android P-9.0.0_r53 Logcat Main Buffer Exceed Defined Size
在我们的 Android AOSP 中,Logcat 主缓冲区无论其大小如何都超出了定义的大小。
logcat -c
或其他命令不起作用。之后它给出 read: unexpected EOF!
我正在查看 logcat.cpp
的源代码,找不到任何特定的东西。你知道为什么会出现这个问题吗?
adb logcat -g
输出:
eg: when issue is happening (read: unexpected EOF!)
main: ring buffer is 4Mb (20Mb consumed), max entry is 5120b, max payload is 4068b
system: ring buffer is 4Mb (257Kb consumed), max entry is 5120b, max payload is 4068b
crash: ring buffer is 4Mb (13Kb consumed), max entry is 5120b, max payload is 4068b
我找到了问题和解决方案。
the main reason of the problem is setting of system date to older
dates than the initial date. Time doesn't matter though.
就我而言:
I don't know why but the system initial date is always +1 day than
now. When the system date is synced with the current date ( which is
older date for the system initial date), buffer start to overflow and
clear buffer commands doesn't work.
You can test with setting the date to the next day or next dates. You
can check buffer sizes and consumed with ´adb logcat -g´ or ´adb
logcat -b all -g´ and try to clear with ´adb logcat -c´.
在我们的 Android AOSP 中,Logcat 主缓冲区无论其大小如何都超出了定义的大小。
logcat -c
或其他命令不起作用。之后它给出 read: unexpected EOF!
我正在查看 logcat.cpp
的源代码,找不到任何特定的东西。你知道为什么会出现这个问题吗?
adb logcat -g
输出:
eg: when issue is happening (read: unexpected EOF!)
main: ring buffer is 4Mb (20Mb consumed), max entry is 5120b, max payload is 4068b
system: ring buffer is 4Mb (257Kb consumed), max entry is 5120b, max payload is 4068b
crash: ring buffer is 4Mb (13Kb consumed), max entry is 5120b, max payload is 4068b
我找到了问题和解决方案。
the main reason of the problem is setting of system date to older dates than the initial date. Time doesn't matter though.
就我而言:
I don't know why but the system initial date is always +1 day than now. When the system date is synced with the current date ( which is older date for the system initial date), buffer start to overflow and clear buffer commands doesn't work.
You can test with setting the date to the next day or next dates. You can check buffer sizes and consumed with ´adb logcat -g´ or ´adb logcat -b all -g´ and try to clear with ´adb logcat -c´.