Return-Path: X-Original-To: apmail-httpd-dev-archive@www.apache.org Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5106E18A0E for ; Wed, 10 Jun 2015 20:53:30 +0000 (UTC) Received: (qmail 39069 invoked by uid 500); 10 Jun 2015 20:53:29 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 39007 invoked by uid 500); 10 Jun 2015 20:53:29 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 38997 invoked by uid 99); 10 Jun 2015 20:53:29 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Jun 2015 20:53:29 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of wrowe@rowe-clan.net designates 209.85.213.178 as permitted sender) Received: from [209.85.213.178] (HELO mail-ig0-f178.google.com) (209.85.213.178) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Jun 2015 20:51:14 +0000 Received: by igblz2 with SMTP id lz2so41890873igb.1 for ; Wed, 10 Jun 2015 13:52:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=976TksnwviQQ+3iPRklAQ8fbL37E8L52Tb2KcBhY/Hc=; b=c4JIAc95zgW52D2dTLASrdeD7+yeWGY+Yc0wB9sh7H5wVmSuqIqtpt67+OoUKntxev jQSAG08ah5kxEZ8UJGsuoidZm5SCz4mwH6YSVXIR7YYB+XyMKRU35cBrLiZ1B1aJBkwi 04xsFbT4lpP4jWJdG+PNgGaI2o7iCM3rsCgJTO9dHOxSKeMaJ7aVDakEFE4WlTxOI3Nb x9qBFqqfEL7F+2iZAybkGRZRLUKfnVfMEAOkXOC7vDz0NeiMmhE4cO9kfCxq53ISaHyZ 2DyyZ2z2kk53W5AlEY6JOs/q/aQwSpJwiF2IrYvlPBZYLvE34gQlFwr5fmjveEFfKTP/ rkbg== X-Gm-Message-State: ALoCoQn1frJfBlyDiCVvzTyLI5C8f4zqHJPhsTYDR9ju/vQlsuRDSbnIIWjG+sM97h8WmZu0oF2v MIME-Version: 1.0 X-Received: by 10.42.144.131 with SMTP id b3mr7053859icv.35.1433969536805; Wed, 10 Jun 2015 13:52:16 -0700 (PDT) Received: by 10.107.190.195 with HTTP; Wed, 10 Jun 2015 13:52:16 -0700 (PDT) X-Originating-IP: [76.252.112.72] Received: by 10.107.190.195 with HTTP; Wed, 10 Jun 2015 13:52:16 -0700 (PDT) In-Reply-To: <557863E4.6040602@ptc.com> References: <552E9491.7050802@ptc.com> <55785857.2040909@ptc.com> <557863E4.6040602@ptc.com> Date: Wed, 10 Jun 2015 15:52:16 -0500 Message-ID: Subject: Re: httpd 2.4 and windows "hangs" and AcceptFilter solution From: William A Rowe Jr To: httpd Content-Type: multipart/alternative; boundary=90e6ba1efd28dc47780518300c9d X-Virus-Checked: Checked by ClamAV on apache.org --90e6ba1efd28dc47780518300c9d Content-Type: text/plain; charset=UTF-8 Can you reproduce using the real network driver? The loopback/localhost interface is famously junk. On Jun 10, 2015 11:22 AM, "Andy Wang" wrote: > Yeah, that much I more or less get. > > What I really don't understand is what can a client do (IE11) that would > regularly cause httpd.exe to hang with AcceptEx. This is reproducible on > every single machine I've ever tried, including completely vanilla virtual > machines, or pretty straightforward physical machines with intel NICs and > no additional stack drivers. That seems like a pretty hideous architecture > if a regular non-malicious client requests could end up causing the web > server to simply stop responding. > > The InstallAnywhere problem I mentioned is also reliably reproduced on > every single Windows system I've tried this on (about a dozen different > systems with different configurations - virtual and physical). This is the > one I especially can't understand. How would launching httpd.exe from a > installer process (java.exe specifically) prevent it from responding to > requests. > > Andy > > On 06/10/2015 10:48 AM, William A Rowe Jr wrote: > >> It turns off all advanced socket mechanics for accepting connections. >> That means >> it won't pre-fetch data. Because of how cobbled-together the WinSock >> network >> stack drivers (third parties, included) were, there are many things that >> break >> sendfile (disable sendfile) or socket reuse (disable advanced accept >> logic). >> >> In other words, if you need reliability on some pretty crazy >> installations of >> Windows with lots of out-of-date drivers, your solution is the way to >> go. They >> are for performance, there is no reason to turn these on in low-traffic >> cases. >> >> >> On Wed, Jun 10, 2015 at 10:31 AM, Andy Wang > > wrote: >> >> I originally asked this on user@httpd and didn't get a response, so >> thought I'd redirect to dev and see if anyone can explain why this >> would occur if you have time. I have to admit, it's a curiosity to >> me, that I just don't want to let go until I understand it and what >> research I've done into AcceptEx doesn't seem to be giving me any >> more insight. >> >> --- original message --- >> >> We've come across numerous cases where apache httpd 2.4 (I'm using >> 2.4.12 but I don't believe this is version specific) hang using the >> default configuration options. >> >> There are two cases >> 1) we have an InstallAnywhere installer that launches httpd during >> install time to do some initial work. When the installanywhere >> installer starts httpd.exe (it does it via cmd.exe) httpd does not >> respond to requests. If you kill the installanywhere installer, then >> all of the sudden httpd starts responding >> 2) certain IE 11 client requests hang httpd 2.4. >> >> I've wireshark'ed #2 and at some point, an http GET gets an ACK and >> nothing more. I've peeked a little bit at the process threads with >> processexplorer (unfortunately i'm not a windows developer, so I'm not >> entirely familiar with the low level windows stuff) and everyhting >> looks >> like it's okay and simply waiting for requests. >> >> What I found after googling and testing is AcceptFilter http|https >> none >> prevents both of those problems. I've not yet tried connect to see if >> that works either. >> >> But what I'm really wondering about is, can anyone explain, especially >> in #2, what it is about AcceptFilter http none that actually resolves >> these types of issues? >> >> Thanks, >> Andy >> >> >> >> >> >> --90e6ba1efd28dc47780518300c9d Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

