Our build bot Mac mini has a big problem since a few weeks: It seems that usbmuxd will open plenty of sockets and let them linger around.

At some point, there are more than 50000 sockets opened in netstat and lsof, and no other connection is possible on the computer.

In the console, I see a lot of messages like these:

30/10/2014 11:22:25,975 com.apple.usbmuxd[81562]: _SendAttachNotification Device xx:xx:xx:xx:xx:xx@fe80::xxxx:xxxx:xxxx:xxxx._apple-mobdev2._tcp.local. has already appeared on interface 4. Suppressing duplicate attach notification.

Everytime this message appears, 2 sockets are created and linger in "CLOSE_WAIT" state:

$ sudo lsof -i -n -P 
usbmuxd   81562       _usbmuxd 1270u  IPv4 0x880c67ed43a38017      0t0  TCP> (CLOSE_WAIT)
usbmuxd   81562       _usbmuxd 1271u  IPv6 0x880c67ed3a50a4f7      0t0  TCP [fe80:4::xxxx:xxxx:xxxx:xxxx]:55184->[xxxx:xxxx::xxxx:xxxx:xxxx:4529]:62078 (CLOSE_WAIT)
[... 1000's of lines like this]

Note also that this appears to be the case only when my iPhone 4S is not connected through wire to the Mac. As soon as I plug the device, the count of lingering sockets stops increasing.

Restarting the usbmuxd service seems to drop all open connections, so this is a temporary solution (but we have to do it every hour (!)).

Anybody have a hint on what is happening?


I had the same problem: As soon as iTunes was started, the count of sockets in CLOSE_WAIT grew until the machine was out of sockets.

This must have been a bug in usbmuxd and seems to be fixed in iTunes 12.1: zero dangling sockets for half an hour on my machine.


I had the same issue with my MacBook when I was away from home, it seems a NAS share couldn't be closed and the CLOSE_WAIT connections were just sitting there.

I don't really get why the usbmuxd process get all the connections assigned to it (or maybe it is because I access internet from the iPhone plugged in USB when I'm not home ?).

I unmounted it manually from the command line (with -f) and all connections are gone.

Identify the target of the socket and why it is still there (in my case mounted afp share).


the issue appears to have been fixed in iTunes 12.1 - at least on my system.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .