What app is using mdnsd if I don't have Firefox and draining my battery on samsung galaxy s3

  • Thread starter Thread starter AC Question
  • Start date Start date
A

AC Question

For the past several weeks my Samsung Galaxy SIII battery has been draining almost completely 3x/day. In Settings I checked the Battery usage and find it's Mdnsd that's using all the battery. An online search tells me it's associated with Mozilla Firefox which I don't have. It is also associated with drone app use, again which I don't have. I'm also having trouble using Google Maps in that it tells me it cannot search right now and when it does work, it won't give me directions even though I have the voice directions checked. I've uninstalled/reinstalled GoogleMaps a couple of times and it will work for a while and then quits again. So I have two problems. Any insights? I'm using Tracfone's Total Choice which only supports 4.1.2 os so I cannot do any updating.
 
A little additional information. I have written a crude Python script (am just learning Python language) to monitor the status of mdnsd and udp and udp6 port 5353 (0x14E9) for number of sockets, number of bytes that are queued on the rx_queue, and the number of dropped packets. It checks these values once a minute and reports and logs when there is a change.

Although I'm no longer running Facebook app and also not running Ping & DNS app, I am seeing some interesting results. Although I no longer see a mdnsd process running, because I'm not running these apps, I am still seeing some minor problems on port 5353. Every so often, the number of sockets increases with a 10's of thousands of bytes queued for the receive queue. I am also seeing the number of dropped packets increasing. Looking further, I find that the sockets are associated with the Google Mobile Services (gms = Google Play Services) processes. Since I still haven't rooted my phone or my tablet, I cannot determine which process out of about 4 or 5 gms processes have these sockets open.

Dropped packets are possibly not that unusual, since UDP is a non-reliable transfer protocol. But the leaving behind of receive queue packets is POSSIBLY an indicator that these services have timed out waiting for these replies and although the process is still running, they have abandoned reading of these sockets, thereby leaving the orphaned sockets. THIS IS JUST A GUESS.

This is likely the same problem that mdnsd is having, but on a much more severe level. The mdnsd eventually has so many of these orphaned sockets that it has run out of resources to open new sockets so it loops (burning CPU time and battery power) trying to open a new socket. AGAIN, THIS IS JUST A GUESS.
 
Having the same problem here with my Galaxy S3. It started about a month ago. I was already suspecting that it was the end of S3's lifetime. Now I will try to uninstall Facebook.
 
+1 for Facebook.
In December, I reset my Sony Z1 Compact (Android 5.1.1) to factory settings, installed some apps, and soon saw the mdnsd process draining my battery. Spent much time trying to figure out who was the villain. And finally reset the phone again, uninstalled all apps except ones for phone calls/sms, and disabled Sony apps. mdnds did not appear for several days. Then I started installing apps one-by-one and observing battery usage statistics. When I installed Facebook, mdnsd returned in some hours. Removed FB, mdnsd disappeared. Installed it again yesterday, and mdnsd was back.
So, Facebook definitely causes the wrong behavior of this daemon in my case.
Today I tried googling for 'facebook mdnsd' and found this forum :).
 
