You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Bill Stoddard <bi...@wstoddard.com> on 2002/02/04 17:50:46 UTC

2.0.31 on Windows

Couple of problems noticed in a few minutes of testing

1. apache -k restart -n apache2 is broken. hangs forever and a new child process is never
started.

2. If I kill off the child process (by attaching and detaching a debugger for instance),
the parent should detect the child process exit and start a new child process. Instead,
the parent goes belly up.

Beta killers (for Windows at least).

Bill


Re: 2.0.31 on Windows

Posted by "William A. Rowe, Jr." <wr...@covalent.net>.
From: "Bill Stoddard" <bi...@wstoddard.com>
Sent: Monday, February 04, 2002 10:50 AM


> Couple of problems noticed in a few minutes of testing
> 
> 1. apache -k restart -n apache2 is broken. hangs forever and a new child process is never
> started.
> 
> 2. If I kill off the child process (by attaching and detaching a debugger for instance),
> the parent should detect the child process exit and start a new child process. Instead,
> the parent goes belly up.
> 
> Beta killers (for Windows at least).

Yup.

Can we have a bit of patience on .32, a day or two, so I can get these fixed?

Bill - which version of Win32?

Bill


Re: 2.0.31 on Windows

Posted by Dwayne Miller <dm...@espgroup.net>.
I guess I'm alittle confused... I don't see any errors related to NULL 
file handles.  And the thing about the ServerRoot starting with a /, it 
seems that the process found the config file okay, so wouldn't it also 
know what the ServerRoot should be?

And why doesn't Apache complain about the invalid ServerRoot variable 
when started from the command line?  Even with the -t option, the error 
is unrecognized.

I tried adding the -d option through the Service Manager to use when 
starting the service manually, with no change in behavior.

I'll keep looking...

Tks,
Dwayne

William A. Rowe, Jr. wrote:

>From: "Dwayne Miller" <dm...@espgroup.net>
>Sent: Monday, February 04, 2002 5:13 PM
>
>
>>>Which Win32 OS are you using, exactly?
>>>
>>I'm on Windows 2000, build 2195, SP2
>>
>
>Win2000/XP have NULL stdin/stdout/stderr handles...
>
>the create_process() invokes ap_open_stderr_log() which in turn invokes 
>apr_file_open_stderr() attempting to open a NULL STDERR handle.
>
>The patch I just committed reinvokes ap_open_stderr_log() after we jump into
>the service control manager track with a stderr pipe that we capture to the
>application event log.  
>
>The right solution is to finish the move of the service manager code in the
>apr_app_initialize code (apr_initialize + apr_app_main) which I hadn't finished
>yet, and didn't plan to for a week, maybe two =-/
>
>>I was looking at mpm_winnt.c, where the apr_filepath_merge() call is 
>>made.  It looks like it is trying to build the -d argument to use when 
>>starting the service, but it's obviously not having the desired effect.
>>
>
>That's where things are still goofy... I'm still debugging.
>
>More updates as they become available.
>
>Bill
>



Re: 2.0.31 on Windows

Posted by "William A. Rowe, Jr." <wr...@covalent.net>.
From: "Dwayne Miller" <dm...@espgroup.net>
Sent: Monday, February 04, 2002 5:13 PM


> >Which Win32 OS are you using, exactly?
> >
> I'm on Windows 2000, build 2195, SP2

Win2000/XP have NULL stdin/stdout/stderr handles...

the create_process() invokes ap_open_stderr_log() which in turn invokes 
apr_file_open_stderr() attempting to open a NULL STDERR handle.

The patch I just committed reinvokes ap_open_stderr_log() after we jump into
the service control manager track with a stderr pipe that we capture to the
application event log.  

The right solution is to finish the move of the service manager code in the
apr_app_initialize code (apr_initialize + apr_app_main) which I hadn't finished
yet, and didn't plan to for a week, maybe two =-/

> I was looking at mpm_winnt.c, where the apr_filepath_merge() call is 
> made.  It looks like it is trying to build the -d argument to use when 
> starting the service, but it's obviously not having the desired effect.

That's where things are still goofy... I'm still debugging.

More updates as they become available.

Bill


Re: 2.0.31 on Windows

Posted by Dwayne Miller <dm...@espgroup.net>.

William A. Rowe, Jr. wrote:

>From: "Dwayne Miller" <dm...@espgroup.net>
>To: <de...@httpd.apache.org>
>Sent: Monday, February 04, 2002 3:57 PM
>Subject: Re: 2.0.31 on Windows
>
>
>>I tracked down my problem with not being able to run Apache as a 
>>service.  The ServerRoot param was not set correctly.  It was /Apache2 
>>instead of D:/Apache2.  
>>This configuration file error was never logged anywhere.  Not only that, 
>>even with this setting, Apache would run fine from the command line.
>>
>
>The 'service' mode has all sorts of peculiar behaviors.  You've identified
>exactly what I'm seeing today.
>
>Which Win32 OS are you using, exactly?
>
I'm on Windows 2000, build 2195, SP2

