You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Konstantin Kolinko <kn...@gmail.com> on 2016/12/22 13:45:49 UTC

[users@httpd] HTTPD 2.4.25 crash in mod_proxy (ajp)

Hi!

My configuration:

(HTTPS) -> HTTPD -> mod_proxy_ajp -> Apache Tomcat

running on Windows 7, using 32-bit version of HTTPD built by Apache Lounge
http://www.apachelounge.com/download/

Apache 2.4.25 Win32
 httpd-2.4.25-win32-VC14.zip                             20 Dec '16 13.873K

(Actually the binary itself logs that its build date is 17 Dec:
AH00456: Apache Lounge VC14 Server built: Dec 17 2016 10:42:52


After upgrade from 2.4.23 to 2.4.25 every request that is proxied to
Tomcat results in crash and restart of server child process.

At the server side I see that Windows generates a crash report
(displays an UI dialog prompting to send a report to MS) and a child
process crash is mentioned in HTTPD error log.

From client's view the request is just processed slowly. It does
receive correct response, just waiting several seconds longer than
usual.


Requests that are not proxied (e.g. requests for static files, DAV
requests) are served correctly.


Fragment of HTTP error log:

[Thu Dec 22 15:08:12.015452 2016] [mpm_winnt:notice] [pid 5140:tid
364] AH00455: Apache/2.4.25 (Win32) OpenSSL/1.0.2j SVN/1.8.17
configured -- resuming normal operations
[Thu Dec 22 15:08:12.015452 2016] [mpm_winnt:notice] [pid 5140:tid
364] AH00456: Apache Lounge VC14 Server built: Dec 17 2016 10:42:52
[Thu Dec 22 15:08:12.015452 2016] [core:notice] [pid 5140:tid 364]
AH00094: Command line: 'D:\\Programs\\Server\\Apache2\\bin\\httpd.exe
-d D:/Programs/Server/Apache2'
[Thu Dec 22 15:08:12.031052 2016] [mpm_winnt:notice] [pid 5140:tid
364] AH00418: Parent: Created child process 3424
[Thu Dec 22 15:08:15.681459 2016] [mpm_winnt:notice] [pid 3424:tid
256] AH00354: Child: Starting 30 worker threads.
[Thu Dec 22 15:08:36.445095 2016] [mpm_winnt:notice] [pid 5140:tid
364] AH00428: Parent: child process 3424 exited with status 255 --
Restarting.
[Thu Dec 22 15:08:37.615097 2016] [mpm_winnt:notice] [pid 5140:tid
364] AH00455: Apache/2.4.25 (Win32) OpenSSL/1.0.2j SVN/1.8.17
configured -- resuming normal operations
[Thu Dec 22 15:08:37.615097 2016] [mpm_winnt:notice] [pid 5140:tid
364] AH00456: Apache Lounge VC14 Server built: Dec 17 2016 10:42:52
[Thu Dec 22 15:08:37.615097 2016] [core:notice] [pid 5140:tid 364]
AH00094: Command line: 'D:\\Programs\\Server\\Apache2\\bin\\httpd.exe
-d D:/Programs/Server/Apache2'
[Thu Dec 22 15:08:37.615097 2016] [mpm_winnt:notice] [pid 5140:tid
364] AH00418: Parent: Created child process 2244
[Thu Dec 22 15:08:41.390304 2016] [mpm_winnt:notice] [pid 2244:tid
256] AH00354: Child: Starting 30 worker threads.
[Thu Dec 22 15:08:54.546343 2016] [mpm_winnt:notice] [pid 5140:tid
364] AH00428: Parent: child process 2244 exited with status 255 --
Restarting.

Fragment of MS crash report summary
Note: all *.Name entries were in a different language, I translated
them into English below.

Sig[0].Name=Application name
Sig[0].Value=httpd.exe
Sig[1].Name=Application version
Sig[1].Value=2.4.25.0
Sig[2].Name=Application timestamp
Sig[2].Value=585506f4
Sig[3].Name=Failed module name
Sig[3].Value=mod_proxy.so
Sig[4].Name=Failed module version
Sig[4].Value=2.4.25.0
Sig[5].Name=Failed module timestamp
Sig[5].Value=585508a2
Sig[6].Name=Exception code
Sig[6].Value=c0000005
Sig[7].Name=Exception offset
Sig[7].Value=00006567


Proxy configuration looks like the following:

<IfModule mod_proxy.c>
    ProxyRequests off

    <Location /foo>
        ProxyPass ajp://127.0.0.1:8009/foo
        # Auth and Require directives here...
    </Location>

    <Location /bar>
        ProxyPass ajp://127.0.0.1:8009/bar
        # Auth and Require directives here...
    </Location>
</IfModule>


Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] HTTPD 2.4.25 crash in mod_proxy (ajp)

Posted by "Michael A. Peters" <mp...@domblogger.net>.
On 12/22/2016 05:18 PM, kohmoto wrote:
> Thank you for your attention.
> The followings have been posted mailing list already.

Oh okay, that issue I knew about, was wondering if there were other 
CentOS specific issues.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] HTTPD 2.4.25 crash in mod_proxy (ajp)

Posted by kohmoto <ko...@iris.eonet.ne.jp>.
Thank you for your attention.
The followings have been posted mailing list already.

> I have tried to rpmbuild httpd-2.4.25 using httpd-2.4.25.tar.bz2 
> downloaded from apache httpd download page on December 21(JST).
>
> Environments:
> CentOS Linux release 7.3.1611 (Core)
> kernel: linux 3.10.0-514.2.2.el7.x86_64
>
> Results:
> $rpmbuild -tb --clean  httpd-2.4.25.tar.bz2
>
> Failed during inspecting files for detecting files not included in the 
> package using  check-files.
>
> error founded file:
> /usr/lib64/httpd/modules/mod_proxy_hcheck.so
>
> At this point, no rpm files obtained.
>
> Modification:
> Found a missing line in httpd.spec.
>
> %{_libdir}/httpd/modules/mod_proxy_hcheck.so missing in the %dir 
> %{_libdir}/httpd/modules
>
> So, add the missing line to httpd.spec.
> Then,
>
> $rpmbuild -bb --clean rpmbuild/SPECS/httpd.spec
>
> All rpm files relative to httpd-2.4.25 were obtained successfully
>
> httpd-2.4.25 server runs successfully after installation.


On 2016/12/23 10:11, Michael A. Peters wrote:
> What's the rpmbuild problem problem?
>
> I have it RPM building just fine under CentOS 7 but I'm not using 
> tomcat or mod_proxy


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] HTTPD 2.4.25 crash in mod_proxy (ajp)