I'm running Android 4.4.4 on a two year old Nexus 5 phone & have never had Firefox, Fitbit, or any drone apps installed on it.
My battery life has recently gone completely to ****. Yesterday, I noticed that a process called "mdnsd" had devoured 35% of my battery, dragging it down to just under 10% power, in less than 90 minutes. Last night, it helped itself to some data while I was travelling between wifi zones (only 40kb, but it's a concern, because I'd thought I'd turned off my data)...

Any hoo, if I've understood the gist of this thread, it looks like I'm going to have to uninstall Facebook? :mad:
 
@henryw48 – Thanks for sharing all the hard work that you've done on theis problem. My wife uses an a Samsung tablet and recently the mdnsd problem sometimes renders it unusable. [About] tells us it's model number GT-P5110; Android version 4.2.2; Kernel version 3.0.31 - 2732611 Tue Aug 12 17:58:55 KST 2014 (which doesn't sound 100% up to date to me but heigh-ho!). We are getting very annoyed about this. My own work background is software engineering (but on the IBM mainframe architecture), so while I am happy to discuss matters in technical terms; I am not familiar with Android's nuts and bolts. My question to you, Henry, is this: would your program help diagnose the culprit in our case? I am happy to help any way I can. Today in [settings]>[battery] mdnsd appeared at the top of the league table 36% battery after about a 3 minute wait. I uninstalled the Guardian news app and turned off location services; so far it has seen fit to speed up and is usable, but it has done that before and later gone into the mdnsd loop. I have a copy of the Eclipse Android development environment on my Windows laptop (if that helps at all). Kind regards – John.
 
@jhturner108: - John. Her kernel version and android version are both older than the one on my Samsung Galaxy S3. I suspect the hardware is equally old.

The problem, I'm almost convinced, is that the older versions of the hardware coupled with the old Android version and Kernel version cannot properly handle the traffic that more modern devices can. Older devices are slower and the older software has some bugs that may be fixed in the later releases. So there is basically not a lot we can do except limp along by eliminating software that makes heavy use of the resources.

It appears that most of the recent problems that people have reported here were caused by the latest update to the Facebook app. Uninstalling it and using the web interface to Facebook appears to get rid of the problem for most people. My problem as well as another user's problem was that there was an update in end of Nov 2016 or beginning of Dec 2016 to the Ping & DNS app that caused the problem. Both he and I were already not using the Facebook app on our devices.

As for the script that I wrote, it was just to make it easier for me to see the problem beginning. Prior to writing the script, I was displaying the same information using other means in a more manual way. My script requires the loading of a Python language interpreter also. You are probably better off just using the manual display which I will describe for you.

The app that is necessary to do the manual display is an app that allows you to enter Linux command line commands to retrieve information from the Android OS. The one I use is "Terminal Emulator for Android" by Jack Palevich. It is available in Google Play.

Long before the mdnsd process shows up as using a lot of battery power in the Battery display, there are signs of trouble that just worse and worse until the mdnsd process starts looping and using up all available CPU time and draining the battery. The symptom of the problem is that a "netstat" command displays more than a few "udp" and "udp6" sockets using port 5353 when you run the "netstat" command. An truncated example of this is:

$ netstat | grep udp
udp 0 0 0.0.0.0:5353 0.0.0.0:* CLOSE
udp 4928 0 0.0.0.0:5353 0.0.0.0:* CLOSE
udp 4928 0 0.0.0.0:5353 0.0.0.0:* CLOSE
udp 112320 0 0.0.0.0:5353 0.0.0.0:* CLOSE
udp 112320 0 0.0.0.0:5353 0.0.0.0:* CLOSE
udp 112320 0 0.0.0.0:5353 0.0.0.0:* CLOSE
udp 118208 0 0.0.0.0:5353 0.0.0.0:* CLOSE
udp 127296 0 0.0.0.0:5353 0.0.0.0:* CLOSE
udp 132032 0 0.0.0.0:5353 0.0.0.0:* CLOSE
udp 143040 0 0.0.0.0:5353 0.0.0.0:* CLOSE
udp 159104 0 0.0.0.0:5353 0.0.0.0:* CLOSE
udp 159808 0 0.0.0.0:5353 0.0.0.0:* CLOSE
udp6 0 0 :::5353 :::* CLOSE
udp6 0 0 :::5353 :::* CLOSE
udp6 4224 0 :::5353 :::* CLOSE
udp6 4224 0 :::5353 :::* CLOSE
udp6 4224 0 :::5353 :::* CLOSE
udp6 4224 0 :::5353 :::* CLOSE
udp6 39936 0 :::5353 :::* CLOSE
udp6 39936 0 :::5353 :::* CLOSE
udp6 39936 0 :::5353 :::* CLOSE
udp6 39936 0 :::5353 :::* CLOSE
udp6 39936 0 :::5353 :::* CLOSE
udp6 41344 0 :::5353 :::* CLOSE
udp6 41344 0 :::5353 :::* CLOSE
udp6 57472 0 :::5353 :::* CLOSE

Here the command is "netstat" and the result is filtered by the "grep udp" to eliminate other extraneous output.
The second column of the output is the number of bytes of unprocessed udp input that is waiting to be processed by the owner process. The third column is 0 and the fourth column is a combination of IPv4 (udp) or IPv6 (udp6) address followed by a colon and the udp port number (5353).

If instead you use the command

$ netstat | grep -c 5353
you will get a number indicating the number of lines of netstat output that have the number 5353 in it.

We have found from experience that when the number of lines (sockets) is between 500 and 600, the mdnsd process starts to loop, probably because it is attempting to open another socket, but there are insufficient resources to do that so it ends up in a failure loop. Once that happens, your only recourse is to restart your device.

What you can do is to unload any apps that you know are resource intensive (Facebook, for example) and any other apps that may have been recently updated. Then slowly, one by one, add them back in. After each is added back in, you may not see any of the symptoms described above immediatedly. It sometimes doesn't show up till half a day later, so you'll have to be patient and periodically run the above command.

Sorry, I can't be more help. Feel free to ask any further questions. I look at this possibly once a day.

Henry
 
Hi all,

Thank you very much for all the analysis!

I'd like to add one more data point. I have an LG G2 running Android 4.4.2 and started experiencing exactly the same issue in early January.

After reading the thread I started monitoring the mdnsd activity.

I have been able to avoid running into the problems by disabling Facebook's location history. Since I disabled that a few days ago, the battery usage seems to be back to normal.

How to disable Location History on Facebook to extend iPhone battery life

So any one who has this problem: try to disable everything related to location tracking. In my case, it looks like a recent update of the Facebook app triggered the problem, but there are certainly other apps that may trigger it.
 
If it is facebook and/or messenger, then why is it not affecting my wifes Htc?
Is this a problem with a Samsung update? Maybe just the S3? Do they want the S3 of the market and this is just the way to do it?

Any way I wasnt having any problems up until yesterday. I have had Facebook for over a month with messenger.
I have turned my gps off for years when I dont need it. and my wifi off when I know it is going to be searching.
I didnt have an error with my older samsung.
 
Hi, I have a Sony Xperia Z1 and since a few weeks mdnsd is draining my battery very fast. Android version is 4.4.4
The problem occurs less frequently when location services are turned off, but I still see more and more UDP/5353 entries with netstat.
It's definitely Facebook related, when I terminate FB, all these 5353 entries disappear. You don't have to uninstall FB, just don't keep it running and use a browser to access FB instead.
 
Solved the problem. Got my wife a Galaxy S7 last week. She was having a heck of a time with Facebook and her phone was old.

Got the new one at Costco and got a $250 gift card with it.
 
Hi Henry!
Thanks for that very thorough answer. I would have replied earlier but the problem appears to have gone away. I have been waiting to see if it has /really/ been stopped. We installed ES Task Killer and turned off Facebook's [chat] option. Mdsnd was using over 30% battery & CPU now it is not even mentioned in the task list, so it looks like we (all the team of Android users can claim some credit) -- have found the culprit -- it is (one or more) FB options.
Best wishes -- John.
 
Were you able to get rid of MDNSD? If so, how?
I have the S3. I used the ES explorer. I went to device/system/bin and found the file Mdnsd. I opened it with text and deleted about 4 lines of jiberish and then I also tried to move it to another directory, I think I chose .tmp. After a reboot it is gone in my settings/battery. I hope it stays gone.
 
Some of the users (possibly indirectly through mdnsd) of UDP port 5353 on my phone were HP Printer Server Plugin, Samsung Printer Server Plugin, ES File Explorer File Manager, Xfinity WiFi and the Google Play Services (GMS = Google Mobile Services -> supports multiple Google apps). I attempted to uninstall various combinations of these without achieving zero increase in number UDP and UDP6 sockets on port 5353.

If you install this SockStat app you can monitor all the active sockets in use. Lightweight utility that allows a quick, handy way to 'Force stop' some background process you think is causing a problem.
https://forums.androidcentral.com/e...ls?id=com.powl1.sockstat&hl=en&token=rGX7OeU9

You might also want to add a firewall app to your phone so you can selectively block/allow individual apps and processes online access for both cellular and WiFi. If you're rooted AFWall+ is a really good firewall app, if not NetGuard is a good option.

https://forums.androidcentral.com/e...etails?id=dev.ukanth.ufirewall&token=SJOS1ndy
https://forums.androidcentral.com/e...id=dev.ukanth.ufirewall.donate&token=qKrNcIQ6

https://forums.androidcentral.com/e...etails?id=eu.faircode.netguard&token=cC2Pdwaj
 
Coming strictly from a layman's perspective, I add my name to the lengthy list of frustrated LG G3 mdnsd daemon sufferers. My only "tech" experience is one college class of Algol coding in 1975.

My approach therefore was more from a desperation approach than knowledge-based action.

First I read the myriad of blogs that left my head reeling.

Background: I uninstalled or disabled every app I knew I would never use, immediately upon getting my phone. I have never used FB and don't fly a drone (yet).

My procedure: I uninstalled Firefox. I checked to make sure my phone was current with updates.

I followed procedures to re-calibrate my battery, 3x. Cleared cached info. No help. Then yesterday I individually enabled each disabled app, took all permissions away, cleared cache and data, and re-disabled. Then I moved my pictures (all197) over to another device. I also checked "restrict apps in background" under battery saver. Rebooted phone and charged to 100% again.

I have no idea which action did the trick; perhaps it was a combination, or even just me believing I could overcome this little monster, but it took my nasty little daemon off my phone (and also the no-name one) and my battery is back to normal.
 
I solved my mdnsd issue with my android phone. I discovered that my browser on my flex phone was the issue. My browser was simply titled Browser and was the on that originally came on my phone, its icon was a globe. I found in my searches about my browser that is was possibly a mozilla browser. One WARNING if you are going to try my suggestion is to save your favorites and any information that is saved in your browser by backing it up. I downloaded the Microsoft Edge and Google Chrome before making my attempt to do away with mdnsd permanently. After downloading the new browsers I went to, apps, all, browser, then stopped the browser and chose disable. It deleted all of the info associated with the browser. I restarted my phone and waited three hours, since my battery info displays info from the last 3 hours. After three hours mdnsd was gone forever. I was able to use the other browsers during those 3 hours and it was no longer on the list. My battery now has normal usage times. I hope this works for you, however do remember to back up your info before deleting the browser.
 

Trending Posts

Members online

Forum statistics

Threads
957,051
Messages
6,971,215
Members
3,163,693
Latest member
Ap2300