11

Whenever I connect my Samsung Galaxy S5 (running Android 4.4.2) to my computer, the Logcat in Android Studio starts being "spammed" by the same message multiple times ~1600 times per second, resulting in the message "Too much output to process" appearing in a yellow box in Logcat. This is when there is no filtering and no debug process selected.

The Logcat message is this:

D/tms_audio_hw/AudioTmsIpc AudioTmsClientListen accept Done gAudioClientAcceptSockFd -1 gAudioClientLocalSockFd 24

Googling it reveals surprisingly little. Actually nothing. I'm not sure, but it seems to be affecting the logging from my application as well, because when I select my application as the debug process, I don't get all the Logcat outputs from my application - sometimes I'll get some, sometimes I'll get others, sometimes I'll get none.

Also, because of this my computer starts using CPU like crazy just to process those messages, resulting in extreme CPU usage and fans at full blast!

What the heck is causing this?

EDIT

I have now looked at exactly how fast these logs are coming in, and it's at a rate of 1600 logs per second, and it's just this same message over and over and over. Don't tell me this is "normal behaviour" unless you are experiencing this on your own devices.

Magnus
  • 17,157
  • 19
  • 104
  • 189
  • 1
    Those look to be kernel log messages. Are your filters on? Top right drop-down should be set to "Show only selected application". – CaptJak Apr 06 '16 at 21:41
  • 1
    No, not when these messages are displayed. But there's weird stuff going on with the logs from my own application - sometimes they show up in logcat, sometimes they don't. Either it's Android Studio that's acting up again, or it's receiving too many logs to be able to process all of them? As I understand it, even when I do filter the output, Android Studio still has to process every single log message being sent from the phone in order to filter them? I think it can't handle it. Never had any issues like this with Eclipse for 3+ years. – Magnus Apr 06 '16 at 21:47
  • I have never had issues with dropped log messages when the filters are on. The log processing isn't what is making drop messages, or what chomping your CPU, it's displaying them. For example, when compiling my a package on Linux, it takes *significantly* longer to compile if it's taking time to print everything to the screen. – CaptJak Apr 06 '16 at 21:51
  • Have you ever had 1600 logs per second (and that's just those specific messages) coming in? I'm not sure this has anything to do with my logs not showing up consistently, it could be just a glitch with Android Studio, but since it's working fine and dandy on the emulator I'm suspecting some sort of log overload from my phone... – Magnus Apr 06 '16 at 22:06
  • 1600 log messages per second is absurd. Can you tell which process the logs are coming from? The pid should be visible in the logcat output (use `adb logcat -v threadtime` if you can't get it out of whatever tool you're using). Use `adb shell ps` to see the list of processes. – fadden Apr 06 '16 at 22:13
  • All right, it's coming from `media 264 1 275624 8684 ffffffff 00000000 S /system/bin/mediaserver`. – Magnus Apr 06 '16 at 22:53
  • Unfortunate. mediaserver is a system process that manages access to audio and video drivers. You don't have direct control over it. You may be able to work around it if an app is causing mediaserver to act this way. Try `adb shell ps -t -x` and look for threads with steadily increasing user/system time (run it, wait 10 seconds, run it again, compare); if you see an app or service with increasing values, it may be due to repeatedly accessing mediaserver. Alternatively, kill apps and services until the logging flood stops. – fadden Apr 06 '16 at 23:55
  • You could also try updating your device. – CaptJak Apr 07 '16 at 01:57
  • I tried stopping every single application and service on the phone, even ones like "Google Play Services" - the logs kept coming. Then I restarted my phone - and the logs had stopped. Have tried using the phone as I would a normal day - calling, listening to podcasts/music/audiobooks, using maps, etc - and the logs haven't reappeared yet. I'm sure they will though, because this has been an issue for a couple of months, I just didn't bother troubleshooting it until yesterday. – Magnus Apr 07 '16 at 10:37
  • I am too using a Samsung phone. I think Samsung devices have this problem. I used to test with a Redmi phone before and had no issues but now after changing my device I see too many logs and sometimes when there is a crash, the crash log is gone before I could even scroll and find it! – itabdullah Oct 30 '19 at 08:09

3 Answers3

26

You may have selected "No Filters" in android monitor which causes "Too much output to process error", Change it to "Show only selected Application" then all other Log line are filtered and will not show in Logcat.

Here is snapshot of Android Monitor. enter image description here

  • 3
    this doesn't help with the fact that all the logs are being transmitted from the device to logcat and thus slow down the USB connection and logcat. Filter is purely cosmetic – NikkyD Oct 31 '17 at 15:02
3

I had a similar problem while testing an app. Initially the log messages displayed as expected and then it started to display my log messages "at random", i.e. showing and then not showing.

Removing the Logcat filter showed the "too much output to process" message. I also noticed that the log was displaying messages relating to apps installed on my phone (I was using a phone to test my app) and had nothing to do with my app.

I disconnected the phone from my laptop, restarted the phone and then re-connected it back to the laptop and ran the app. The Logcat was back to normal, showing the log messages as expected.

Maciej Beimcik
  • 3,218
  • 1
  • 24
  • 26
Clive Sargeant
  • 622
  • 11
  • 24
  • Yup, I also discovered that restarting the phone seems to help, just forgot to post it here. – Magnus May 08 '16 at 22:49
0

That is normal behaviour; it is not related to a particular phone model or Android OS version. When you remove all filters, there's just too much logging output being redirected from everything that can and does log, including system components and various libraries that are loaded at that time.

The recommended default approach is to simply filter out and view only your application's log output and switch to no filtering only when you are specifically debugging something where you need to know what else is happening around that part of code.

Levon
  • 1,681
  • 2
  • 18
  • 40
  • 1
    But this is extreme - it's the exact same line literally at a rate of dozens per second. I've never experienced this with any other phone. Sure, there are always _some_ stuff being logged, but nothing like this. I'm not kidding when I say that my computer's CPU usage is through the roof as soon as I connect my phone. Filtering the logcat doesn't seem to help with this either - I guess the messages are still being sent to Android Studio, just not displayed? – Magnus Apr 06 '16 at 21:44
  • @BadCash This log message seems to be specific to the Galaxy S series. googling for `AudioTmsClientListen` gave me Galaxy results. – CaptJak Apr 06 '16 at 21:53
  • 1
    I have updated my question. I managed to copy some of them with trial-and-error since the log just whushes by non-stop. Are you telling me that **1600 of the same message per second** is normal behaviour? – Magnus Apr 06 '16 at 22:00
  • No, 1600 per second is not normal, @BadCash. But, you didn't say that when you posted your question. – CaptJak Apr 06 '16 at 22:28