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

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.
 

henryw48

Active member
Dec 22, 2016
32
0
0
Visit site
Hi,

I also have a Samsung Galaxy S3 phone and recently started having the same problem.

I did not recently download Firefox. I think I may have downloaded it once before and then deleted it because of some problems. I do not have any of the other apps that have been associated with this problem.

I've done a little investigating. I still don't know what is causing the problem.

There is a /system/bin/mdnsd program in my system. It seems to be running all the time (determined by doing a "ps | grep dns" when using the "Terminal Emulator" app). However, it normally does not use lots of CPU time == fast battery drain. When displaying the "Battery" under the Settings app, it would not normally appear.

When I do have fast battery drain, it does appear in "Battery". Clicking on the program, it displays the CPU total and the Data received and sent via WiFi as well as via the mobile network. I can see that there's much activity. The CPU total value goes up and up with each refresh. I've had it use hours of CPU time in a few hours. This is high activity and would cause the battery drain that we're seeing.

The /system/bin/mdnsd process is run under the mdnsr user id (again from the "ps | grep dns" in the Terminal Emulator app). I did Google search on mdnsr and found nothing except mDNSResponder which apparently was ported from Apple IOS and implements the Multicast DNS communications protocol. Given that and the fact that there is activity on both WiFi and mobile data, I would take a FIRST GUESS and say that that is what the mdnsd program is doing.

My GUESS is that mdnsd is attempting to locate nearby devices and runs O.K. most of the time. However, under some as yet unknown to me circumstance, it will enter into a loop and use up the CPU time. The loop may be getting triggered by some program, such as "Firefox" as several people have indicated, or it may be getting triggered by some information that it is getting back from the network. Thus it MAY be location sensitive.

As for recovering from the problem, I have found I had to restart my device. This will reset the /system/bin/mdnsd process to not be looping. As others have indicated, the mdnsd will still show as high user in "Battery", but that is only because this is historical data that does not get reset until the battery is fully recharged. If you click on the "mdnsd" process you will find that the CPU time is not constantly increasing with each refresh, so you are O.K.

Henry
 
Last edited:

NancyinWI

Member
May 18, 2013
20
0
0
Visit site
Hi,

I also have a Samsung Galaxy S3 phone and recently started having the same problem.

I did not recently download Firefox. I think I may have downloaded it once before and then deleted it because of some problems. I do not have any of the other apps that have been associated with this problem.

I've done a little investigating. I still don't know what is causing the problem.

There is a /system/bin/mdnsd program in my system. It seems to be running all the time (determined by doing a "ps | grep dns" when using the "Terminal Emulator" app). However, it normally does not use lots of CPU time == fast battery drain. When displaying the "Battery" under the Setup app, it would not normally appear.

When I do have fast battery drain, it does appear in "Battery". Clicking on the program, it displays the CPU total and the Data received and sent via WiFi as well as via the mobile network. I can see that there's much activity. The CPU total value goes up and up with each refresh. I've had it use hours of CPU time in a few hours. This is high activity and would cause the battery drain that we're seeing.

The /system/bin/mdnsd process is run under the mdnsr user id (again from the "ps | grep dns" in the Terminal Emulator app). I did Google search on mdnsr and found nothing except mDNSResponder which apparently was ported from Apple IOS and implements the Multicast DNS communications protocol. Given that and the fact that there is activity on both WiFi and mobile data, I would take a FIRST GUESS and say that that is what the mdnsd program is doing.

My GUESS is that mdnsd is attempting to locate nearby devices and runs O.K. most of the time. However, under some as yet unknown to me circumstance, it will enter into a loop and use up the CPU time. The loop may be getting triggered by some program, such as "Firefox" as several people have indicated, or it may be getting triggered by some information that it is getting back from the network. Thus it MAY be location sensitive.

As for recovering from the problem, I have found I had to restart my device. This will reset the /system/bin/mdnsd process to not be looping. As others have indicated, the mdnsd will still show as high user in "Battery", but that is only because this is historical data that does not get reset until the battery is fully recharged. If you click on the "mdnsd" process you will find that the CPU time is not constantly increasing with each refresh, so you are O.K.

Henry

I'm having the same problem since Monday. I can watch my battery drain on my S5 . Even if I'm not using the phone, it drains about 10% an hour. Never had Firefox or drone app. Battery usage from it is 18%. Total of over 7 hours. That means something is running in the background because I haven't used the phone much today. Down to 40%. I just can't figure out what it is. I'm trying to hold out until March for the S8 release, but I'm going on vacation in February and can't have a phone that I can't use because of battery drain. I've cleared the partition cache which has corrected the problem in the past. This time, it didn't. I'm extremely frustrated.
 

henryw48

Active member
Dec 22, 2016
32
0
0
Visit site
Going to the "Settings" app and find and click on "Battery". This should display the name of the program that is using the most battery by using the most CPU time. In my case and in the case of the person who posted the question, the cause is the "mdnsd" process. From what you've given, it is not yet clear that you are having the same problem.

As I said in my reply, my only temporary relief is to restart the phone when I see this happening. It is not a solution to the problem. However, it will keep the battery from being run down. Upon further investigating, it appears that "mdnsd" is a system program supplied with Android so it probably cannot be removed. However, probably another program or app is causing it to activate. When activated, it usually runs without a problem. However, something else is happening, possibly something going on in the network's "neighborhood", to cause it to loop, eating up CPU time and battery power. Restarting the device clears this. The "Battery" will still show the process with high battery drain after the reboot, but if you click on the program, you won't see the CPU time constantly increasing. The "Battery" shows the process with high battery drain because it is working with old accumulated data that does not get reset until you've completely recharged your battery. As long as the "CPU time" doesn't keep on increasing after the restart, your battery will not really be draining very fast.
 
Last edited:

NancyinWI

Member
May 18, 2013
20
0
0
Visit site
Yes I'm having the same issue with the mdnsd which is why I replied to this thread. You look in Settings, not Setup. My battery is fully charged and it cleared usage. However, my battery is draining so fast, it says I have 4 hours left on it. The only thing I've opened is my mail and this forum and the mdnsd is back.
Something continues to make it drain the battery. It's been going on since Monday. It could just be my battery but I bought it new about a year ago when I was having issues.
 
Last edited:

henryw48

Active member
Dec 22, 2016
32
0
0
Visit site
I stand corrected. It is "Settings". If "Battery" is showing the "mdsnd" process as using a lot of battery, the problem is not with your battery. If you click on the "mdsnd" you will see how much CPU Time it is using. For me, while it was running, it became a more and more significant percentage of the elapsed time.

I suspect also that there are external causes for this problem. My phone was last updated over a year ago and did not have the problem. The problem only started a few weeks ago. The only external influence would be something on either the WiFi, the phone's mobile data network or the location where I am connecting to these networks. I've been spending a significant amount of time at my mom's apartment lately. Yesterday, after I had just spent about a 1/2 hour there. I noticed later that "mdsnd" was using a lot of CPU time again. I restarted and I was O.K. for the rest of the day.

I was also able to determine that "mdsnd" is a process that has to do with resolving names in URL's and is related or a port of the "mDNSResponder" program. Doing Google of mdsnd looping also gave me some results which I need to investigate. Will also look into mDNSResponder looping.
 

NancyinWI

Member
May 18, 2013
20
0
0
Visit site
I will be interested to see what you find out.
I haven't been able to do a phone update in over a year because I have no storage room even with all my photos and music on a micro SD card.
And as an experiment, I restarted the phone and turned off location services. No mdnsd usage but the battery is still draining. Lost 4% just writing this reply. 7 minutes on battery and only 3 hours left.
 

henryw48

Active member
Dec 22, 2016
32
0
0
Visit site
Did the mdnsd stay away? The battery would be draining when you're replying to this because it has to make the display bright and also process what you're typing. Did the draining stop after you stopped sending or doing anything else?
 