Can you reproduce using the real network driver?=C2=A0 The l= oopback/localhost interface is famously junk.

On Jun 10, 2015 11:22 AM, "Andy Wang" = <awang@ptc.com> wrote:
Yeah, that much I more or l= ess get.

What I really don't understand is what can a client do (IE11) that woul= d regularly cause httpd.exe to hang with AcceptEx.=C2=A0 This is reproducib= le on every single machine I've ever tried, including completely vanill= a virtual machines, or pretty straightforward physical machines with intel = NICs and no additional stack drivers.=C2=A0 That seems like a pretty hideou= s architecture if a regular non-malicious client requests could end up caus= ing the web server to simply stop responding.

The InstallAnywhere problem I mentioned is also reliably reproduced on ever= y single Windows system I've tried this on (about a dozen different sys= tems with different configurations - virtual and physical).=C2=A0 This is t= he one I especially can't understand.=C2=A0 How would launching httpd.e= xe from a installer process (java.exe specifically) prevent it from respond= ing to requests.

Andy

On 06/10/2015 10:48 AM, William A Rowe Jr wrote:
It turns off all advanced socket mechanics for accepting connections.
That means
it won't pre-fetch data.=C2=A0 Because of how cobbled-together the WinS= ock
network
stack drivers (third parties, included) were, there are many things that break
sendfile (disable sendfile) or socket reuse (disable advanced accept logic)= .

In other words, if you need reliability on some pretty crazy
installations of
Windows with lots of out-of-date drivers, your solution is the way to
go.=C2=A0 They
are for performance, there is no reason to turn these on in low-traffic
cases.


On Wed, Jun 10, 2015 at 10:31 AM, Andy Wang <awang@ptc.com
<mailto:awang@ptc.com= >> wrote:

=C2=A0 =C2=A0 I originally asked this on user@httpd and didn't get a re= sponse, so
=C2=A0 =C2=A0 thought I'd redirect to dev and see if anyone can explain= why this
=C2=A0 =C2=A0 would occur if you have time.=C2=A0 I have to admit, it's= a curiosity to
=C2=A0 =C2=A0 me, that I just don't want to let go until I understand i= t and what
=C2=A0 =C2=A0 research I've done into AcceptEx doesn't seem to be g= iving me any
=C2=A0 =C2=A0 more insight.

=C2=A0 =C2=A0 --- original message ---

=C2=A0 =C2=A0 We've come across numerous cases where apache httpd 2.4 (= I'm using
=C2=A0 =C2=A0 2.4.12 but I don't believe this is version specific) hang= using the
=C2=A0 =C2=A0 default configuration options.

=C2=A0 =C2=A0 There are two cases
=C2=A0 =C2=A0 1) we have an InstallAnywhere installer that launches httpd d= uring
=C2=A0 =C2=A0 install time to do some initial work.=C2=A0 When the installa= nywhere
=C2=A0 =C2=A0 installer starts httpd.exe (it does it via cmd.exe) httpd doe= s not
=C2=A0 =C2=A0 respond to requests.=C2=A0 If you kill the installanywhere in= staller, then
=C2=A0 =C2=A0 all of the sudden httpd starts responding
=C2=A0 =C2=A0 2) certain IE 11 client requests hang httpd 2.4.

=C2=A0 =C2=A0 I've wireshark'ed #2 and at some point, an http GET g= ets an ACK and
=C2=A0 =C2=A0 nothing more.=C2=A0 I've peeked a little bit at the proce= ss threads with
=C2=A0 =C2=A0 processexplorer (unfortunately i'm not a windows develope= r, so I'm not
=C2=A0 =C2=A0 entirely familiar with the low level windows stuff) and every= hting looks
=C2=A0 =C2=A0 like it's okay and simply waiting for requests.

=C2=A0 =C2=A0 What I found after googling and testing is AcceptFilter http|= https none
=C2=A0 =C2=A0 prevents both of those problems.=C2=A0 I've not yet tried= connect to see if
=C2=A0 =C2=A0 that works either.

=C2=A0 =C2=A0 But what I'm really wondering about is, can anyone explai= n, especially
=C2=A0 =C2=A0 in #2, what it is about AcceptFilter http none that actually = resolves
=C2=A0 =C2=A0 these types of issues?

=C2=A0 =C2=A0 Thanks,
=C2=A0 =C2=A0 Andy





--90e6ba1efd28dc47780518300c9d--