Skip to content

Conversation

@lrh2000
Copy link
Contributor

@lrh2000 lrh2000 commented Jun 23, 2020

When the Android's log daemon (logd) finds there are too many log records and some log reader (logcat) does not read them out in time, the reader may be kicked out. Therefore, the logcat can exit unexpectedly with a return code 1 and complains read: Unexpected EOF in standard error stream (stderr).

Refer to the AOSP's code for details: logcat/logcat.cpp#1161, logd/SimpleLogBuffer.cpp#345.

The module log (error.log) and verbose log (all.log) of EdXposed are generated by two background logcat processes. So when a logcat process dies, EdXposed's log is also incomplete.

A way to solve the problem is to increase logd's buffer size (by logcat -G XXX or in Developer Options). But I think the buffer size is the user's choice. EdXposed's log system should work regardless of the user-specified log buffer size. (It is allowed to miss some logs if the buffer size is too small.)

So I think it is a good choice to restart the logcat process once it is kicked out. However, if the logcat process is killed manually or by EdXposed Manager, it should not be restarted.

Since the method to kill the log catcher is changed, some changes are needed to be applied in EdXposed Manager. Check it in this pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants