Comment #39 on issue 16367 by [email protected]: some http requests  
take many seconds or minutes
http://code.google.com/p/chromium/issues/detail?id=16367

I started looking at this.  I used the repro steps from comment 25 and  
instrumented my chromium instance to
see what was happening.  We are indeed reusing sockets.  On the second use  
of the socket, we have no problem
writing the HTTP request headers to the socket, but calling Read() on the  
socket returns ERR_IO_PENDING and
we never get called back, so the URLRequest will just time out, which is  
why it spins for so long.

What I suspect is happening is that when Mac sleeps and switches the  
network interface (as described in the
repro steps), the OS doesn't invalidate the socket, so the read() and  
write() calls don't fail fast.  The write() is
getting buffered in the kernel, and the read() returns EWOULDBLOCK instead  
of some other error.

I'm curious if this happens on any other OSes.  I don't have a Windows or  
Linux laptop to test it out.  I'll see if I
can borrow one later.

It's possible we might need to detect somehow (I'm not aware of any API  
that does this, does anyone else?) that
a networking interface has been disabled and close all idle sockets in the  
ClientSocketPool since they are now
potentially invalid, even if the OS still considers them valid handles.  I  
wonder what Safari/Firefox are doing
here.

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/group/chromium-bugs
-~----------~----~----~----~------~----~------~--~---

Reply via email to