Posted by "Michael A. Peters" <mp...@domblogger.net>.
What's the rpmbuild problem problem?

I have it RPM building just fine under CentOS 7 but I'm not using tomcat 
or mod_proxy

On 12/22/2016 04:52 PM, kohmoto wrote:
> I adapt the same scheme, httpd -> tomcat using mod_proxy_ajp.so. I have
> seen no problem with httpd-2.4.25 working on CentOS7.3(1611), although
> have had a problem to rpmbuid with httpd-2.4.25.
>
> On 2016/12/23 6:10, Rainer Jung wrote:
>> I tried on Solaris with 2.4.25, default config plus snippet from
>> Konstantin plus loading of mod_proxy and mod_proxy_ajp and I do not
>> see a crash there. So it seems to be either platform specific or the
>> reproduction scenario is more complex.
>
> Yours truly,
> Kazuhiko Kohmoto
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] HTTPD 2.4.25 crash in mod_proxy (ajp)

Posted by kohmoto <ko...@iris.eonet.ne.jp>.
I adapt the same scheme, httpd -> tomcat using mod_proxy_ajp.so. I have 
seen no problem with httpd-2.4.25 working on CentOS7.3(1611), although  
have had a problem to rpmbuid with httpd-2.4.25.

On 2016/12/23 6:10, Rainer Jung wrote:
> I tried on Solaris with 2.4.25, default config plus snippet from 
> Konstantin plus loading of mod_proxy and mod_proxy_ajp and I do not 
> see a crash there. So it seems to be either platform specific or the 
> reproduction scenario is more complex.

Yours truly,
Kazuhiko Kohmoto

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] HTTPD 2.4.25 crash in mod_proxy (ajp)

Posted by Jim Jagielski <ji...@jaguNET.com>.
> On Dec 22, 2016, at 4:10 PM, Rainer Jung <ra...@kippdata.de> wrote:
> 
> I tried on Solaris with 2.4.25, default config plus snippet from Konstantin plus loading of mod_proxy and mod_proxy_ajp and I do not see a crash there. So it seems to be either platform specific or the reproduction scenario is more complex.
> 

I just tried under CentOS6 and also saw no core dump.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] HTTPD 2.4.25 crash in mod_proxy (ajp)