NancyinWI

Member
May 18, 2013
20
0
0
Visit site
Yes it has stayed away since turning off location. The battery shouldn't and hasn't drained 4% in the time it takes to write one reply. I could be on my phone for an hour and have the battery only drop 15%
 

henryw48

Active member
Dec 22, 2016
32
0
0
Visit site
Yes. It probably came back soon after you had looked at it and noticed it hadn't appeared in Battery. It won't show up immediately until it has accumulated enough CPU Time. Wasn't sure that turning off location services would do much.

The "dns" part of "mdnsd" (I think it may stand for Multicast Domain Name Service Daemon) is the service that queries the internet Domain Name Servers (DNS) to do lookups of Internet URL's. Thus, if you do anything that requires network connections, such as using your browser, sending and receiving E-mail, using any app that looks up things on-line, DNS is involved. If you're E-mail is set up, DNS is used to query your internet service provider's E-mail service. If you use any of the social apps such as Facebook, Twitter, etc. it would also use DNS to locate those services. I'm not sure if the mdnsd is the connection to all these services or whether there is another, in which case, mdnsd is used only to locate local devices such as a network printer, etc.

By the way, thanks for all the input you are providing. It's good information.

I won't be able to do a lot each day because I'm also in the process of trying to get help for mom or help her myself. I'll do what I can.
 

kc4ojm

Member
Sep 16, 2011
6
0
0
Visit site
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.

Here is a guess? How many folks that just started having this issue have the Fitbit app installed? They released an update December 12th, about when the problem started for me, and the app uses Internet dns and location services. Just a guess. I forced stopped Fitbit and will see what happens for a few days and report back.
 
Last edited by a moderator:

henryw48

Active member
Dec 22, 2016
32
0
0
Visit site
I don't have a Fitbit app.

Went over to mom's again this afternoon. As soon as I got there, I noticed that I had the "mdsnd" running away with the CPU time. I turned off WiFi and bluetooth, but did not turn off the mobile data. I then restarted the phone at 3:00 PM to clear the problem. I did not recharge the battery but instead monitored using "Settings" -> "Battery". The CPU total for "mdsnd" was stopped at 34m 46s. It did not change. I later turned on bluetooth and then later turned on WiFi. At first I connected the WiFi to an Xfinity hotspot and then about a 1/2 hour later connected to the encrypted hotspot at my mom's. I even turned off WiFi again and back on letting it auto reconnect to my mom's encrypted hotspot. The CPU time stayed at 34m 46s for a few hours. I'm home now and my CPU time is now 34m 49s. Looks like the problem doesn't reproduce easily without knowing what is going on in the internet. I'm not sure that the problem is necessarily at my mom's environment. Also don't know if it may have tried to connect to some random hotspot along the way to mom's. To be continued.

Did some more checking. Have found that "mdnsd" is indeed related to "mDNSResponder".

Have also found man pages for both:

mdnsd (Linux Reviews)

https://www.daemon-systems.org/man/mdnsd.8.html

and source from apple:

https://opensource.apple.com/source/mDNSResponder/mDNSResponder-214/mDNSCore/mDNS.c

HOWEVER, these are PROBABLY NOT THE VERSIONS BEING USED on the Android. This is just to give me some idea of what this program did on their respective systems. The underlying protocol may not have changed much.

After further looking, the relationship between Firefox and mdnsd or mDNSResponder is wider than just the Android platform. It appears that mdnsd is a daemon, as I had suspected. This means it starts and runs in the background and may not be directly loaded by programs such as Firefox. Programs such as Firefox wake this process up by using internal (to the device) communications between the two processes. The caller program can be any program that wishes to use this service, which is why we see this problem even though we are not running Firefox.

At some point I would like to figure out how to access the system log, if that is possible without running a rooted system. The log may have some further information as to what is happening.
TO BE CONTINUED.

mdnsd is also an implementation of a protocol to discover local devices on the local internet. This is used to among other things discover network connected printers.

