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.
 
Yes - restarting the device will restart the service and clear the problem. It is however a bit more invasive and manual than what I am hoping to achieve. It would mean I would have to remember keep checking. I have a script that loops every 5 seconds and is doing netstat | grep -c 5353 and that tells me the current count, but unless I remember to go check every 30 minutes it has a tendency to drain the battery while I am out shopping.

Interesting that others seem to be having problems with facebook app. I don't use the facebook but looking at the permissions on play store, it doesn't have permission to access the mdnsd service, so it would not directly trigger the bug I found directly. It does however have rights to change both wifi (CHANGE_WIFI_STATE) and mobile data (CHANGE_NETWORK_STATE) - which it could be doing and hence causing the problem indirectly by making network configuration changes that mdnsd, (which something else has already used) is reacting to - many other apps have that permission too. I guess this means that the problem could be made worse by a combination of 3 or more apps, all interacting.
 
If you want to minimize chances of mdnsd looping, turn off storing your location history in Google and Facebook. I used to get mdnsd restart almost right away after I restart the phone with Google Locations on. When I turned it off I went on for almost a day without mdnsd until I started FB. Now trying FB without location history too.
 
@oleksiy1978: Interesting. Wonder if it was the storing of the locations or the determining the location that was causing that. Determining Location in HIgh Accuracy mode, in addition to using GPS, also uses the WiFi and mobile networks to get the location. This would put additional traffic on the network or, more specifically, on the device having to receive the additional traffic and process it.
 
Yes high accuracy is on. First I will try turning locations back on in Google and FB to confirm that it brings back the mdnsd loop for me. And then I will switch to GPS only for locations, to test if it is in fact accessing wifi and cell networks that is causing the loop to form.
 
An update on what I have achieved ...

Having rooted the phone, I found that regularly (every 30 minutes) restarting the mdnsd service reset the count of sockets it used and kept them at a fairly small number. However after a day, the maximum number it would go to went to about 50, and then wouldn't go beyond 3. Every restart of the service, it would release then re-open 3 sockets and never acquire any more. The implication therefore is that the sockets are being released by mdnsd but not freeing the resources in the underlying networking. The good thing was however, that with mdnsd now limited to 3 sockets, the CPU load problem, and hence the battery problem never reappeared, so it looked like a combination of out-of-resources in both mdnsd and in the underlying networking that caused the CPU problem on my phone at least. While this seems to solve the battery problem, I am not sure if mdnsd will continue work as expected as it is will still be trying to acquire sockets it can't get - hence the proper fix would have to be restarting the phone. So I went to the next step.

I extracted a copy of the mdnsd executable file from an Android lollipop (5.0) phone, courtesy of Google's Android Studio and their pre-built Android emulators, making sure it was for the same 32bit ARM type of CPU. The file was twice the size of one on my phone, but that was because it has been build using static libraries (libraries included in the executable rather than linked to shared libraries as the Kitkat executable was). The advantage of using static libraries is that it makes it less of a risk that something changed in the underlying Lollipop libraries. I copied the mdnsd executable onto Android Studio's 32bit ARM Kitkat build - and it appeared to run, start, stop etc without any problem. I have now replaced the one on my real Note 2 and it seems to be working as normal - the number of sockets is back to one per 5353 port for IPV4 and one for IPV6 and it never goes up - which is exactly the behaviour I would expect to see. The broadcasts are appearing on the network as before, so it looks like it is working properly at last.

I am now monitoring and will see how it goes after a few days, but I expect removing the underlying bug in the Kitkat mdnsd by putting in a proper build will fix the battery problem for me once and for all and make sure printing and all the other things mdns is used for keep working. Unless that is Samsung issues a firmware upgrade from 4.4.2 to 4.4.4 - which is very very unlikely - when I would have to re-replace the file. If Samsung upgrade Note 2 firmware to V5 Lollipop (also very very unlikely) or V6 Marshmallow (you have to dream don't you) - then the problem will be fixed anyway.

While this solution does require rooting the phone to swap the file, so it is not for the faint hearted, it can be un-rooted again straight after, which I will do for safety reasons once I know it is working.
 
Hi everybody. I have Note 2, 4.4.2 android not rooted. First I noticed battery drain few weeks ago- cannot say more precisely, i carry 2 extra batteries with me just in case :)
To make a long story short I uninstalled FB app and the mdnsd drain stopped. Do you know if using web-based FB on the phone would bring this dreaded bug back?

