Re: Windows Laundry List pt3, mod_watchdog

2011-12-05 Thread Mladen Turk

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
123Build log was saved at 
file://c:\Workplace\httpd-2.4.x\modules\cache\Debug\BuildLog.htm
123mod_socache_dc - 1 error(s), 0 warning(s)


Then ...
126-- Build started: Project: mod_lbmethod_rr, Configuration: Debug Win32 
--
126Compiling...
126mod_lbmethod_rr.c
126.\mod_lbmethod_rr.c(54) : error C2039: 'name' : is not a member of 
'proxy_balancer'
126c:\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

2011-12-05 Thread Steffen
Here with VS 2008, a release build builds all modules out of the box, 
except Lua include for a .h file was not there.


And running fine for quite some users.



On Monday 05/12/2011 at 09:25, 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'.


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

123mod_socache_dc - 1 error(s), 0 warning(s)


Then ...
126-- Build started: Project: mod_lbmethod_rr, Configuration: 
Debug Win32 --

126Compiling...
126mod_lbmethod_rr.c
126.\mod_lbmethod_rr.c(54) : error C2039: 'name' : is not a member of 
'proxy_balancer'
126c:\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

2011-12-05 Thread Steffen
Here with VS 2008, a release build builds all modules out of the box, 
except Lua include for a .h file was not there.


And running fine for quite some users.



On Monday 05/12/2011 at 09:25, 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'.


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

123mod_socache_dc - 1 error(s), 0 warning(s)


Then ...
126-- Build started: Project: mod_lbmethod_rr, Configuration: 
Debug Win32 --

126Compiling...
126mod_lbmethod_rr.c
126.\mod_lbmethod_rr.c(54) : error C2039: 'name' : is not a member of 
'proxy_balancer'
126c:\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

2011-12-05 Thread Mladen Turk

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

2011-12-05 Thread Mladen Turk

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

2011-12-05 Thread Gregg L. Smith

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

2011-12-05 Thread Gregg L. Smith

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

2011-12-05 Thread Mladen Turk

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

2011-12-04 Thread Rainer Jung

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

2011-12-04 Thread Mladen Turk

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

2011-12-04 Thread William A. Rowe Jr.
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

2011-07-03 Thread William A. Rowe Jr.
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. I remember suggesting it be removed before, now I am a 
 little more
 adamant about it because it is really not needed, IMO of course. If you 
 really got to
 have it there, please  a
 _DEBUG to the #ifdef WIN32.
 This module is needed for heartmonitor (which has it's own problems coming 
 under
 separate cover). So, either it crashes on win32 or it works, your choice :-) 
 If your
 choice is let it fail, then get rid of it all, heartbeat, heartmonitor,
 lb_method_heartmonitor  watchdog on Windoze. Of course, if there is no 
 improvement on
 documentation, most of it will go bye bye come GA anyway, per what is stated 
 in STATUS.
 Attached patch just gets rid of it.

 
 This cannot be omitted.
 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.

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


Re: Windows Laundry List pt3, mod_watchdog

2011-07-03 Thread Mladen Turk

On 07/03/2011 07:40 PM, 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:

Attached patch just gets rid of it.



This cannot be omitted.
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.

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


OK. Now, that it builds I'll fix that.
(after I upgrade my nmake makefiles from 2.2 to 2.3)

I offered that to the httpd couple of years back,
but the rejection was: Who will maintain windows nmake files
IMHO those are few order of magnitude simpler then maintaining
VS workspace/solutions/projects (how many we have them currently?)
162 counting apr/apr-util/apr-iconv!
And that's easier to maintain? Yeah right.


Regards
--
^TM


Re: Windows Laundry List pt3, mod_watchdog