For the time being I will see what happens when I disable my network printer that uses HP's printer interface.

Link to some documents about what mdsnd discovers:

https://developer.apple.com/library...ction.html#//apple_ref/doc/uid/TP40002445-SW1

Disabling the printer device in "settings" -> "More setings" -> "Printing" did not make the problem go away.

I am seeing the problem while at my home also.

Doing a "netstat" in the "Terminal Emulator" app when I see the problem, I see many sockets of type "udp" and "udp6" on port 5353 that are in the "CLOSE" state but with several thousand bytes in the "Recv-Q". When things are running normally, I just see a few of these sockets and the Recv-Q is 0. Later, I noticed that as I continued to run even when the mdnsd process was not in a hard loop, the number of the "udp" and "udp6" sockets on port 5353 with CLOSE state and several thousand bytes in the "Recv-Q" grew slowly. It almost appears as if when this growth is unchecked, some resource runs out and "mdnsd" goes into the hard loop failure mode.

This is possibly just another symptom of the problem in that the "mdnsd" process is failing to read its socket in a timely manner.

In my earlier searches, I did see someone compalining about a bad file descriptor error on a select, so this is probably the cause of this large unserviced queue.

Henry

Because of an idea I was trying, I ended up disabling and re-enabling the Verizon Cloud app. This caused the latest version to get loaded. Noticed that it has been changed from what I had. Checking, I found that it had been updated to version 16.5.33 dated Nov 30, 2016. Don't think that this would affect problem, but thought I would record it anyway.
 
Last edited by a moderator:

henryw48

Active member
Dec 22, 2016
32
0
0
Visit site
What I see is happening is that netstat shows almost 600 sockets split between UDP and UDP6 on port 5353 (multicast DNS == zeroconf == Apple bonjour auto-discovery), each with several thousand to over a hundred thousand bytes queued for receive each time when mdnsd starts looping. My current GUESS is that amount of resource utilization is causing the further opening of sockets in mdnsd to fail causing the hard loop. I see this build up gradually over a period of time when mdnsd is not looping, but then when it reaches over 200 sockets on UDP and 300 sockets on UDP6, mdnsd starts looping. So this doesn't appear to be happening all of a sudden, but is gradually built up until there is a failure.
 

alexdiazaldas73

New member
Dec 27, 2016
1
0
0
Visit site
Hi, My wife have a galaxy note 3 with the same problem.... I have using her phone for a few weeks and then make a factory reset a return to her 3 weeks ago and she started to have battery problems inmediatly (problems that she did not have with a huawei that she was using).... (and by the way I never had battery problems when I was using the note 3).....
One intesresting factor can be that I am not a Facebook fan and I do not installed the facebook app while I was using the note 3, My wife however can't live without Facebook, so she install Facebook the firs day that I returned the phone to her....( another remarkable info is she was using facebookint his phoine before she borrow me the note 3 about 8 weeks ago,,, and she did not have this battery problem...so is not facebook the problem or maybe is a facebook recently upgrade that is causing that....)..... saddly I ask to her not use facebook for a few days so I can determinate if this is the aplication that is causing the problem but that is imposible for her .... she can't live without the damm fb.....
By the way when I was using the note 3 i rooted the phone... so the phone is rooted, I don't know how I can check wich one is the aplication using the mdnsd process ... but if somebody here say me how.... I can do it.... so we can determinate if it is Facebook or some another software that my wife installed in her phone....
thanks in advance for any help.....
 

henryw48

Active member
Dec 22, 2016
32
0
0
Visit site
alexdiazaldas73: Thanks for the offer. If I come up with something to check, I'll let you know.

I have found that the Print Service Plugins use the UDP port 5353 information that mdnsd uses. I had both Samsung Print Service Plug-in and the HP Print Service Plug-in. The first came with the phone and the second was downloaded from Google Play when I was having problems accessing my Wi-Fi printer. The Samsung Print Service Plugin description under Google Play in the Permission details section says under Other permissions that it allows Wi-Fi Multicast reception.