Posted by Rainer Jung <ra...@kippdata.de>.
Am 22.12.2016 um 18:38 schrieb Yann Ylavic:
> On Thu, Dec 22, 2016 at 3:12 PM, Jim Jagielski <ji...@jagunet.com> wrote:
>> Hmmmm...
>>
>> I wonder if it's due to:
>>
>>          /* Step Two: Make the Connection */
>> -        if (ap_proxy_connect_backend(scheme, backend, worker, r->server)) {
>> +        if (ap_proxy_check_connection(scheme, backend, r->server, 0,
>> +                                      PROXY_CHECK_CONN_EMPTY)
>> +                && ap_proxy_connect_backend(scheme, backend, worker,
>> +                                            r->server)) {
>>              ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00896)
>
> Probably, I think it comes from :
>
> Index: modules/proxy/proxy_util.c
> ===================================================================
> --- modules/proxy/proxy_util.c    (revision 1775191)
> +++ modules/proxy/proxy_util.c    (working copy)
> @@ -2754,10 +2754,11 @@ PROXY_DECLARE(apr_status_t) ap_proxy_check_connect
>      }
>
>      if (rv == APR_SUCCESS) {
> +        apr_sockaddr_t *local_addr = NULL;
> +        apr_socket_addr_get(&local_addr, APR_LOCAL, conn->sock);
>          ap_log_error(APLOG_MARK, APLOG_TRACE2, 0, server,
>                       "%s: reusing backend connection %pI<>%pI",
> -                     scheme, conn->connection->local_addr,
> -                     conn->connection->client_addr);
> +                     scheme, local_addr, conn->addr);
>      }
>      else if (conn->sock) {
>          /* This clears conn->scpool (and associated data), so backup and
> _
>
> because AJP has no conn->connection (conn->sock only).
>
> Konstantin, can you apply a patch?

Yes, that would be good but Konstantin wrote he is using the binary from 
Apache Lounge so we would probably need some help from Steffen.

I tried on Solaris with 2.4.25, default config plus snippet from 
Konstantin plus loading of mod_proxy and mod_proxy_ajp and I do not see 
a crash there. So it seems to be either platform specific or the 
reproduction scenario is more complex.

Regards,

Rainer

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] HTTPD 2.4.25 crash in mod_proxy (ajp)

Posted by Rainer Jung <ra...@kippdata.de>.
Hi Hajo,

Am 02.01.2017 um 11:54 schrieb Hajo Locke:
> Hello list,
>
> sorry guys. i think i have lost overview. Has this resulted in a public
> patch?

The fix in trunk (2.5) is

http://svn.apache.org/viewvc?view=revision&revision=1775775

It is proposed for backport to 2.4 but has not yet been applied there.

ApacheLounge has provided fixed binaries for Windows including the 
suggested fix. See the discussion at

https://www.apachelounge.com/viewtopic.php?p=34723

Regards,

Rainer

> Thanks,
> Hajo
>
> Am 23.12.2016 um 13:18 schrieb Konstantin Kolinko:
>> BCC: Steffen
>>
>> I did quick tests to verify whether shutdown issues are related to
>> mod_proxy.  They are not related.
>>
>> 2016-12-23 15:01 GMT+03:00 Konstantin Kolinko <kn...@gmail.com>:
>>> 2. Oddities at shutdown that I also mentioned are still there.
>>>
>>> I mean the following:
>>> - On Windows 7 (running as service, complex configuration):
>>> "AH00431: Parent: Forcing termination of child process" log message
>>>
>>> I do not see such message in old logs from 2.4.23.
>>>
>>> Maybe the process is still broken, although it did not crash?
>> Quick test:
>>
>> 1) Start server service, Stop server service   (No HTTPS requests served)
>>
>> No issue.
>>
>> [Fri Dec 23 15:06:22.542629 2016] [mpm_winnt:notice] [pid 2636:tid
>> 364] AH00422: Parent: Received shutdown signal -- Shutting down the
>> server.
>> [Fri Dec 23 15:06:24.570633 2016] [mpm_winnt:notice] [pid 3996:tid
>> 256] AH00364: Child: All worker threads have exited.
>> [Fri Dec 23 15:06:24.648633 2016] [mpm_winnt:notice] [pid 2636:tid
>> 364] AH00430: Parent: Child process 3996 exited successfully.
>>
>> 2) Start server service, Request a static page (root page of the
>> site), Stop server service.
>>
>> The child process does not stop, is terminated forcedly.
>>
>> [Fri Dec 23 15:07:02.353899 2016] [mpm_winnt:notice] [pid 3084:tid
>> 364] AH00422: Parent: Received shutdown signal -- Shutting down the
>> server.
>> [Fri Dec 23 15:07:32.368352 2016] [mpm_winnt:notice] [pid 3084:tid
>> 364] AH00431: Parent: Forcing termination of child process 5564
>>
>> So this issue is real, but it is not related to mod_proxy.
>>
>>
>>> - On Windows 10 (running as console, simple configuration example -
>>> GitHub):
>>>
>>> Before I hit Ctrl+C the error.log file is as follows:
>>> (I added additional line breaks to separate lines that are wrapped in
>>> e-mail.)
>>> ...
>>> After I hit Ctrl+C in HTTPD console window, it becomes:
>>> (I added additional line breaks to separate lines that are wrapped in
>>> e-mail.)
>>> ...
>>>
>>> The "Apache server interrupted..." line appears in the middle of the
>>> file, overwriting some of existing text.
>>>
>> Quick test:
>>
>> 1) Start server service, Stop server service   (No HTTPS requests served)
>>
>> This issue is observed.
>> ("Apache server interrupted..." line appears in the middle of the file).
>>
>> So this oddity is real, but it is not related to mod_proxy, not
>> related to processing of HTTP requests.
>>
>> Maybe this is not a real issue, just an oddity.
>>
>>
>> Best regards,
>> Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] HTTPD 2.4.25 crash in mod_proxy (ajp)

Posted by Hajo Locke <Ha...@gmx.de>.
Hello,

Am 02.01.2017 um 12:47 schrieb Yann Ylavic:
> On Mon, Jan 2, 2017 at 12:43 PM, Yann Ylavic <yl...@gmail.com> wrote:
>> On Mon, Jan 2, 2017 at 12:41 PM, Yann Ylavic <yl...@gmail.com> wrote:
>>> Hi Hajo,
>>>
>>> On Mon, Jan 2, 2017 at 11:54 AM, Hajo Locke <Ha...@gmx.de> wrote:
>>>> sorry guys. i think i have lost overview. Has this resulted in a public
>>>> patch?
>>> This patch: http://svn.apache.org/r1775775
>> Or here as plaintext:
>> http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/proxy_util.c?r1=1775775&r2=1775774&pathrev=1775775&view=patch
> Also, it seems that new ApacheLounge binaries include this fix:
> http://www.apachelounge.com/viewtopic.php?p=34723

thank you all for your help. I think i got it now.
I included the patch in my build-process.
>
>>> Regards,
>>> Yann.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
Thanks,
Hajo

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] HTTPD 2.4.25 crash in mod_proxy (ajp)

Posted by Yann Ylavic <yl...@gmail.com>.
On Mon, Jan 2, 2017 at 12:43 PM, Yann Ylavic <yl...@gmail.com> wrote:
> On Mon, Jan 2, 2017 at 12:41 PM, Yann Ylavic <yl...@gmail.com> wrote:
>> Hi Hajo,
>>
>> On Mon, Jan 2, 2017 at 11:54 AM, Hajo Locke <Ha...@gmx.de> wrote:
>>>
>>> sorry guys. i think i have lost overview. Has this resulted in a public
>>> patch?
>>
>> This patch: http://svn.apache.org/r1775775
>
> Or here as plaintext:
> http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/proxy_util.c?r1=1775775&r2=1775774&pathrev=1775775&view=patch

Also, it seems that new ApacheLounge binaries include this fix:
http://www.apachelounge.com/viewtopic.php?p=34723

>
>>
>> Regards,
>> Yann.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] HTTPD 2.4.25 crash in mod_proxy (ajp)

Posted by Yann Ylavic <yl...@gmail.com>.
On Mon, Jan 2, 2017 at 12:41 PM, Yann Ylavic <yl...@gmail.com> wrote:
> Hi Hajo,
>
> On Mon, Jan 2, 2017 at 11:54 AM, Hajo Locke <Ha...@gmx.de> wrote:
>>
>> sorry guys. i think i have lost overview. Has this resulted in a public
>> patch?
>
> This patch: http://svn.apache.org/r1775775

Or here as plaintext:
http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/proxy_util.c?r1=1775775&r2=1775774&pathrev=1775775&view=patch

>
> Regards,
> Yann.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] HTTPD 2.4.25 crash in mod_proxy (ajp)

Posted by Yann Ylavic <yl...@gmail.com>.
Hi Hajo,

On Mon, Jan 2, 2017 at 11:54 AM, Hajo Locke <Ha...@gmx.de> wrote:
>
> sorry guys. i think i have lost overview. Has this resulted in a public
> patch?

This patch: http://svn.apache.org/r1775775

Regards,
Yann.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] HTTPD 2.4.25 crash in mod_proxy (ajp)

Posted by Hajo Locke <Ha...@gmx.de>.
Hello list,

sorry guys. i think i have lost overview. Has this resulted in a public 
patch?

Thanks,
Hajo

Am 23.12.2016 um 13:18 schrieb Konstantin Kolinko:
> BCC: Steffen
>
> I did quick tests to verify whether shutdown issues are related to
> mod_proxy.  They are not related.
>
> 2016-12-23 15:01 GMT+03:00 Konstantin Kolinko <kn...@gmail.com>:
>> 2. Oddities at shutdown that I also mentioned are still there.
>>
>> I mean the following:
>> - On Windows 7 (running as service, complex configuration):
>> "AH00431: Parent: Forcing termination of child process" log message
>>
>> I do not see such message in old logs from 2.4.23.
>>
>> Maybe the process is still broken, although it did not crash?
> Quick test:
>
> 1) Start server service, Stop server service   (No HTTPS requests served)
>
> No issue.
>
> [Fri Dec 23 15:06:22.542629 2016] [mpm_winnt:notice] [pid 2636:tid
> 364] AH00422: Parent: Received shutdown signal -- Shutting down the
> server.
> [Fri Dec 23 15:06:24.570633 2016] [mpm_winnt:notice] [pid 3996:tid
> 256] AH00364: Child: All worker threads have exited.
> [Fri Dec 23 15:06:24.648633 2016] [mpm_winnt:notice] [pid 2636:tid
> 364] AH00430: Parent: Child process 3996 exited successfully.
>
> 2) Start server service, Request a static page (root page of the
> site), Stop server service.
>
> The child process does not stop, is terminated forcedly.
>
> [Fri Dec 23 15:07:02.353899 2016] [mpm_winnt:notice] [pid 3084:tid
> 364] AH00422: Parent: Received shutdown signal -- Shutting down the
> server.
> [Fri Dec 23 15:07:32.368352 2016] [mpm_winnt:notice] [pid 3084:tid
> 364] AH00431: Parent: Forcing termination of child process 5564
>
> So this issue is real, but it is not related to mod_proxy.
>
>
>> - On Windows 10 (running as console, simple configuration example - GitHub):
>>
>> Before I hit Ctrl+C the error.log file is as follows:
>> (I added additional line breaks to separate lines that are wrapped in e-mail.)
>> ...
>> After I hit Ctrl+C in HTTPD console window, it becomes:
>> (I added additional line breaks to separate lines that are wrapped in e-mail.)
>> ...
>>
>> The "Apache server interrupted..." line appears in the middle of the
>> file, overwriting some of existing text.
>>
> Quick test:
>
> 1) Start server service, Stop server service   (No HTTPS requests served)
>
> This issue is observed.
> ("Apache server interrupted..." line appears in the middle of the file).
>
> So this oddity is real, but it is not related to mod_proxy, not
> related to processing of HTTP requests.
>
> Maybe this is not a real issue, just an oddity.
>
>
> Best regards,
> Konstantin Kolinko
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] HTTPD 2.4.25 crash in mod_proxy (ajp)

Posted by Konstantin Kolinko <kn...@gmail.com>.
BCC: Steffen

I did quick tests to verify whether shutdown issues are related to
mod_proxy.  They are not related.

2016-12-23 15:01 GMT+03:00 Konstantin Kolinko <kn...@gmail.com>:
>
> 2. Oddities at shutdown that I also mentioned are still there.
>
> I mean the following:
> - On Windows 7 (running as service, complex configuration):
> "AH00431: Parent: Forcing termination of child process" log message
>
> I do not see such message in old logs from 2.4.23.
>
> Maybe the process is still broken, although it did not crash?

Quick test:

1) Start server service, Stop server service   (No HTTPS requests served)

No issue.

[Fri Dec 23 15:06:22.542629 2016] [mpm_winnt:notice] [pid 2636:tid
364] AH00422: Parent: Received shutdown signal -- Shutting down the
server.
[Fri Dec 23 15:06:24.570633 2016] [mpm_winnt:notice] [pid 3996:tid
256] AH00364: Child: All worker threads have exited.
[Fri Dec 23 15:06:24.648633 2016] [mpm_winnt:notice] [pid 2636:tid
364] AH00430: Parent: Child process 3996 exited successfully.

2) Start server service, Request a static page (root page of the
site), Stop server service.

The child process does not stop, is terminated forcedly.

[Fri Dec 23 15:07:02.353899 2016] [mpm_winnt:notice] [pid 3084:tid
364] AH00422: Parent: Received shutdown signal -- Shutting down the
server.
[Fri Dec 23 15:07:32.368352 2016] [mpm_winnt:notice] [pid 3084:tid
364] AH00431: Parent: Forcing termination of child process 5564

So this issue is real, but it is not related to mod_proxy.


> - On Windows 10 (running as console, simple configuration example - GitHub):
>
> Before I hit Ctrl+C the error.log file is as follows:
> (I added additional line breaks to separate lines that are wrapped in e-mail.)
> ...
> After I hit Ctrl+C in HTTPD console window, it becomes:
> (I added additional line breaks to separate lines that are wrapped in e-mail.)
> ...
>
> The "Apache server interrupted..." line appears in the middle of the
> file, overwriting some of existing text.
>

Quick test:

1) Start server service, Stop server service   (No HTTPS requests served)

This issue is observed.
("Apache server interrupted..." line appears in the middle of the file).

So this oddity is real, but it is not related to mod_proxy, not
related to processing of HTTP requests.

Maybe this is not a real issue, just an oddity.


Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] HTTPD 2.4.25 crash in mod_proxy (ajp)

Posted by Konstantin Kolinko <kn...@gmail.com>.
BCC: Steffen

2016-12-23 14:14 GMT+03:00 Rainer Jung <ra...@kippdata.de>:
> Am 23.12.2016 um 00:43 schrieb Yann Ylavic:
>>
>> On Fri, Dec 23, 2016 at 12:11 AM, Rainer Jung <ra...@kippdata.de>
>> wrote:
>>>
>>> Am 22.12.2016 um 23:56 schrieb Yann Ylavic:
>>>>
>>>>
>>>> I was thinking about always using the new code, maybe with an "if
>>>> APLOGtrace2(s)" around to save a getsockname() call when not needed.
>>>
>>>
>>> I see, thanks.
>>
>>
>> Committed in r1775775, and proposed for backport to 2.4.x.
>
>
> Steffen from ApacheLounge recompiled mod_proxy.so for 2.4 including that
> fix. I handed over the new mod_proxy.so for Windows to Konstantin and
> hopefully he can do a quick retest.
>

Thank you!

1. Good news:

I tried with this mod_proxy.so  and request processing issue is fixed.

No reports of a child process crash (at server side), and no delays in
request processing (from client's point of view).

I tested both simple configuration (Windows 10) that I published on
GitHub and original server configuration (Windows 7).


2. Oddities at shutdown that I also mentioned are still there.

I mean the following:
- On Windows 7 (running as service, complex configuration):
"AH00431: Parent: Forcing termination of child process" log message

I do not see such message in old logs from 2.4.23.

Maybe the process is still broken, although it did not crash?


- On Windows 10 (running as console, simple configuration example - GitHub):

Before I hit Ctrl+C the error.log file is as follows:
(I added additional line breaks to separate lines that are wrapped in e-mail.)
[[[
[Fri Dec 23 14:53:15.097194 2016] [mpm_winnt:notice] [pid 2564:tid
496] AH00455: Apache/2.4.25 (Win32) configured -- resuming normal
operations

[Fri Dec 23 14:53:15.099195 2016] [mpm_winnt:notice] [pid 2564:tid
496] AH00456: Apache Lounge VC14 Server built: Dec 17 2016 10:42:52

[Fri Dec 23 14:53:15.099195 2016] [core:notice] [pid 2564:tid 496]
AH00094: Command line: 'Apache24\\bin\\httpd.exe -d
D:/test_20161222/Apache24'

[Fri Dec 23 14:53:15.103194 2016] [mpm_winnt:notice] [pid 2564:tid
496] AH00418: Parent: Created child process 4356

[Fri Dec 23 14:53:17.337322 2016] [mpm_winnt:notice] [pid 4356:tid
560] AH00354: Child: Starting 64 worker threads.
]]]

After I hit Ctrl+C in HTTPD console window, it becomes:
(I added additional line breaks to separate lines that are wrapped in e-mail.)
[[[
[Fri Dec 23 14:53:15.097194 2016] [mpm_winnt:notice] [pid 2564:tid
496] AH00455: Apache/2.4.25 (Win32) configured -- resuming normal
operations

[Fri Dec 23 14:53:15.099195 2016] [mpm_winnt:notice] [pid 2564:tid
496] AH00456: Apache Lounge VC14 Server built: Dec 17 2016 10:42:52

[Fri Dec 23 14:53:15.099195 2016] [core:notice] [pid 2564:tid 496]
AH00094: Command line: 'Apache24\\bin\\httpd.exe -d
D:/test_20161222/Apache24'

[Fri Dec 23 14:53:15.103194 2016] [mpm_winnt:notice] [pid 2564:tid
496] AH00418: Parent: Created child process 4356

Apache server interrupted...

016] [mpm_winnt:notice] [pid 4356:tid 560] AH00354: Child: Starting 64
worker threads.

[Fri Dec 23 14:55:05.467693 2016] [mpm_winnt:notice] [pid 2564:tid
496] AH00422: Parent: Received shutdown signal -- Shutting down the
server.

[Fri Dec 23 14:55:07.515308 2016] [mpm_winnt:notice] [pid 4356:tid
560] AH00364: Child: All worker threads have exited.

[Fri Dec 23 14:55:07.612380 2016] [mpm_winnt:notice] [pid 2564:tid
496] AH00430: Parent: Child process 4356 exited successfully.
]]]

The "Apache server interrupted..." line appears in the middle of the
file, overwriting some of existing text.

Usually I do not run HTTPD in console mode (httpd.exe -w), so I do not
know whether this logging oddity is a new issue.

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] HTTPD 2.4.25 crash in mod_proxy (ajp)

Posted by Rainer Jung <ra...@kippdata.de>.
Am 23.12.2016 um 00:43 schrieb Yann Ylavic:
> On Fri, Dec 23, 2016 at 12:11 AM, Rainer Jung <ra...@kippdata.de> wrote:
>> Am 22.12.2016 um 23:56 schrieb Yann Ylavic:
>>>
>>> I was thinking about always using the new code, maybe with an "if
>>> APLOGtrace2(s)" around to save a getsockname() call when not needed.
>>
>> I see, thanks.
>
> Committed in r1775775, and proposed for backport to 2.4.x.

Steffen from ApacheLounge recompiled mod_proxy.so for 2.4 including that 
fix. I handed over the new mod_proxy.so for Windows to Konstantin and 
hopefully he can do a quick retest.

Regards,

Rainer

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] HTTPD 2.4.25 crash in mod_proxy (ajp)

Posted by Yann Ylavic <yl...@gmail.com>.
On Fri, Dec 23, 2016 at 12:11 AM, Rainer Jung <ra...@kippdata.de> wrote:
> Am 22.12.2016 um 23:56 schrieb Yann Ylavic:
>>
>> I was thinking about always using the new code, maybe with an "if
>> APLOGtrace2(s)" around to save a getsockname() call when not needed.
>
> I see, thanks.

Committed in r1775775, and proposed for backport to 2.4.x.

Regards,
Yann.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] HTTPD 2.4.25 crash in mod_proxy (ajp)

Posted by Rainer Jung <ra...@kippdata.de>.
Am 22.12.2016 um 23:56 schrieb Yann Ylavic:
> On Thu, Dec 22, 2016 at 11:38 PM, Rainer Jung <ra...@kippdata.de> wrote:
>> OK, looking closer at the suggested patch I see it fixes trace2-Loggging.
>> When I activate e.g. trace8, I do get the expected crash in
>> ap_proxy_check_connection.
>
> Yes, it depends on the LogLevel, and probably also on AP_HAVE_C99
> (which avoids ap_log_* args evaluation when the LogLevel doesn't
> match).

Ah yes, you are right.

> How is AP_HAVE_C99 defined with msvc (or the compiler used at apachelounge)?
> If undefined/zero, it may segfault at any level.

It seems we set AP_HAVE_C99 in include/ap_config.h depending on 
__STDC_VERSION__. Various sources suggest MSVC isn't setting 
__STDC_VERSION__:

https://connect.microsoft.com/VisualStudio/feedback/details/1006806/c99-support-is-missing-stdc-version

So it could well be, that Windows users run into this with any log level.

@Jim: it only happens when backend connections get reused (that's what 
the broken log statement is logging), so e.g. not on the first request.

>> @Yann: your patch is just to check whether that is the problem? I guess the
>> final patch will distinguish between conn->connection being NULL (then using
>> your suggested code) or non-NULL (then using the original code). Or would
>> you always use your suggested code?
>
> I was thinking about always using the new code, maybe with an "if
> APLOGtrace2(s)" around to save a getsockname() call when not needed.

I see, thanks.

Regards,

Rainer

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] HTTPD 2.4.25 crash in mod_proxy (ajp)

Posted by Yann Ylavic <yl...@gmail.com>.
On Thu, Dec 22, 2016 at 11:38 PM, Rainer Jung <ra...@kippdata.de> wrote:
> OK, looking closer at the suggested patch I see it fixes trace2-Loggging.
> When I activate e.g. trace8, I do get the expected crash in
> ap_proxy_check_connection.

Yes, it depends on the LogLevel, and probably also on AP_HAVE_C99
(which avoids ap_log_* args evaluation when the LogLevel doesn't
match).

How is AP_HAVE_C99 defined with msvc (or the compiler used at apachelounge)?
If undefined/zero, it may segfault at any level.

>
> @Yann: your patch is just to check whether that is the problem? I guess the
> final patch will distinguish between conn->connection being NULL (then using
> your suggested code) or non-NULL (then using the original code). Or would
> you always use your suggested code?

I was thinking about always using the new code, maybe with an "if
APLOGtrace2(s)" around to save a getsockname() call when not needed.

Regards,
Yann.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] HTTPD 2.4.25 crash in mod_proxy (ajp)

Posted by mo...@gmail.com.

Did you get any errors in access.logs 



Regards,

Subhendu Mohanty

phone-9604615166






On Fri, Dec 23, 2016 at 7:02 AM +0530, "Konstantin Kolinko" <kn...@gmail.com> wrote:










2016-12-23 1:38 GMT+03:00 Rainer Jung :
> OK, looking closer at the suggested patch I see it fixes trace2-Loggging.
> When I activate e.g. trace8, I do get the expected crash in
> ap_proxy_check_connection.
>
> @Konstantin: do you have LogLevel trace2 or higher? If s, do you also see
> crashes with trace1 or lower?

I have "LogLevel warn". (That line is the same as in default httpd.conf file).

I cannot build the Windows binaries.

I reproduced this with a simple configuration:
I created a repository with binaries and configuration at GitHub:
https://github.com/kkolinko/test_20161222

Configuration:
- defaults
- change listen address and port number (127.0.0.1:9090)
- change listen address in Tomcat (127.0.0.1)
- enable mod_proxy, mod_proxy_ajp
- configure proxying for examples webapp.

Reproduction:
- Start servers
- Browse to http://127.0.0.1:9090/examples/
- Refresh the page (F5), If it matters, the browser is Firefox 50.1.0


Notes:
1.Running the reproducing recipe from
https://github.com/kkolinko/test_20161222 on Windows 10:

- There is no "send crash report to MS" dialog, but the crash line in
the log and response delay are the same.
- The exit code mentioned in the log is different:
AH00428: Parent: child process 4576 exited with status 3221225477 -- Restarting.
- I am closing server consoles with Ctrl+C. There is some oddity
following "Apache server interrupted..." line in error.log.
The text is mangled, as if two processes are trying to write to the
same log file.


Complete log files:
== access.log:

127.0.0.1 - - [23/Dec/2016:04:20:01 +0300] "GET /examples/ HTTP/1.1" 200 1285
127.0.0.1 - - [23/Dec/2016:04:20:08 +0300] "GET /examples/ HTTP/1.1" 304 -

== error.log

[Fri Dec 23 04:19:48.411938 2016] [mpm_winnt:notice] [pid 7036:tid
532] AH00455: Apache/2.4.25 (Win32) configured -- resuming normal
operations
[Fri Dec 23 04:19:48.413938 2016] [mpm_winnt:notice] [pid 7036:tid
532] AH00456: Apache Lounge VC14 Server built: Dec 17 2016 10:42:52
[Fri Dec 23 04:19:48.413938 2016] [core:notice] [pid 7036:tid 532]
AH00094: Command line: 'Apache24\\bin\\httpd.exe -d
D:/test_20161222/Apache24'
[Fri Dec 23 04:19:48.418938 2016] [mpm_winnt:notice] [pid 7036:tid
532] AH00418: Parent: Created child process 4576
[Fri Dec 23 04:19:50.969085 2016] [mpm_winnt:notice] [pid 4576:tid
540] AH00354: Child: Starting 64 worker threads.
[Fri Dec 23 04:20:06.617748 2016] [mpm_winnt:notice] [pid 7036:tid
532] AH00428: Parent: child process 4576 exited with status 3221225477
-- Restarting.
[Fri Dec 23 04:20:06.672751 2016] [mpm_winnt:notice] [pid 7036:tid
532] AH00455: Apache/2.4.25 (Win32) configured -- resuming normal
operations
[Fri Dec 23 04:20:06.672751 2016] [mpm_winnt:notice] [pid 7036:tid
532] AH00456: Apache Lounge VC14 Server built: Dec 17 2016 10:42:52
[Fri Dec 23 04:20:06.672751 2016] [core:notice] [pid 7036:tid 532]
AH00094: Command line: 'Apache24\\bin\\httpd.exe -d
D:/test_20161222/Apache24'
[Fri Dec 23 04:20:06.676751 2016] [mpm_winnt:notice] [pid 7036:tid
532] AH00418: Parent: Created child process 2136
Apache server interrupted...
016] [mpm_winnt:notice] [pid 2136:tid 4] AH00354: Child: Starting 64
worker threads.
[Fri Dec 23 04:20:16.267611 2016] [mpm_winnt:notice] [pid 7036:tid
532] AH00422: Parent: Received shutdown signal -- Shutting down the
server.
[Fri Dec 23 04:20:18.269834 2016] [mpm_winnt:notice] [pid 2136:tid 4]
AH00364: Child: All worker threads have exited.
[Fri Dec 23 04:20:18.306863 2016] [mpm_winnt:notice] [pid 7036:tid
532] AH00430: Parent: Child process 2136 exited successfully.



2. Running HTTPD on Windows 7 as a service, there is notable delay
when I stop the service.
Log says:

[Fri Dec 23 02:30:45.867800 2016] [mpm_winnt:notice] [pid 2484:tid
352] AH00422: Parent: Received shutdown signal -- Shutting down the
server.
[Fri Dec 23 02:31:15.882252 2016] [mpm_winnt:notice] [pid 2484:tid
352] AH00431: Parent: Forcing termination of child process 1848


Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org







Re: [users@httpd] HTTPD 2.4.25 crash in mod_proxy (ajp)

Posted by Konstantin Kolinko <kn...@gmail.com>.
2016-12-23 1:38 GMT+03:00 Rainer Jung <ra...@kippdata.de>:
> OK, looking closer at the suggested patch I see it fixes trace2-Loggging.
> When I activate e.g. trace8, I do get the expected crash in
> ap_proxy_check_connection.
>
> @Konstantin: do you have LogLevel trace2 or higher? If s, do you also see
> crashes with trace1 or lower?

I have "LogLevel warn". (That line is the same as in default httpd.conf file).

I cannot build the Windows binaries.

I reproduced this with a simple configuration:
I created a repository with binaries and configuration at GitHub:
https://github.com/kkolinko/test_20161222

Configuration:
- defaults
- change listen address and port number (127.0.0.1:9090)
- change listen address in Tomcat (127.0.0.1)
- enable mod_proxy, mod_proxy_ajp
- configure proxying for examples webapp.

Reproduction:
- Start servers
- Browse to http://127.0.0.1:9090/examples/
- Refresh the page (F5), If it matters, the browser is Firefox 50.1.0


Notes:
1.Running the reproducing recipe from
https://github.com/kkolinko/test_20161222 on Windows 10:

- There is no "send crash report to MS" dialog, but the crash line in
the log and response delay are the same.
- The exit code mentioned in the log is different:
AH00428: Parent: child process 4576 exited with status 3221225477 -- Restarting.
- I am closing server consoles with Ctrl+C. There is some oddity
following "Apache server interrupted..." line in error.log.
The text is mangled, as if two processes are trying to write to the
same log file.


Complete log files:
== access.log:

127.0.0.1 - - [23/Dec/2016:04:20:01 +0300] "GET /examples/ HTTP/1.1" 200 1285
127.0.0.1 - - [23/Dec/2016:04:20:08 +0300] "GET /examples/ HTTP/1.1" 304 -

== error.log

[Fri Dec 23 04:19:48.411938 2016] [mpm_winnt:notice] [pid 7036:tid
532] AH00455: Apache/2.4.25 (Win32) configured -- resuming normal
operations
[Fri Dec 23 04:19:48.413938 2016] [mpm_winnt:notice] [pid 7036:tid
532] AH00456: Apache Lounge VC14 Server built: Dec 17 2016 10:42:52
[Fri Dec 23 04:19:48.413938 2016] [core:notice] [pid 7036:tid 532]
AH00094: Command line: 'Apache24\\bin\\httpd.exe -d
D:/test_20161222/Apache24'
[Fri Dec 23 04:19:48.418938 2016] [mpm_winnt:notice] [pid 7036:tid
532] AH00418: Parent: Created child process 4576
[Fri Dec 23 04:19:50.969085 2016] [mpm_winnt:notice] [pid 4576:tid
540] AH00354: Child: Starting 64 worker threads.
[Fri Dec 23 04:20:06.617748 2016] [mpm_winnt:notice] [pid 7036:tid
532] AH00428: Parent: child process 4576 exited with status 3221225477
-- Restarting.
[Fri Dec 23 04:20:06.672751 2016] [mpm_winnt:notice] [pid 7036:tid
532] AH00455: Apache/2.4.25 (Win32) configured -- resuming normal
operations
[Fri Dec 23 04:20:06.672751 2016] [mpm_winnt:notice] [pid 7036:tid
532] AH00456: Apache Lounge VC14 Server built: Dec 17 2016 10:42:52
[Fri Dec 23 04:20:06.672751 2016] [core:notice] [pid 7036:tid 532]
AH00094: Command line: 'Apache24\\bin\\httpd.exe -d
D:/test_20161222/Apache24'
[Fri Dec 23 04:20:06.676751 2016] [mpm_winnt:notice] [pid 7036:tid
532] AH00418: Parent: Created child process 2136
Apache server interrupted...
016] [mpm_winnt:notice] [pid 2136:tid 4] AH00354: Child: Starting 64
worker threads.
[Fri Dec 23 04:20:16.267611 2016] [mpm_winnt:notice] [pid 7036:tid
532] AH00422: Parent: Received shutdown signal -- Shutting down the
server.
[Fri Dec 23 04:20:18.269834 2016] [mpm_winnt:notice] [pid 2136:tid 4]
AH00364: Child: All worker threads have exited.
[Fri Dec 23 04:20:18.306863 2016] [mpm_winnt:notice] [pid 7036:tid
532] AH00430: Parent: Child process 2136 exited successfully.



2. Running HTTPD on Windows 7 as a service, there is notable delay
when I stop the service.
Log says:

[Fri Dec 23 02:30:45.867800 2016] [mpm_winnt:notice] [pid 2484:tid
352] AH00422: Parent: Received shutdown signal -- Shutting down the
server.
[Fri Dec 23 02:31:15.882252 2016] [mpm_winnt:notice] [pid 2484:tid
352] AH00431: Parent: Forcing termination of child process 1848


Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] HTTPD 2.4.25 crash in mod_proxy (ajp)

Posted by Rainer Jung <ra...@kippdata.de>.
OK, looking closer at the suggested patch I see it fixes 
trace2-Loggging. When I activate e.g. trace8, I do get the expected 
crash in ap_proxy_check_connection.

@Konstantin: do you have LogLevel trace2 or higher? If s, do you also 
see crashes with trace1 or lower?

@Yann: your patch is just to check whether that is the problem? I guess 
the final patch will distinguish between conn->connection being NULL 
(then using your suggested code) or non-NULL (then using the original 
code). Or would you always use your suggested code?

Thanks and regards,

Rainer

Am 22.12.2016 um 18:38 schrieb Yann Ylavic:
> On Thu, Dec 22, 2016 at 3:12 PM, Jim Jagielski <ji...@jagunet.com> wrote:
>> Hmmmm...
>>
>> I wonder if it's due to:
>>
>>          /* Step Two: Make the Connection */
>> -        if (ap_proxy_connect_backend(scheme, backend, worker, r->server)) {
>> +        if (ap_proxy_check_connection(scheme, backend, r->server, 0,
>> +                                      PROXY_CHECK_CONN_EMPTY)
>> +                && ap_proxy_connect_backend(scheme, backend, worker,
>> +                                            r->server)) {
>>              ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00896)
>
> Probably, I think it comes from :
>
> Index: modules/proxy/proxy_util.c
> ===================================================================
> --- modules/proxy/proxy_util.c    (revision 1775191)
> +++ modules/proxy/proxy_util.c    (working copy)
> @@ -2754,10 +2754,11 @@ PROXY_DECLARE(apr_status_t) ap_proxy_check_connect
>      }
>
>      if (rv == APR_SUCCESS) {
> +        apr_sockaddr_t *local_addr = NULL;
> +        apr_socket_addr_get(&local_addr, APR_LOCAL, conn->sock);
>          ap_log_error(APLOG_MARK, APLOG_TRACE2, 0, server,
>                       "%s: reusing backend connection %pI<>%pI",
> -                     scheme, conn->connection->local_addr,
> -                     conn->connection->client_addr);
> +                     scheme, local_addr, conn->addr);
>      }
>      else if (conn->sock) {
>          /* This clears conn->scpool (and associated data), so backup and
> _
>
> because AJP has no conn->connection (conn->sock only).
>
> Konstantin, can you apply a patch?
>
> Regards,
> Yann.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] HTTPD 2.4.25 crash in mod_proxy (ajp)

Posted by Yann Ylavic <yl...@gmail.com>.
On Thu, Dec 22, 2016 at 3:12 PM, Jim Jagielski <ji...@jagunet.com> wrote:
> Hmmmm...
>
> I wonder if it's due to:
>
>          /* Step Two: Make the Connection */
> -        if (ap_proxy_connect_backend(scheme, backend, worker, r->server)) {
> +        if (ap_proxy_check_connection(scheme, backend, r->server, 0,
> +                                      PROXY_CHECK_CONN_EMPTY)
> +                && ap_proxy_connect_backend(scheme, backend, worker,
> +                                            r->server)) {
>              ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00896)

Probably, I think it comes from :

Index: modules/proxy/proxy_util.c
===================================================================
--- modules/proxy/proxy_util.c    (revision 1775191)
+++ modules/proxy/proxy_util.c    (working copy)
@@ -2754,10 +2754,11 @@ PROXY_DECLARE(apr_status_t) ap_proxy_check_connect
     }

     if (rv == APR_SUCCESS) {
+        apr_sockaddr_t *local_addr = NULL;
+        apr_socket_addr_get(&local_addr, APR_LOCAL, conn->sock);
         ap_log_error(APLOG_MARK, APLOG_TRACE2, 0, server,
                      "%s: reusing backend connection %pI<>%pI",
-                     scheme, conn->connection->local_addr,
-                     conn->connection->client_addr);
+                     scheme, local_addr, conn->addr);
     }
     else if (conn->sock) {
         /* This clears conn->scpool (and associated data), so backup and
_

because AJP has no conn->connection (conn->sock only).

Konstantin, can you apply a patch?

Regards,
Yann.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] HTTPD 2.4.25 crash in mod_proxy (ajp)

Posted by Jim Jagielski <ji...@jaguNET.com>.
Hmmmm...

I wonder if it's due to:

         /* Step Two: Make the Connection */
-        if (ap_proxy_connect_backend(scheme, backend, worker, r->server)) {
+        if (ap_proxy_check_connection(scheme, backend, r->server, 0,
+                                      PROXY_CHECK_CONN_EMPTY)
+                && ap_proxy_connect_backend(scheme, backend, worker,
+                                            r->server)) {
             ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00896)


> On Dec 22, 2016, at 8:45 AM, Konstantin Kolinko <kn...@gmail.com> wrote:
> 
> Hi!
> 
> My configuration:
> 
> (HTTPS) -> HTTPD -> mod_proxy_ajp -> Apache Tomcat
> 
> running on Windows 7, using 32-bit version of HTTPD built by Apache Lounge
> http://www.apachelounge.com/download/
> 
> Apache 2.4.25 Win32
> httpd-2.4.25-win32-VC14.zip                             20 Dec '16 13.873K
> 
> (Actually the binary itself logs that its build date is 17 Dec:
> AH00456: Apache Lounge VC14 Server built: Dec 17 2016 10:42:52
> 
> 
> After upgrade from 2.4.23 to 2.4.25 every request that is proxied to
> Tomcat results in crash and restart of server child process.
> 
> At the server side I see that Windows generates a crash report
> (displays an UI dialog prompting to send a report to MS) and a child
> process crash is mentioned in HTTPD error log.
> 
> From client's view the request is just processed slowly. It does
> receive correct response, just waiting several seconds longer than
> usual.
> 
> 
> Requests that are not proxied (e.g. requests for static files, DAV
> requests) are served correctly.
> 
> 
> Fragment of HTTP error log:
> 
> [Thu Dec 22 15:08:12.015452 2016] [mpm_winnt:notice] [pid 5140:tid
> 364] AH00455: Apache/2.4.25 (Win32) OpenSSL/1.0.2j SVN/1.8.17
> configured -- resuming normal operations
> [Thu Dec 22 15:08:12.015452 2016] [mpm_winnt:notice] [pid 5140:tid
> 364] AH00456: Apache Lounge VC14 Server built: Dec 17 2016 10:42:52
> [Thu Dec 22 15:08:12.015452 2016] [core:notice] [pid 5140:tid 364]
> AH00094: Command line: 'D:\\Programs\\Server\\Apache2\\bin\\httpd.exe
> -d D:/Programs/Server/Apache2'
> [Thu Dec 22 15:08:12.031052 2016] [mpm_winnt:notice] [pid 5140:tid
> 364] AH00418: Parent: Created child process 3424
> [Thu Dec 22 15:08:15.681459 2016] [mpm_winnt:notice] [pid 3424:tid
> 256] AH00354: Child: Starting 30 worker threads.
> [Thu Dec 22 15:08:36.445095 2016] [mpm_winnt:notice] [pid 5140:tid
> 364] AH00428: Parent: child process 3424 exited with status 255 --
> Restarting.
> [Thu Dec 22 15:08:37.615097 2016] [mpm_winnt:notice] [pid 5140:tid
> 364] AH00455: Apache/2.4.25 (Win32) OpenSSL/1.0.2j SVN/1.8.17
> configured -- resuming normal operations
> [Thu Dec 22 15:08:37.615097 2016] [mpm_winnt:notice] [pid 5140:tid
> 364] AH00456: Apache Lounge VC14 Server built: Dec 17 2016 10:42:52
> [Thu Dec 22 15:08:37.615097 2016] [core:notice] [pid 5140:tid 364]
> AH00094: Command line: 'D:\\Programs\\Server\\Apache2\\bin\\httpd.exe
> -d D:/Programs/Server/Apache2'
> [Thu Dec 22 15:08:37.615097 2016] [mpm_winnt:notice] [pid 5140:tid
> 364] AH00418: Parent: Created child process 2244
> [Thu Dec 22 15:08:41.390304 2016] [mpm_winnt:notice] [pid 2244:tid
> 256] AH00354: Child: Starting 30 worker threads.
> [Thu Dec 22 15:08:54.546343 2016] [mpm_winnt:notice] [pid 5140:tid
> 364] AH00428: Parent: child process 2244 exited with status 255 --
> Restarting.
> 
> Fragment of MS crash report summary
> Note: all *.Name entries were in a different language, I translated
> them into English below.
> 
> Sig[0].Name=Application name
> Sig[0].Value=httpd.exe
> Sig[1].Name=Application version
> Sig[1].Value=2.4.25.0
> Sig[2].Name=Application timestamp
> Sig[2].Value=585506f4
> Sig[3].Name=Failed module name
> Sig[3].Value=mod_proxy.so
> Sig[4].Name=Failed module version
> Sig[4].Value=2.4.25.0
> Sig[5].Name=Failed module timestamp
> Sig[5].Value=585508a2
> Sig[6].Name=Exception code
> Sig[6].Value=c0000005
> Sig[7].Name=Exception offset
> Sig[7].Value=00006567
> 
> 
> Proxy configuration looks like the following:
> 
> <IfModule mod_proxy.c>
>    ProxyRequests off
> 
>    <Location /foo>
>        ProxyPass ajp://127.0.0.1:8009/foo
>        # Auth and Require directives here...
>    </Location>
> 
>    <Location /bar>
>        ProxyPass ajp://127.0.0.1:8009/bar
>        # Auth and Require directives here...
>    </Location>
> </IfModule>
> 
> 
> Best regards,
> Konstantin Kolinko
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org