2011-07-03 Thread William A. Rowe Jr.
On 7/3/2011 1:49 PM, Mladen Turk wrote:
 On 07/03/2011 07:40 PM, 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:
 Attached patch just gets rid of it.


 This cannot be omitted.
 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.

 There is an ap_mpm_query to determine if this is the child.
 
 OK. Now, that it builds I'll fix that.
 (after I upgrade my nmake makefiles from 2.2 to 2.3)
 
 I offered that to the httpd couple of years back,
 but the rejection was: Who will maintain windows nmake files
 IMHO those are few order of magnitude simpler then maintaining
 VS workspace/solutions/projects (how many we have them currently?)
 162 counting apr/apr-util/apr-iconv!
 And that's easier to maintain? Yeah right.

The answer is generating them from build.py etc, just as we generate
the makefiles from config.m4.  In fact the right clues embedded in
config.m4 files might let us use these as sources ;-)


Re: Windows Laundry List pt3, mod_watchdog

2011-07-03 Thread William A. Rowe Jr.
On 7/3/2011 1:52 PM, William A. Rowe Jr. wrote:
 
 The answer is generating them from build.py etc, just as we generate
 the makefiles from config.m4.  In fact the right clues embedded in
 config.m4 files might let us use these as sources ;-)

And I'm willing to build the apr build.py features and config.m4 parser
(with some dnl WIN32: hints logic to work around the prickly stuff)
over the month of July.  I have some work stuff I have to wrap up in the
coming days, but then I'll jump on it.

If everyone likes the result, we'll purge the dsp/dsw/generated mak/dep
files (except for using a -win32-src.zip file which would pre-run the
py scripts).  The working solution should be a smaller tarball, since
vc6 generated mak files include quite a bit of cruft.

Mladen, do you know anything of cl.exe's ability to generate dependencies?
I've never looked before.


Re: Windows Laundry List pt3, mod_watchdog

2011-07-03 Thread Mladen Turk

On 07/03/2011 08:52 PM, William A. Rowe Jr. wrote:

On 7/3/2011 1:49 PM, Mladen Turk wrote:


I offered that to the httpd couple of years back,
but the rejection was: Who will maintain windows nmake files
IMHO those are few order of magnitude simpler then maintaining
VS workspace/solutions/projects (how many we have them currently?)
162 counting apr/apr-util/apr-iconv!
And that's easier to maintain? Yeah right.


The answer is generating them from build.py etc, just as we generate
the makefiles from config.m4.  In fact the right clues embedded in
config.m4 files might let us use these as sources ;-)


No problem, just throw in dependencies.
We already need cmake for pcre, perl for openssl, now python ...
Why not just using the entire internet ;) ?


Cheers
--
^TM


Re: Windows Laundry List pt3, mod_watchdog

2011-07-03 Thread Mladen Turk

On 07/03/2011 08:58 PM, William A. Rowe Jr. wrote:

On 7/3/2011 1:52 PM, William A. Rowe Jr. wrote:




Mladen, do you know anything of cl.exe's ability to generate dependencies?
I've never looked before.


I created an util
http://myomake.svn.sourceforge.net/viewvc/myomake/trunk/misc/tools/windows/mkdepend/
as part of my next pet project: make/nmake/cmake/build.py replacement :)


Cheers
--
^TM


Re: Re: Windows Laundry List pt3, mod_watchdog

2011-07-01 Thread Gregg L. Smith
Hi Mladen,

Ok, I'm just a dumb guy but for me, if it drops to the hard drive (it's built 
on my platform) it should at minimum load without crashing the server. I 
personally have no use for any of this (watchdog, 
heartmonitor,heartbeat,lbmethod_heartbeat) that I know of at this time, they do 
all seem to be connected though so let those that do have use on Windows get it 
actually working. 

That said, works may not be correct, but with this code in, it crashes the 
child every time the child tries to load the module. Without this code, the 
module loads and I start seeing this in my debug log;

[Thu Jun 30 23:15:38.003000 2011] [watchdog:debug] [pid 3428:tid 988] 
mod_watchdog.c(164): SingletonWatchdog (_heartmonitor_) running (3428)

Parent PID is 3992, not 3428. When I shut down Apache I do not see any 
processes laying around in a zombie state.

