Return-Path: X-Original-To: apmail-httpd-users-archive@www.apache.org Delivered-To: apmail-httpd-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5EC6C11DD1 for ; Thu, 17 Jul 2014 13:33:58 +0000 (UTC) Received: (qmail 92331 invoked by uid 500); 17 Jul 2014 13:33:54 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 92299 invoked by uid 500); 17 Jul 2014 13:33:54 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 92281 invoked by uid 99); 17 Jul 2014 13:33:54 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Jul 2014 13:33:54 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of marimpimp@gmail.com designates 209.85.223.169 as permitted sender) Received: from [209.85.223.169] (HELO mail-ie0-f169.google.com) (209.85.223.169) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Jul 2014 13:33:51 +0000 Received: by mail-ie0-f169.google.com with SMTP id tp5so2924343ieb.28 for ; Thu, 17 Jul 2014 06:33:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=i3/wQ04IMAFVkNhQ/7l5ne53TlgM4yytcscsj5TlAHg=; b=E/HLJiXwNfEGeao+bH2gd9lt2tLvh95qpYDcsTDGAFCMtvkokd59+FTIo/YKtLhG1r RZBG41tOq6SpozFDoemiP4Thu50a7MKxVX5BvsTr/I/iOOI6dMMCulXeJcimIjW07BfB aGmXx09m63VeotIsU/YQjCXLN0RxSJz5Z40sGSyrKbcYjpo+OJB5v63/cLVa/HXx6DIA KIXt8tTw1AfrJPQaaHV2ls2b8DwmiAgNNmdledcENxuY++kVtemf+Gz2NCHHdCFSh8Cc ZDLwVRNyCDSPagVpRAW1h/cQHd1KQPyCN5y8nB2gi10CPVXWS7zjwq/VEVUMUsNznR4b z2Vw== MIME-Version: 1.0 X-Received: by 10.60.47.77 with SMTP id b13mr4246743oen.83.1405604006814; Thu, 17 Jul 2014 06:33:26 -0700 (PDT) Received: by 10.182.91.4 with HTTP; Thu, 17 Jul 2014 06:33:26 -0700 (PDT) In-Reply-To: References: Date: Thu, 17 Jul 2014 15:33:26 +0200 Message-ID: From: Mar Imp To: users@httpd.apache.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Subject: Re: [users@httpd] Windows Apache 2.4.9 restarts itself Hi, I got a new build from apachelounge. Yesterday I run the server, and today apache restarted itself. Unfortunately the logfile says even less than before: [Thu Jul 17 15:12:13.091225 2014] [mpm_winnt:notice] [pid 35212:tid 384] AH00362: Child: Waiting 30 more seconds for 16 worker threads to finish. [Thu Jul 17 15:12:26.333012 2014] [mpm_winnt:warn] [pid 35212:tid 4288] (OS 10038)An operation was attempted on something that is not a socket. : AH00344: accept() failed. [Thu Jul 17 15:12:43.127156 2014] [mpm_winnt:notice] [pid 35212:tid 384] AH00362: Child: Waiting 0 more seconds for 4 worker threads to finish. [Thu Jul 17 15:12:43.227264 2014] [mpm_winnt:notice] [pid 35212:tid 384] AH00363: Child: Terminating 4 threads that failed to exit. [Thu Jul 17 15:12:43.227264 2014] [mpm_winnt:notice] [pid 35212:tid 384] AH00364: Child: All worker threads have exited. [Thu Jul 17 15:12:43.344363 2014] [mpm_winnt:notice] [pid 36412:tid 536] AH00428: Parent: child process 35212 exited with status 0 -- Restarting. [Thu Jul 17 15:12:44.020013 2014] [mpm_winnt:notice] [pid 36412:tid 536] AH00455: Apache/2.4.9 (Win64) OpenSSL/1.0.1h configured -- resuming normal operations [Thu Jul 17 15:12:44.020013 2014] [mpm_winnt:notice] [pid 36412:tid 536] AH00456: Apache Lounge VC11 Server built: Jul 9 2014 14:14:36 [Thu Jul 17 15:12:44.020013 2014] [core:notice] [pid 36412:tid 536] AH00094: Command line: 'C:\\Apache24\\bin\\httpd.exe -d C:/Apache24' [Thu Jul 17 15:12:44.021014 2014] [mpm_winnt:notice] [pid 36412:tid 536] AH00418: Parent: Created child process 25540 [Thu Jul 17 15:12:45.335272 2014] [mpm_winnt:notice] [pid 25540:tid 384] AH00354: Child: Starting 300 worker threads. -> the first line with the reason for the server restart ("The handle is invalid. : AH00356: Child: WAIT_FAILED -- shutting down server") is not in the logfile at all! is there a new bug introduced? thx for your help 2014-07-09 13:48 GMT+02:00 Jeff Trawick : > On Wed, Jul 9, 2014 at 7:36 AM, Mar Imp wrote: >> >> hi, >> >> this is the answer I got from an apachelounge guy: >> >> >> Does not build with the patch at >> >> http://svn.apache.org/viewvc?view=3Drevision&revision=3D1606368 >> >> >> >> Error 85 error C2065: 'my_generation' : undeclared identifier >> >> E:\VC11\Win64\httpd-2.4.9\server\mpm\winnt\child.c 1051 >> >> Error 86 error C2065: 'my_generation' : undeclared identifier >> >> E:\VC11\Win64\httpd-2.4.9\server\mpm\winnt\child.c 1076 >> >> > > > Interesting... It looks like they picked up other code from httpd trunk > instead of just picking up that one patch. (my_generation is in trunk bu= t > not part of that patch.) > > As it turns out, the patch is now integrated into the 2.4.x branch for > 2.4.10 (coming up in the next week or two). They can use this file > unchanged/unpatched with 2.4.9: > > http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/server/mpm/winnt/= child.c?view=3Dco > > or just wait for 2.4.10. > > Thanks for trying! > > >> >> 138 IntelliSense: a value of type "void *" cannot be assigned to an >> >> entity of type "core_server_config *" >> >> e:\VC11\Win64\httpd-2.4.9\server\mpm\winnt\child.c 315 >> >> 139 IntelliSense: a value of type "void *" cannot be assigned to an >> >> entity of type "char *" >> >> e:\VC11\Win64\httpd-2.4.9\server\mpm\winnt\child.c 458 >> >> 140 IntelliSense: a value of type "void *" cannot be assigned to an >> >> entity of type "sockaddr *" >> >> e:\VC11\Win64\httpd-2.4.9\server\mpm\winnt\child.c 632 >> >> 141 IntelliSense: a value of type "void *" cannot be assigned to an >> >> entity of type "sockaddr *" >> >> e:\VC11\Win64\httpd-2.4.9\server\mpm\winnt\child.c 635 >> >> 142 IntelliSense: a value of type "void *" cannot be used to initiali= ze >> >> an entity of type "winnt_conn_ctx_t *" >> >> e:\VC11\Win64\httpd-2.4.9\server\mpm\winnt\child.c 789 >> >> 143 IntelliSense: a value of type "PVOID" cannot be assigned to an >> entity >> >> of type "apr_bucket *" >> e:\VC11\Win64\httpd-2.4.9\server\mpm\winnt\child.c >> >> 791 >> >> 144 IntelliSense: a value of type "PVOID" cannot be assigned to an >> entity >> >> of type "apr_bucket *" >> e:\VC11\Win64\httpd-2.4.9\server\mpm\winnt\child.c >> >> 842 >> >> 145 IntelliSense: a value of type "HANDLE" cannot be assigned to an >> >> entity of type "HANDLE *" >> >> e:\VC11\Win64\httpd-2.4.9\server\mpm\winnt\child.c 1040 >> >> 146 IntelliSense: identifier "my_generation" is undefined >> >> e:\VC11\Win64\httpd-2.4.9\server\mpm\winnt\child.c 1051 >> >> 147 IntelliSense: identifier "my_generation" is undefined >> >> e:\VC11\Win64\httpd-2.4.9\server\mpm\winnt\child.c 1076 >> >> 148 IntelliSense: a value of type "void *" cannot be assigned to an >> >> entity of type "int *" >> e:\VC11\Win64\httpd-2.4.9\server\mpm\winnt\child.c >> >> 1082 >> >> 149 IntelliSense: a value of type "void *" cannot be assigned to an >> >> entity of type "int *" >> e:\VC11\Win64\httpd-2.4.9\server\mpm\winnt\child.c >> >> 1330 >> >> >> >> >> 2014-06-28 17:06 GMT+02:00 Jeff Trawick : >> >>> On Fri, Jun 27, 2014 at 7:53 AM, Jeff Trawick wrote= : >>>> >>>> On Thu, Jun 26, 2014 at 4:18 AM, Mar Imp wrote: >>>>> >>>>> Hi, >>>>> >>>>> Thank you for the response! >>>>> >>>>> I looked into child.c, and see that the first line in Error log: >>>>> (OS 6)The handle is invalid. : AH00356: Child: WAIT_FAILED -- >>>>> shutting down server >>>>> comes from: >>>>> child.c Line 1125+: rv =3D WaitForMultipleObjects(num_events, (HANDLE >>>>> *)child_events, FALSE, =E2=80=A6=E2=80=A6 >>>>> This is the place that causes the restart. >>>> >>>> >>>> Right... The other code I pointed out is what makes this call differe= nt >>>> than before. >>>> >>>> >>>>> >>>>> >>>>> The second line in the error log: >>>>> (OS 10038)An operation was attempted on something that is not a >>>>> socket. : AH00344: accept() failed. >>>>> comes from: >>>>> child.c Line 641+: if (context->accept_socket =3D=3D INVALID_SOCKET) >>>>> I guess the second line in the error log is just a consequence of the >>>>> server shutting down? >>>> >>>> >>>> I expect so. >>>> >>>>> >>>>> >>>>> >>>>> no, I can=E2=80=99t build httpd. It would be great if you could provi= de a >>>>> patched version that I could install in _production_ environment. >>>>> >>>>> I can=E2=80=99t reproduce the error on a test server, I can just inst= all the >>>>> version on a productive server, and wait for the error to occur. The >>>>> error occurs sporadically. >>>>> >>>>> It is essential that the patch included in the build doesn=E2=80=99t = break >>>>> things (particularly the ability of apache to restart when an error >>>>> happens). >>>> >>>> >>>> The Apache Lounge folks would need to run the build for you to ensure >>>> that it has any patches you're currently using and that the toolchain = is in >>>> sync. >>>> >>>> Right now I hope to make some permanent changes in the next couple of >>>> days to improve diagnostics in this area and commit the changes to htt= pd >>>> trunk. At that point you might be able to get the Apache Lounge folks= to >>>> roll them into a special build. ??? >>>> >>> >>> Here are the diagnostic changes I added: >>> >>> http://svn.apache.org/viewvc?view=3Drevision&revision=3D1606368 >>> >>> Perhaps the Apache Lounge folks can get you a build of 2.4.9 with that = in >>> it. >>> >>>> >>>> >>>>> >>>>> >>>>> As you found out, I use the apachelounge-build atm. >>>>> >>>>> Thank you for your help! >>>>> >>>>> Kind regards >>>>> Maria Imp >>>>> >>>>> 2014-06-24 15:59 GMT+02:00 Jeff Trawick : >>>>> > On Tue, Jun 24, 2014 at 9:36 AM, Mar Imp wrot= e: >>>>> >> >>>>> >> I face the problem, that Apache restarts itself unexpecteldy witho= ut >>>>> >> obvious reason. >>>>> >> >>>>> >> -> (OS 6)The handle is invalid. : AH00356: Child: WAIT_FAILED -- >>>>> >> shutting down server >>>>> >> -> (OS 10038)An operation was attempted on something that is not a >>>>> >> socket. : AH00344: accept() failed. >>>>> >> >>>>> >> Apache Version: >>>>> >> * Problem occurs on 2.4.9, both VC10 and VC11 compiled ones >>>>> >> * Problem does NOT occur on 2.4.4 >>>>> >> Operating System: >>>>> >> * Microsoft Windows Server 2012 Standard >>>>> >> >>>>> >> The problem occurs since the Apache upgrade from 2.4.4 to 2.4.9. >>>>> >> At this moment I reverted to 2.4.4 again because the random restar= ts >>>>> >> cause downtimes. >>>>> >> >>>>> >> >>>>> >> Relevant configuration settings: >>>>> >> ThreadsPerChild 300 >>>>> >> AcceptFilter http none >>>>> >> AcceptFilter https none >>>>> >> EnableSendfile off >>>>> >> EnableMMAP off >>>>> >> >>>>> >> >>>>> >> Apache works as a caching reverse proxy (mod_cache_disk) >>>>> >> >>>>> >> >>>>> >> Typical logfile fragment: >>>>> >> [log] >>>>> >> [Fri May 23 07:53:58.344457 2014] [mpm_winnt:crit] [pid 42540:tid >>>>> >> 380] >>>>> >> (OS 6)The handle is invalid. : AH00356: Child: WAIT_FAILED -- >>>>> >> shutting down server >>>>> >> [Fri May 23 07:54:03.757607 2014] [mpm_winnt:warn] [pid 42540:tid >>>>> >> 4212] (OS 10038)An operation was attempted on something that is no= t >>>>> >> a >>>>> >> socket. : AH00344: accept() failed. >>>>> >> [Fri May 23 07:54:30.288807 2014] [mpm_winnt:notice] [pid 42540:ti= d >>>>> >> 380] AH00362: Child: Waiting 270 more seconds for 5 worker threads >>>>> >> to >>>>> >> finish. >>>>> >> [Fri May 23 07:55:00.329552 2014] [mpm_winnt:notice] [pid 42540:ti= d >>>>> >> 380] AH00362: Child: Waiting 240 more seconds for 1 worker threads >>>>> >> to >>>>> >> finish. >>>>> >> [Fri May 23 07:55:30.370221 2014] [mpm_winnt:notice] [pid 42540:ti= d >>>>> >> 380] AH00362: Child: Waiting 210 more seconds for 1 worker threads >>>>> >> to >>>>> >> finish. >>>>> >> [Fri May 23 07:55:47.893020 2014] [mpm_winnt:notice] [pid 42540:ti= d >>>>> >> 380] AH00364: Child: All worker threads have exited. >>>>> >> [Fri May 23 07:55:48.010131 2014] [mpm_winnt:notice] [pid 36544:ti= d >>>>> >> 516] AH00428: Parent: child process 42540 exited with status 0 -- >>>>> >> Restarting. >>>>> >> [Fri May 23 07:55:48.801890 2014] [mpm_winnt:notice] [pid 36544:ti= d >>>>> >> 516] AH00455: Apache/2.4.9 (Win64) OpenSSL/1.0.1g configured -- >>>>> >> resuming normal operations >>>>> >> [Fri May 23 07:55:48.801890 2014] [mpm_winnt:notice] [pid 36544:ti= d >>>>> >> 516] AH00456: Apache Lounge VC10 Server built: Mar 17 2014 12:11:3= 1 >>>>> >> [Fri May 23 07:55:48.801890 2014] [core:notice] [pid 36544:tid 516= ] >>>>> >> AH00094: Command line: 'C:\\Apache24\\bin\\httpd.exe -d C:/Apache2= 4' >>>>> >> [Fri May 23 07:55:48.802891 2014] [mpm_winnt:notice] [pid 36544:ti= d >>>>> >> 516] AH00418: Parent: Created child process 33888 >>>>> >> [Fri May 23 07:55:50.263291 2014] [mpm_winnt:notice] [pid 33888:ti= d >>>>> >> 380] AH00354: Child: Starting 300 worker threads. >>>>> >> [Fri May 23 11:58:09.232804 2014] [mpm_winnt:crit] [pid 33888:tid >>>>> >> 380] >>>>> >> (OS 6)The handle is invalid. : AH00356: Child: WAIT_FAILED -- >>>>> >> shutting down server >>>>> >> [Fri May 23 11:58:10.710220 2014] [mpm_winnt:warn] [pid 33888:tid >>>>> >> 5008] (OS 10038)An operation was attempted on something that is no= t >>>>> >> a >>>>> >> socket. : AH00344: accept() failed. >>>>> >> [Fri May 23 11:58:28.546422 2014] [mpm_winnt:warn] [pid 33888:tid >>>>> >> 3320] (OS 10038)An operation was attempted on something that is no= t >>>>> >> a >>>>> >> socket. : AH00344: accept() failed. >>>>> >> [Fri May 23 11:58:41.169814 2014] [mpm_winnt:notice] [pid 33888:ti= d >>>>> >> 380] AH00362: Child: Waiting 270 more seconds for 8 worker threads >>>>> >> to >>>>> >> finish. >>>>> >> [Fri May 23 11:59:11.208219 2014] [mpm_winnt:notice] [pid 33888:ti= d >>>>> >> 380] AH00362: Child: Waiting 240 more seconds for 3 worker threads >>>>> >> to >>>>> >> finish. >>>>> >> [Fri May 23 11:59:41.245781 2014] [mpm_winnt:notice] [pid 33888:ti= d >>>>> >> 380] AH00362: Child: Waiting 210 more seconds for 1 worker threads >>>>> >> to >>>>> >> finish. >>>>> >> [Fri May 23 12:00:11.277011 2014] [mpm_winnt:notice] [pid 33888:ti= d >>>>> >> 380] AH00362: Child: Waiting 180 more seconds for 1 worker threads >>>>> >> to >>>>> >> finish. >>>>> >> [Fri May 23 12:00:41.305795 2014] [mpm_winnt:notice] [pid 33888:ti= d >>>>> >> 380] AH00362: Child: Waiting 150 more seconds for 1 worker threads >>>>> >> to >>>>> >> finish. >>>>> >> [Fri May 23 12:01:11.335526 2014] [mpm_winnt:notice] [pid 33888:ti= d >>>>> >> 380] AH00362: Child: Waiting 120 more seconds for 1 worker threads >>>>> >> to >>>>> >> finish. >>>>> >> [Fri May 23 12:01:15.840009 2014] [mpm_winnt:notice] [pid 33888:ti= d >>>>> >> 380] AH00364: Child: All worker threads have exited. >>>>> >> [Fri May 23 12:01:15.953118 2014] [mpm_winnt:notice] [pid 36544:ti= d >>>>> >> 516] AH00428: Parent: child process 33888 exited with status 0 -- >>>>> >> Restarting. >>>>> >> [Fri May 23 12:01:16.820952 2014] [mpm_winnt:notice] [pid 36544:ti= d >>>>> >> 516] AH00455: Apache/2.4.9 (Win64) OpenSSL/1.0.1g configured -- >>>>> >> resuming normal operations >>>>> >> [Fri May 23 12:01:16.820952 2014] [mpm_winnt:notice] [pid 36544:ti= d >>>>> >> 516] AH00456: Apache Lounge VC10 Server built: Mar 17 2014 12:11:3= 1 >>>>> >> [Fri May 23 12:01:16.820952 2014] [core:notice] [pid 36544:tid 516= ] >>>>> >> AH00094: Command line: 'C:\\Apache24\\bin\\httpd.exe -d C:/Apache2= 4' >>>>> >> [Fri May 23 12:01:16.820952 2014] [mpm_winnt:notice] [pid 36544:ti= d >>>>> >> 516] AH00418: Parent: Created child process 24388 >>>>> >> [Fri May 23 12:01:18.308375 2014] [mpm_winnt:notice] [pid 24388:ti= d >>>>> >> 376] AH00354: Child: Starting 300 worker threads. >>>>> >> [/log] >>>>> >> >>>>> >> Have you got any idea, why this can happen? >>>>> >> >>>>> >> In the windows eventlog I can't find any relevant entries at the >>>>> >> time >>>>> >> that apache restarts. >>>>> >> >>>>> >> Please help if you can >>>>> >> >>>>> >> Kind Regards >>>>> >> Maria Imp >>>>> >> >>>>> >> >>>>> >> ------------------------------------------------------------------= --- >>>>> >> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org >>>>> >> For additional commands, e-mail: users-help@httpd.apache.org >>>>> >> >>>>> > >>>>> > I just found this thread too, which also contains this information >>>>> > from you >>>>> > a few weeks ago: >>>>> > >>>>> > https://www.apachelounge.com/viewtopic.php?p=3D27848 >>>>> > >>>>> > The apparent code change that triggered this is that the httpd chil= d >>>>> > now >>>>> > detects when the httpd parent crashes or is terminated forcefully. >>>>> > It would >>>>> > appear that this process handle is no longer valid after some perio= d >>>>> > of >>>>> > time: >>>>> > >>>>> > child_events[2] =3D OpenProcess(SYNCHRONIZE, FALSE, parent_pid); >>>>> > num_events =3D 3; >>>>> > >>>>> > Some of the other logs in the apachelounge.com post show that the >>>>> > parent was >>>>> > able to successfully restart the child after this error, so >>>>> > presumably the >>>>> > handle doesn't go bad simply because the parent exits. >>>>> > >>>>> > Are you able to build httpd yourself? I could prepare a test patch >>>>> > to >>>>> > narrow down what is going wrong. >>>>> > >>>>> > -- > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org For additional commands, e-mail: users-help@httpd.apache.org