You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Brandon Fosdick <bf...@bfoz.net> on 2005/11/16 05:46:07 UTC

gratuitous call to create_server_config?

I have a test box with 2.0.55 on it and it's set for a single vhost, with no "overall" host (I think). I also set StartServers, MinSpareServers, MaxSpareServers and MaxClients to 1, with the intent of having only one process running. So now I have only two processes running. Obviously I missed something. But, on with the show...

I set my test module to output to the error log whenever create_server_config is called and to log some info about the arguments. I'm now seeing two calls to create_server_config, the first time with server_rec=NULL and the second with a valid pointer. Then merge_sever_config is called to merge the two together. I haven't a clue why it wants me to merge a NULL pointer. Maybe this is related to having two processes running?

>From examining the server_hostname field it appears the non-NULL call is from the vhost.

Where is the other call coming from?
How do I stop it?
How do I get only one process running?

BTW, the -X argument doesn't work. It just hangs.

Re: gratuitous call to create_server_config?

Posted by Brandon Fosdick <bf...@bfoz.net>.
Joost de Heer wrote:
> There's a 'master process' and one child. Just the way you configured
> the thing. So seeing 2 processes is normal.

Assuming that the master process is responsible for the empty server config, I've set it to log an error for every attempt to create an empty server config. If I understand this correctly, I should only get one such log entry for every time I restart the server. However, I'm seeing many such entries, particularly when transferring a lot of files. At first I thought that it was due to httpd crashing and auto-restarting, but that doesn't appear to be the case. So what else could be causing this?

Re: gratuitous call to create_server_config?

Posted by Brandon Fosdick <bf...@bfoz.net>.
Sander Temme wrote:
> $ gdb bin/httpd
> <...>
> (gdb) run -X
> Starting program: /Volumes/Files/asf/httpd-2.2.x/bin/httpd -X

It seems that gdb doesn't like me...

(gdb) run -X
Starting program: /usr/local/sbin/httpd -X
gdb in realloc(): error: pointer to wrong page
Abort (core dumped)

Re: gratuitous call to create_server_config?

Posted by Sander Temme <sa...@temme.net>.
On Nov 16, 2005, at 12:27 AM, Joost de Heer wrote:

> I don't know the answer to the create_server_config, but:
>
>> How do I get only one process running?
>
> There's a 'master process' and one child. Just the way you  
> configured the thing. So seeing 2 processes is normal.

For debugging purposes, you can pass -X to httpd to prevent it form  
forking and stay in the foreground. Like so:

$ gdb bin/httpd
<...>
(gdb) run -X
Starting program: /Volumes/Files/asf/httpd-2.2.x/bin/httpd -X
<...>

S.

-- 
sander@temme.net              http://www.temme.net/sander/
PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF


Re: gratuitous call to create_server_config?

Posted by Joost de Heer <jo...@sanguis.xs4all.nl>.
I don't know the answer to the create_server_config, but:

> How do I get only one process running?

There's a 'master process' and one child. Just the way you configured the 
thing. So seeing 2 processes is normal.

Joost

Re: gratuitous call to create_server_config?

Posted by Brandon Fosdick <bf...@bfoz.net>.
I just tried returning NULL from create_server_config to see what would happen if I refused to create a config for the master process. Apparently that's a bad idea because it results in a segfault on startup. It seems like the server should be more robust in the face of such things. Has this been fixed in 2.1.9 or should I submit a bug?