>
>>But trying to start as a server, the ap_walk_config() routine, called in 
>>server/config.c returned the error  and called exit(1).
>>
>>Somewhere, this error should be presented to the user.  I'm just not 
>>sure where, or how to do it.
>>
>
>Definately the biggest 'bug' of the hour is the service logging.  It looks
>like some changes a little ways back in main.c borked us.
>
>And the second bug is the lack of -d -f args in the service's Parameters
>registry key ... ConfigArgs is coming up empty.
>
I was looking at mpm_winnt.c, where the apr_filepath_merge() call is 
made.  It looks like it is trying to build the -d argument to use when 
starting the service, but it's obviously not having the desired effect.

>
>The final bug is the simple one.  Why paths can't merge right in the service.
>I suspect that's the whole LocalService/non-Network situation going on... 
>but it's worthless to debug without resolving the bigger error logging fish :)
>
>The only real answer is moving the service code into apr, pre-main() or in
>tandem with apr_initialize() [starting with apr_app_main and getting the
>service stuff tied in.]  But I wanted to wait for .33 on those changes.
>
>Bill
>



Re: 2.0.31 on Windows

Posted by "William A. Rowe, Jr." <wr...@covalent.net>.
From: "Dwayne Miller" <dm...@espgroup.net>
To: <de...@httpd.apache.org>
Sent: Monday, February 04, 2002 3:57 PM
Subject: Re: 2.0.31 on Windows


> I tracked down my problem with not being able to run Apache as a 
> service.  The ServerRoot param was not set correctly.  It was /Apache2 
> instead of D:/Apache2.  
> This configuration file error was never logged anywhere.  Not only that, 
> even with this setting, Apache would run fine from the command line.

The 'service' mode has all sorts of peculiar behaviors.  You've identified
exactly what I'm seeing today.

Which Win32 OS are you using, exactly?

> But trying to start as a server, the ap_walk_config() routine, called in 
> server/config.c returned the error  and called exit(1).
> 
> Somewhere, this error should be presented to the user.  I'm just not 
> sure where, or how to do it.

Definately the biggest 'bug' of the hour is the service logging.  It looks
like some changes a little ways back in main.c borked us.

And the second bug is the lack of -d -f args in the service's Parameters
registry key ... ConfigArgs is coming up empty.

The final bug is the simple one.  Why paths can't merge right in the service.
I suspect that's the whole LocalService/non-Network situation going on... 
but it's worthless to debug without resolving the bigger error logging fish :)

The only real answer is moving the service code into apr, pre-main() or in
tandem with apr_initialize() [starting with apr_app_main and getting the
service stuff tied in.]  But I wanted to wait for .33 on those changes.

Bill


Re: 2.0.31 on Windows

Posted by Dwayne Miller <dm...@espgroup.net>.
I tracked down my problem with not being able to run Apache as a 
service.  The ServerRoot param was not set correctly.  It was /Apache2 
instead of D:/Apache2.  
This configuration file error was never logged anywhere.  Not only that, 
even with this setting, Apache would run fine from the command line.

But trying to start as a server, the ap_walk_config() routine, called in 
server/config.c returned the error  and called exit(1).

Somewhere, this error should be presented to the user.  I'm just not 
sure where, or how to do it.

Dwayne Miller wrote:

> I'm not familiar with the -n apache2 option, but I was just trying to 
> figure out why I can't get apache to run as a service.  I'm using the 
> -k start option, a message that it's starting the service appears, but 
> nothing happens.  In the service.c file, I added a line to print the 
> 'Failed to start the service' message as I was not seeing this message 
> in any of my log files.  It in fact fails to start the service.
>
> Bill Stoddard wrote:
>
>> Couple of problems noticed in a few minutes of testing
>>
>> 1. apache -k restart -n apache2 is broken. hangs forever and a new 
>> child process is never
>> started.
>>
>> 2. If I kill off the child process (by attaching and detaching a 
>> debugger for instance),
>> the parent should detect the child process exit and start a new child 
>> process. Instead,
>> the parent goes belly up.
>>
>> Beta killers (for Windows at least).
>>
>> Bill
>>
>
>



Re: 2.0.31 on Windows

Posted by Dwayne Miller <dm...@espgroup.net>.
I'm not familiar with the -n apache2 option, but I was just trying to 
figure out why I can't get apache to run as a service.  I'm using the -k 
start option, a message that it's starting the service appears, but 
nothing happens.  In the service.c file, I added a line to print the 
'Failed to start the service' message as I was not seeing this message 
in any of my log files.  It in fact fails to start the service.

Bill Stoddard wrote:

>Couple of problems noticed in a few minutes of testing
>
>1. apache -k restart -n apache2 is broken. hangs forever and a new child process is never
>started.
>
>2. If I kill off the child process (by attaching and detaching a debugger for instance),
>the parent should detect the child process exit and start a new child process. Instead,
>the parent goes belly up.
>
>Beta killers (for Windows at least).
>
>Bill
>