Also once the Plug-in is installed, there is no way to completely uninstall it. Hitting Uninstall just removes all the updates.

I guess I can look at the permissions for all the other apps that I have to see if any other mentions the use of Multicast. Don't have time to do that right now.
 

henryw48

Active member
Dec 22, 2016
32
0
0
Visit site
I thought I had corrected the problem on my Samsung Galaxy S3 phone. I uninstalled the updates (could not do a complete uninstall) to both the HP Print Service Plugin and the Samsung Print Service Plugin and restarted the phone. I then reinstalled just the update to the Samsung Print Service Plugin. The printer is working and I no longer (for the past 5 hours) see any more UDP (or UDP6) 5353 sockets listed with thousands of bytes on the Recv-Q.

However, the UDP 5353 sockets came back so the problem is still there. :-(

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.

The other thing I've been noticing is that the majority of the problems with increasing numbers of UDP sockets is during normal waking hours in the US. At night, this doesn't appear to happen or seldom happens.

GUESS: I'm wondering if some device on the network is sending UDP port 5353 or UDP6 port 5353 packets that are indecipherable by mdnsd, causing it to take a long time and fail. This is possibly not happening, because, on one test, I had blocked the transfer of UDP 5353 packets from going over the Internet using WiFi using my Wifi router. However this did no stop traffice going over the Mobile Data link. Also, a lot of the packets are multicast packets, which don't get forwarded by a router.

I also noticed that as the number of UDP and UDP6 sockets increases, so does the packet drop rate as reported by /proc/net/udp and /proc/net/udp6.

Another GUESS: It almost appears as if the mdnsd is periodically POSSIBLY getting overloaded by traffic on the ports. The alternative possibility is that something is running on my phone making the extracting of the packets very slow or stop.

Another thing I noticed was that in addition to sometimes causing mdnsd to go into a loop, sometimes the many UDP 5353 sockets is possibly causing a restart of my phone. I had noticed yesterday, that as the number of sockets approached the critical 500+ sockets, my phone restarted by itself at least twice.

Henry
 
Last edited by a moderator:

jeffhaskins

Well-known member
May 2, 2016
338
0
0
Visit site
One thing seems to be certain, it is definitely a Samsung issue reading through this thread. Those of you that are able to, try flashing CM or or some other AOSP ROM and see if the issue goes away.
 

henryw48

Active member
Dec 22, 2016
32
0
0
Visit site
I don't think so Jeff. I've seen reports for the same problem on Droid and HTC. To me, it is a recent update to some app OR there's something going on in the network.

Some other observations.

In addition to the number of sockets increasing, I've also noticed that the "ps" command is showing that the amount of memory being used by the mdnsd is slowly increasing. As I had said earlier the number of dropped packets is increasing. Given the two, am wondering if mdnsd is having trouble keeping up with the traffic, possibly because it is extracting information from the packets and saving it. Hope it is not doing a linear search through a table of values to find a place to save it. More GUESSing. With some recent (November, beginning of December) updates to some apps, there is more UDP traffic being transmitted and received. All of the sockets that have Recv-Q are owned by mdnsd.

Without knowing the processing power of the other devices that are having this problem, I might GUESS that some of these devices might be obsolete in that they are too slow and cannot keep up with the increased traffic demands. This is just a GUESS, although it is a way of planned obsolescence. My Samsung Galaxy S3 is over 4 years old.

I also have a Samsung Galaxy Tab S that has no phone and therefore no mobile data. It just has WiFi. It is much faster and does not exhibit the problem. One of the tests I had performed earlier was to turn off mobile data on my phone to see if I still had the problem. I still did. Likewise, I had turned off WiFi and left mobile data on. I also still had the problem.

Henry
 
Last edited by a moderator:

Trending Posts

Forum statistics

Threads
943,195
Messages
6,917,731
Members
3,158,870
Latest member
RandyRoyalty