I forgot to mention one more nasty thing which I associate with mdnsd: the phone would turn itself OFF every 3-4 hours.
I suspect the battery overheat was doing it. Anybody else noticed this? I am running FB app free for an hour now, mdnsd did not use a sec of my CPU time. Thank you forum, I hope it is the solution in my case. I still have to learn how to live without FB on my phone :)
 
Last edited by a moderator:
Hi, DanYou - I found that mine locked up - it didn't actually switch off but simply froze and the battery continued to drain. I had to force a power-off (on my Samsung Note 2 holding the off button for 10 seconds did the trick), then release and power back on. (On many phones, force power off is now hold volume down and power)

Interesting about facebook because I have never had the facebook app installed and still had the problem. I think something changed elsewhere and a combination of facebook and/or other things are triggering the bug in mdnsd.
 
Timinaust, mine actually locked up too, in addition to shutdowns. I am running FB app free for one day and have my life/phone/battery back :). I added shortcut of web-based FB page as a shortcut to home page so I all well. In your case you will have to find another app using same process running wild. Good luck!
 
@CarolaVw: Thanks for the update. Did you try using browser (web) based FaceBook? The app is a resource hog, but maybe the browser based one may work. Based on one of the other respondents, another thing you might try is turning off high accuracy (WiFi + mobile data) based location services if using the Facebook app.
 
@henryw84 I'm using the web based facebook. This is causing no problems.
I can try to turning off the high accuracy based location services if I know how I do that.
Further today the facebook app reseaved an update. But I'm scared to try using it again.
 
@CarolaVw: Thanks for the feedback. Good to know. In settings, if you tap on the word Location, you'll see "Mode". Tap on that to see the options. If you have a GPS on your device, use "GPS only". Otherwise, go back to previous screen to turn off Location.

You don't need to do this test unless you want to try the Facebook app again with High Accuracy turned off. I'm curious, so I have loaded the latest Facebook app again and am trying it.
 
I have just uninstalled the Facebook app on my Samsung Galaxy S3. At first it ran o.k. Later on I noticed that my battery was running warm. Looking, I found that mdnsd was not the problem. It appeared to be fine. However I did notice that the battery drain was considerable. Looking at the udp sockets there were about 25 distributed between udp and udp6, with most of them having a large recv-q. After some time, I noticed that my device appeared to have restarted. There was no mdnsd process and the udp sockets on port 5353 were gone. The system was still running very, very sluggishly and still chewing up battery power. From there it kept on getting worse when the phone entered a restart loop. Had to get into settings/application manager and uninstall Facebook as soon as I could after a power down / power up.
 
@henryw48 my location services were already off as well as the gps. Because I never used it. Also before the mdnsd problems this service was turned off.
I'm going to try the facebook-app again, sinds it was updated. Maybe someting is changed.
 
Just thought I'd chime in with an update. I've been following along the last couple of weeks in hopes that one of you more technologically savvy folks uncover a solution to this problem. I appreciate your efforts.

Two days ago I uninstalled the Facebook app and Facebook Messenger. I took advice found in this forum and put a shortcut to web-based Facebook on my home screen. Since then, I have not had mdnsd show up as a user of my battery at all, and the life of the battery has been what I would expect of my Droid Maxx. Everything seems to be working just fine.

Thanks again for the investigation you've all done!
 
So, a few days ago the facebook-app was updated. And since I'm using the app again, the mdnsd did not show up in the battery. So, I think I have tackeled the problem on my phonr.
 
Same problem then battery overheated using maps for GPS and died after. Got new battery, did factory reset got rid of mdnsd and it stayed gone until I reinstalled Facebook and Messenger and there it was again. Another factory reset and it's gone again and Facebook and Messenger not being reinstalled! I never had Firefox on my phone, never had drone software installed and this is the only thing I've found so far that has got rid of it. Fingers crossed, very annoying.
 
I have it narrowed down to Facebook video player. If you go to settings, app manager, running, you'll see 1, 2, or 3 FB apps. I force stop the two add-ons and the mdnsd stops. This is my second s4, in the last week. Same problem. Facebook doesn't give a ****, I tried telling them with no reply.
 
I have a Note 3 and started having this problem a few weeks ago. Definitely draining battery at a high rate. Probably an app that updated with a bug in it but dang if I know which one. Monitoring for any info, thanks.

Same here Note 3 started burning battery last month. mdsnd is using about as much as the screen.
 

Trending Posts

Forum statistics

Threads
957,048
Messages
6,971,191
Members
3,163,689
Latest member
nemismom