viernes, 23 de enero de 2015

WiFi problems on Yosemite 10.10.2 - further investigations

Hi,

I upgraded today to Yosemite 10.10.2 beta (14C106a) but WiFi connection is still broken.

I've been doing some tests and it seems I can reproduce the issue consistently.

First, I installed nagios-plugins to use check_http and check_dns tools. I'm using both tools to check both TCP and UDP packets.
# brew install nagios-plugins


Then, I have used an bash command to get some log:
---

while true; do /usr/local/sbin/check_http -H www.google.es -I www.google.es -u / -t 3; /usr/local/sbin/check_dns -H www.google.es -s 8.8.8.8 -t3; netstat -n | wc -l ; sleep 1; done


I'm recording the average time to get the google homepage (TCP/80), then a DNS request (UDP/53) and finally I get the number of current connections on the system
-----
HTTP OK: HTTP/1.1 200 OK - 19221 bytes in 0,242 second response time |time=0,241633s;;;0,000000 size=19221B;;;0
DNS OK: 0,066 seconds response time. www.google.es returns 201.218.92.144,201.218.92.148,201.218.92.152,201.218.92.154,201.218.92.155,201.218.92.159,201.218.92.163,201.218.92.165,201.218.92.166,201.218.92.170,201.218.92.174,201.218.92.176,201.218.92.177,201.218.92.181,201.218.92.185,201.218.92.187|time=0,066390s;;;0,000000
     188
HTTP OK: HTTP/1.1 200 OK - 19206 bytes in 0,200 second response time |time=0,200444s;;;0,000000 size=19206B;;;0
DNS OK: 0,074 seconds response time. www.google.es returns 201.218.92.144,201.218.92.148,201.218.92.152,201.218.92.154,201.218.92.155,201.218.92.159,201.218.92.163,201.218.92.165,201.218.92.166,201.218.92.170,201.218.92.174,201.218.92.176,201.218.92.177,201.218.92.181,201.218.92.185,201.218.92.187|time=0,073538s;;;0,000000
     188
HTTP OK: HTTP/1.1 200 OK - 19190 bytes in 0,637 second response time |time=0,637000s;;;0,000000 size=19190B;;;0
DNS OK: 0,066 seconds response time. www.google.es returns 201.218.92.144,201.218.92.148,201.218.92.152,201.218.92.154,201.218.92.155,201.218.92.159,201.218.92.163,201.218.92.165,201.218.92.166,201.218.92.170,201.218.92.174,201.218.92.176,201.218.92.177,201.218.92.181,201.218.92.185,201.218.92.187|time=0,065658s;;;0,000000
     188
HTTP OK: HTTP/1.1 200 OK - 19209 bytes in 0,161 second response time |time=0,160687s;;;0,000000 size=19209B;;;0
DNS OK: 0,127 seconds response time. www.google.es returns 201.218.92.144,201.218.92.148,201.218.92.152,201.218.92.154,201.218.92.155,201.218.92.159,201.218.92.163,201.218.92.165,201.218.92.166,201.218.92.170,201.218.92.174,201.218.92.176,201.218.92.177,201.218.92.181,201.218.92.185,201.218.92.187|time=0,127478s;;;0,000000
     188
HTTP OK: HTTP/1.1 200 OK - 19214 bytes in 0,225 second response time |time=0,225001s;;;0,000000 size=19214B;;;0
DNS OK: 0,062 seconds response time. www.google.es returns 201.218.92.144,201.218.92.148,201.218.92.152,201.218.92.154,201.218.92.155,201.218.92.159,201.218.92.163,201.218.92.165,201.218.92.166,201.218.92.170,201.218.92.174,201.218.92.176,201.218.92.177,201.218.92.181,201.218.92.185,201.218.92.187|time=0,062449s;;;0,000000
     188
HTTP OK: HTTP/1.1 200 OK - 19214 bytes in 0,252 second response time |time=0,251791s;;;0,000000 size=19214B;;;0
DNS OK: 0,063 seconds response time. www.google.es returns 201.218.92.144,201.218.92.148,201.218.92.152,201.218.92.154,201.218.92.155,201.218.92.159,201.218.92.163,201.218.92.165,201.218.92.166,201.218.92.170,201.218.92.174,201.218.92.176,201.218.92.177,201.218.92.181,201.218.92.185,201.218.92.187|time=0,062686s;;;0,000000
     188
HTTP OK: HTTP/1.1 200 OK - 19203 bytes in 0,180 second response time |time=0,179877s;;;0,000000 size=19203B;;;0
-----> I start utorrent here <-----
CRITICAL - Plugin timed out while executing system call

     216
HTTP OK: HTTP/1.1 200 OK - 19181 bytes in 0,186 second response time |time=0,185636s;;;0,000000 size=19181B;;;0
CRITICAL - Plugin timed out while executing system call
...


When I turn off torrent and number of connections back to 188, checks go to a "OK Status".

It seems it doesn't depend on a specific number of connections. And it seems that UDP is more resilient than TCP to failures.

I'm wondering if it has something to do with an internal QoS for outbound connections (I'm reading this thread: https://discussions.apple.com/thread/6645172)

I did the same check with a server under my control, and I sniffed the traffic with tcpdump. I discovered  that the TCP packets are not getting out from my MBA.