There is logs/httpd.pid as well. Not a great way to get this info but it is 
there in Windows and since you are doing something differently for windows, 
it's another option. How does the whatever writes that PID file get the parent 
PID, as of yet still a mystery to me. 

Ok, now since there is zero docs on this module, I am winging it a little. But 
looking at the TAKE1 there is only one directive, WatchdogInterval, being 
Watchdog interval in seconds, not a hard stretch. 

Leaving this Win32 specific code in however, the module will not work for 
whatever reason. 

Bed time.

Cheers,
Gregg

-Original Message-
From: Mladen Turk mt...@apache.org
To: dev@httpd.apache.org
Date: Fri, 01 Jul 2011 07:26:14 +0200
Subject: Re: Windows Laundry List pt3, mod_watchdog

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. I remember suggesting it be removed before, now I 
 am a little more adamant about it because it is really not needed, IMO of 
 course. If you really got to have it there, please  a
 _DEBUG to the #ifdef WIN32.
 This module is needed for heartmonitor (which has it's own problems coming 
 under separate cover). So, either it crashes on win32 or it works, your 
 choice :-) If your choice is let it fail, then get rid of it all, heartbeat, 
 heartmonitor, lb_method_heartmonitor  watchdog on Windoze. Of course, if 
 there is no improvement on documentation, most of it will go bye bye come GA 
 anyway, per what is stated in STATUS.
 Attached patch just gets rid of it.


This cannot be omitted.
Getting the parent pid means we we are in the child process, so we must not
init the parent watchdog thread (see 'return OK;')

Parent watchdog thread is windows specific and allows to have a
watchdog registered in parent process since the way how parent
and child cooperate is different then on unixes since there's no
fork() available.

How exactly does it crash? You say
either it crashes on win32 or it works with a smiley,
is not very informative.


Regards
--
^TM





Re: Windows Laundry List pt3, mod_watchdog

2011-07-01 Thread Mladen Turk

On 07/01/2011 09:10 AM, Gregg L. Smith wrote:

Hi Mladen,
Ok, I'm just a dumb guy but for me, if it drops to the hard drive (it's built 
on my platform) it should at minimum load without crashing the server.


Who said anything about being dumb.
If it crashes on load, it should be fixed. Simple as filing a bug report.


I personally have no use for any of this (watchdog, 
heartmonitor,heartbeat,lbmethod_heartbeat) that I know of at this time, they do 
all seem to be connected though so let those that do have use on Windows get it 
actually working.
That said, works may not be correct, but with this code in, it crashes the 
child every time the child tries to load the module. Without this code, the 
module loads and I start seeing this in my debug log;



OK. Checking now, and will try to implement a fix so it don't crashes.
Disabling code is not a solution (quick one yes).


Regards
--
^TM


Re: Windows Laundry List pt3, mod_watchdog

2011-06-30 Thread Mladen Turk

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. I remember suggesting it be removed before, now I am a little more 
adamant about it because it is really not needed, IMO of course. If you really got to 
have it there, please  a
_DEBUG to the #ifdef WIN32.
This module is needed for heartmonitor (which has it's own problems coming under 
separate cover). So, either it crashes on win32 or it works, your choice :-) If 
your choice is let it fail, then get rid of it all, heartbeat, heartmonitor, 
lb_method_heartmonitor  watchdog on Windoze. Of course, if there is no 
improvement on documentation, most of it will go bye bye come GA anyway, per what 
is stated in STATUS.
Attached patch just gets rid of it.



This cannot be omitted.
Getting the parent pid means we we are in the child process, so we must not
init the parent watchdog thread (see 'return OK;')

Parent watchdog thread is windows specific and allows to have a
watchdog registered in parent process since the way how parent
and child cooperate is different then on unixes since there's no
fork() available.

How exactly does it crash? You say
either it crashes on win32 or it works with a smiley,
is not very informative.


Regards
--
^TM