You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Rainer Jung <ra...@kippdata.de> on 2011/12/04 17:46:08 UTC

Re: Windows Laundry List pt3, mod_watchdog

Picking up this old discussion:

On 03.07.2011 19:40, William A. Rowe Jr. wrote:
> On 7/1/2011 12:26 AM, Mladen Turk wrote:
>> On 07/01/2011 06:31 AM, Gregg L. Smith wrote:
>>> Hi folks,
>>>
>>> Well, this is the same chunk of Win32 specific debugging code causing this module to
>>> crash yet again.

Gregg: Can you tell us, in which line it is crashing?

>> Getting the parent pid means we we are in the child process, so we must not
>> init the parent watchdog thread (see 'return OK;')
>
> That's not how to detect it, you break -X mode.

Not sure, he wants to detect the parent. A quick look through the winnt 
MPM shows the env var is generated in

static int create_process(apr_pool_t *p, HANDLE *child_proc, HANDLE 
*child_exit_event, DWORD *child_pid)

so I guess it is not set when run in -X mode, which would lead to the 
correct result.

> There is an ap_mpm_query to determine if this is the child.

I had a short look at the MPM queries and didn't find an obvious fit. 
Are you talking about AP_MPMQ_GENERATION or which query do you mean?

I guess one could also check "parent_pid == my_pid" but as noted above 
the real crash might happen somewhere else. It would be nice if Gregg 
could provide further detail.

Regards,

Rainer

Re: Windows Laundry List pt3, mod_watchdog

Posted by "Gregg L. Smith" <gl...@gknw.net>.
On 12/5/2011 12:25 AM, Mladen Turk wrote:
> On 12/05/2011 08:41 AM, William A. Rowe Jr. wrote:
>> On 12/5/2011 1:22 AM, Mladen Turk wrote:
>>>
>>> Like said on another thread, give me couple of days and I'll fix the 
>>> issue.
>>> Well, as soon as I compile httpd-2.4 on windows which might be 
>>> tricky cause
>>> build procedure is completely broken and it doesn't compile any more 
>>> out of the box.
>>
>> It has been building for Gregg and I (at least somewhat recently)
>> so please be specific?  If this is your interesting psdk logic,
>> that might be a contributing factor.
>
> Nope. Its VS2008
> Put pcre, branches/apr-1.4.x, branches/apr-util-1.4.x, apr-iconv/trunk
> inside srclib
> Disabled deflate, ssl, lua, etc...
>
> Each project/module reports
> >Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
> >Copyright (C) Microsoft Corporation.  All rights reserved.
> >fatal error RC1107: invalid usage; use RC /? for Help
> >Project : error PRJ0002 : Error result 1 returned from 'C:\Program 
> Files\Microsoft SDKs\Windows\v6.0A\bin\rc.exe'.
>
Something that could probably be mentioned in compiling docs (if we have 
any)
   perl srclib/apr/build/cvtdsp.pl -2005

before converting the VC6 projects files

Regards



Re: Windows Laundry List pt3, mod_watchdog

Posted by Mladen Turk <mt...@apache.org>.
On 12/05/2011 08:41 AM, William A. Rowe Jr. wrote:
> On 12/5/2011 1:22 AM, Mladen Turk wrote:
>>
>> Like said on another thread, give me couple of days and I'll fix the issue.
>> Well, as soon as I compile httpd-2.4 on windows which might be tricky cause
>> build procedure is completely broken and it doesn't compile any more out of the box.
>
> It has been building for Gregg and I (at least somewhat recently)
> so please be specific?  If this is your interesting psdk logic,
> that might be a contributing factor.

Nope. Its VS2008
Put pcre, branches/apr-1.4.x, branches/apr-util-1.4.x, apr-iconv/trunk
inside srclib
Disabled deflate, ssl, lua, etc...

Each project/module reports
 >Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
 >Copyright (C) Microsoft Corporation.  All rights reserved.
 >fatal error RC1107: invalid usage; use RC /? for Help
 >Project : error PRJ0002 : Error result 1 returned from 'C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\rc.exe'.

Then ...
123>.\mod_socache_dc.c(28) : fatal error C1083: Cannot open include file: 'distcache/dc_client.h': No such file or directory
123>Build log was saved at "file://c:\Workplace\httpd-2.4.x\modules\cache\Debug\BuildLog.htm"
123>mod_socache_dc - 1 error(s), 0 warning(s)


Then ...
126>------ Build started: Project: mod_lbmethod_rr, Configuration: Debug Win32 ------
126>Compiling...
126>mod_lbmethod_rr.c
126>.\mod_lbmethod_rr.c(54) : error C2039: 'name' : is not a member of 'proxy_balancer'
126>        c:\Workplace\httpd-2.4.x\modules\proxy\mod_proxy.h(430) : see declaration of 'proxy_balancer'


And finally it gives:
========== Build: 13 succeeded, 106 failed, 0 up-to-date, 0 skipped ==========


Regards
-- 
^TM

Re: Windows Laundry List pt3, mod_watchdog

Posted by Mladen Turk <mt...@apache.org>.
On 12/05/2011 08:41 AM, William A. Rowe Jr. wrote:
> On 12/5/2011 1:22 AM, Mladen Turk wrote:
>>
>> Like said on another thread, give me couple of days and I'll fix the issue.
>> Well, as soon as I compile httpd-2.4 on windows which might be tricky cause
>> build procedure is completely broken and it doesn't compile any more out of the box.
>
> It has been building for Gregg and I (at least somewhat recently)
> so please be specific?  If this is your interesting psdk logic,
> that might be a contributing factor.


OK, been able to compile with VS6 and SDK 2003R2
However recent dependency on pcre.dll still makes problems building.

This means we longer can compile httpd without
third party dependency. What's worse CMake is required to build that
so this is a huge step back, since we are not self contained any more
for the (at lest bare) compilation.

OK, whatever. Should have pay attention earlier.
Anyhow, why we require pcre.dll? Think it can be statically compiled.
using
-copy srclib\pcre\pcre.$(src_dll)
instead
copy srclib\pcre\pcre.$(src_dll)
allows to have pcre statically compiled (even the one from 2.2.x works)



Regards
-- 
^TM

Re: Windows Laundry List pt3, mod_watchdog

Posted by "William A. Rowe Jr." <wr...@rowe-clan.net>.
On 12/5/2011 1:22 AM, Mladen Turk wrote:
> 
> Like said on another thread, give me couple of days and I'll fix the issue.
> Well, as soon as I compile httpd-2.4 on windows which might be tricky cause
> build procedure is completely broken and it doesn't compile any more out of the box.

It has been building for Gregg and I (at least somewhat recently)
so please be specific?  If this is your interesting psdk logic,
that might be a contributing factor.

Re: Windows Laundry List pt3, mod_watchdog

Posted by Mladen Turk <mt...@apache.org>.
On 12/04/2011 10:33 PM, Gregg L. Smith wrote:
> On 12/4/2011 8:46 AM, Rainer Jung wrote:
>> Picking up this old discussion:
>>
>> On 03.07.2011 19:40, William A. Rowe Jr. wrote:
>>> On 7/1/2011 12:26 AM, Mladen Turk wrote:
>>>> On 07/01/2011 06:31 AM, Gregg L. Smith wrote:
>>>>> Hi folks,
>>>>>
>>>>> Well, this is the same chunk of Win32 specific debugging code causing this module to
>>>>> crash yet again.
>>
>> Gregg: Can you tell us, in which line it is crashing?
> Debugger says here (see attached).
>
> WatchdogInterval set or not.
>

It actually means that pre-config failed.
I suspect that the change introducing

if (ap_state_query(AP_SQ_MAIN_STATE) == AP_SQ_MS_CREATE_PRE_CONFIG)
	/* First time config phase -- skip. */
    return OK;
inside pre_config hook is the cause.

It bypasses creation of wd_server_conf, and the child_hook is missing the server conf.
So either the first one should be deleted or something similar should be done on child hook.

Like said on another thread, give me couple of days and I'll fix the issue.
Well, as soon as I compile httpd-2.4 on windows which might be tricky cause
build procedure is completely broken and it doesn't compile any more out of the box.



Regards
-- 
^TM

Re: Windows Laundry List pt3, mod_watchdog

Posted by Mladen Turk <mt...@apache.org>.
On 12/05/2011 10:57 PM, Gregg L. Smith wrote:
> On 12/5/2011 5:15 AM, Mladen Turk wrote:
> Please backport to 2.4.
>

Like said, already backported.


Regards
-- 
^TM

Re: Windows Laundry List pt3, mod_watchdog

Posted by "Gregg L. Smith" <gl...@gknw.net>.
On 12/5/2011 5:15 AM, Mladen Turk wrote:
>
> Fixed in the trunk and 2.4.x
> Willing to retest?
>
> Regards

I see the change which was what I had suggested in the beginning, 
granted I did not have a real good technical reason other than "it then 
works" :)  I have not built trunk recently but making the exact 
modification to my 2.4 and yes, it is fixed, does not crash and the 
module works as it should. Please backport to 2.4.

Thanks Mladen!

I now revert my vote to drop this and heartbeat/heartmonitor modules 
from 2.4 on Windows.

Regards,

Gregg

Re: Windows Laundry List pt3, mod_watchdog

Posted by Mladen Turk <mt...@apache.org>.
On 12/04/2011 10:33 PM, Gregg L. Smith wrote:
> On 12/4/2011 8:46 AM, Rainer Jung wrote:
>> Picking up this old discussion:
>>>>>
>>>>> Well, this is the same chunk of Win32 specific debugging code causing this module to
>>>>> crash yet again.
>>
>> Gregg: Can you tell us, in which line it is crashing?
> Debugger says here (see attached).
>
> WatchdogInterval set or not.
>

Fixed in the trunk and 2.4.x
Willing to retest?

Regards
-- 
^TM

Re: Windows Laundry List pt3, mod_watchdog

Posted by "Gregg L. Smith" <gl...@gknw.net>.
On 12/4/2011 8:46 AM, Rainer Jung wrote:
> Picking up this old discussion:
>
> On 03.07.2011 19:40, William A. Rowe Jr. wrote:
>> On 7/1/2011 12:26 AM, Mladen Turk wrote:
>>> On 07/01/2011 06:31 AM, Gregg L. Smith wrote:
>>>> Hi folks,
>>>>
>>>> Well, this is the same chunk of Win32 specific debugging code 
>>>> causing this module to
>>>> crash yet again.
>
> Gregg: Can you tell us, in which line it is crashing?
Debugger says here (see attached).

WatchdogInterval set or not.

This is logged
[Mon Nov 14 10:09:23.655800 2011] [watchdog:debug] [pid 2708:tid 172] 
[2708 - 5020] child second stage post config hook
[Mon Nov 14 10:09:30.441800 2011] [mpm_winnt:notice] [pid 5020:tid 156] 
Parent: child process exited with status 3221225477 -- Restarting.

Regards,

Gregg