commit | 2ee4371cb73cd23a8615593956de2e4f0cea4a98 | [log] [tgz] |
---|---|---|
author | Yao Chen <yaochen@google.com> | Mon Jan 22 14:36:52 2018 -0800 |
committer | Yao Chen <yaochen@google.com> | Mon Jan 22 14:44:37 2018 -0800 |
tree | ebd87d81e268189c860d8de5f1f11fd38dcd9e8b | |
parent | 1776fa33f1ed0b853e3f3dde979597d1674cdf29 [diff] |
Handle return value 0 from android_logger_list_read This fixes the bug that sometimes statsd is running at 99% cpu. Connection to logd can be reset for various reasons, and android_logger_list_read will return 0 when that happens. We didn't handle 0 before, and that leads to reading empty logs and processing them in a infinite loop. Bug: 71833883 Test: manual test by killing logd, forcing return 0. Change-Id: I5a9c89fc58959d6593028a14f70a8fe8d10b40f1