#16099: Development web server sometimes hangs with Chrome
-------------------------------------+-------------------------------------
               Reporter:  jseims@…   |          Owner:  nobody
                   Type:  Bug        |         Status:  reopened
              Milestone:             |      Component:  HTTP handling
                Version:  1.3        |       Severity:  Normal
             Resolution:             |       Keywords:
           Triage Stage:  Design     |      Has patch:  0
  decision needed                    |    Needs tests:  0
    Needs documentation:  0          |  Easy pickings:  0
Patch needs improvement:  0          |
                  UI/UX:  0          |
-------------------------------------+-------------------------------------

Comment (by slacy):

 I'm using Chrome 12.0.742.60 beta on Ubuntu 11.04 and can reproduce this
 easily by starting a totally blank Django project, and attempting to visit
 "http://localhost:8000/"; using Chrome's Incognito mode.

 I've looked at the strace, and the hang is right after the accept() of the
 new connection.  The HTTP server does a recvfrom() on the new socket, and
 Chrome never seems to write the request.

 The sequence looks like this (from "strace -T -f -o /tmp/strace.out python
 ./manage.py runserver --noreload":   Each call is annotated with it's
 runtime in seconds in <>'s, so take a look at the 1st call to recvfrom()
 which takes 60 seconds to complete.

 {{{
 [...]
 17271 select(4, [3], [], [], {0, 500000}) = 0 (Timeout) <0.500664>
 17271 select(4, [3], [], [], {0, 500000}) = 0 (Timeout) <0.500648>
 17271 select(4, [3], [], [], {0, 500000}) = 1 (in [3], left {0, 285305})
 <0.214843>
 17271 accept(3, {sa_family=AF_INET, sin_port=htons(49463),
 sin_addr=inet_addr("127.0.0.1")}, [16]) = 4 <0.000059>
 17271 ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon
 echo ...}) = 0 <0.000075>
 17271 recvfrom(4, "", 8192, 0, NULL, NULL) = 0 <60.004065>
 17271 shutdown(4, 1 /* send */)         = 0 <0.000145>
 17271 close(4)                          = 0 <0.000107>
 17271 select(4, [3], [], [], {0, 500000}) = 1 (in [3], left {0, 499996})
 <0.000081>
 17271 accept(3, {sa_family=AF_INET, sin_port=htons(49464),
 sin_addr=inet_addr("127.0.0.1")}, [16]) = 4 <0.000078>
 17271 ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon
 echo ...}) = 0 <0.000081>
 17271 recvfrom(4, "", 8192, 0, NULL, NULL) = 0 <0.000033>
 17271 shutdown(4, 1 /* send */)         = 0 <0.000099>
 17271 close(4)                          = 0 <0.000027>
 17271 select(4, [3], [], [], {0, 500000}) = 1 (in [3], left {0, 499997})
 <0.000018>
 17271 accept(3, {sa_family=AF_INET, sin_port=htons(49465),
 sin_addr=inet_addr("127.0.0.1")}, [16]) = 4 <0.000023>
 17271 ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon
 echo ...}) = 0 <0.000014>
 17271 recvfrom(4, "GET / HTTP/1.1\r\nHost: localhost:8000\r\nConnection:
 keep-alive\r\nCache-Control: max-age=0\r\nUser-Agent: Mozilla/5.0 (X11;
 Linux x86_64) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.60
 Safari/534.30\r\nAccept:
 text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-
 Encoding: gzip,deflate,sdch\r\nAccept-Language: en-US,en;q=0.8\r\nAccept-
 Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3\r\n\r\n", 8192, 0, NULL, NULL) =
 397 <0.000022>
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/16099#comment:8>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to