httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 12187] - Standard config with perchild; Apache is blocked
Date Fri, 11 Oct 2002 12:28:04 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12187>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12187

Standard config with perchild; Apache is blocked

admin@3in1hosting.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|WONTFIX                     |
            Version|2.0.40                      |HEAD



------- Additional Comments From admin@3in1hosting.com  2002-10-11 12:28 -------
Bug still exists in 2.0.43,
and I have additional info that may help.

Linux Debian 2.4.18
./configure --with-perchild

Standart httpd.conf with changes below:
---------------------------{
AcceptMutex fcntl
ListenPort 8080
LogLevel debug
ChildPerUserID #1001 #1001 1
ChildPerUserID #1002 #1002 1
ChildPerUserID #1003 #1003 1
NameVirtualHost *
<VirtualHost *>
        ServerName test1.mydomain.ru
        DocumentRoot "/usr/local/apache2/htdocs"
        AssignUserID #1001 #1001
</VirtualHost>
<VirtualHost *>
        ServerName test2.mydomain.ru
        DocumentRoot "/usr/local/apache2/htdocs"
        AssignUserID #1002 #1002
</VirtualHost>
<VirtualHost *>
        ServerName test3.mydomain.ru
        DocumentRoot "/usr/local/apache2/htdocs"
        AssignUserID #1003 #1003
</VirtualHost>
-----------------------------------------}

Now I start Apache and open log file:
-----------------------{
server:/usr/local/apache2# bin/apachectl start
[Fri Oct 11 15:17:43 2002] [debug] perchild.c(1994): filling out 
child_info_table; UID: 1001, GID: 1001, SD: 4 4, OUTPUT: 5 5, Child Num: 0
[Fri Oct 11 15:17:43 2002] [debug] perchild.c(1994): filling out 
child_info_table; UID: 1002, GID: 1002, SD: 6 6, OUTPUT: 7 7, Child Num: 1
[Fri Oct 11 15:17:43 2002] [debug] perchild.c(1994): filling out 
child_info_table; UID: 1003, GID: 1003, SD: 8 8, OUTPUT: 9 9, Child Num: 2
server:/usr/local/apache2# tail -f logs/error_log 
[Fri Oct 11 15:17:43 2002] [notice] Apache/2.0.43 (Unix) configured -- resuming 
normal operations
[Fri Oct 11 15:17:43 2002] [info] Server built: Oct 11 2002 13:48:09
[Fri Oct 11 15:17:43 2002] [debug] perchild.c(1405): AcceptMutex: fcntl 
(default: sysvsem)
------------------------------------}

now I open url http://test1.mydomain.ru
and browser stalls. error_log has news:
------------------------{
[Fri Oct 11 15:23:17 2002] [debug] perchild.c(1775): Determining if request 
should be passed. Child Num: 1, SD: 11, sd from table: 13, hostname from server: 
test1.mydomain.ru
[Fri Oct 11 15:23:17 2002] [debug] perchild.c(1784): Passing request.
[Fri Oct 11 15:23:17 2002] [debug] perchild.c(1639): passing request to another 
child.  Vhost: test1.mydomain.ru:8080, child 1 12
[Fri Oct 11 15:23:17 2002] [debug] perchild.c(1692): Writing message to 12, 
passing sd:  29
[Fri Oct 11 15:23:17 2002] [debug] perchild.c(1702): Writing message succeeded 
47
------------------}
I try anotuer url http://test2.mydomain.ru
and I'm lucky - browse several pages
----------------{
[Fri Oct 11 15:25:57 2002] [debug] perchild.c(1775): Determining if request 
should be passed. Child Num: 1, SD: 13, sd from table: 13, hostname from server: 
test2.mydomain.ru
[Fri Oct 11 15:26:03 2002] [debug] perchild.c(1775): Determining if request 
should be passed. Child Num: 1, SD: 13, sd from table: 13, hostname from server: 
test2.mydomain.ru
[Fri Oct 11 15:26:10 2002] [debug] perchild.c(1775): Determining if request 
should be passed. Child Num: 1, SD: 13, sd from table: 13, hostname from server: 
test2.mydomain.ru
-------------------}
the third domain http://test3.mydomain.ru
leads to stall again
-------------------{
[Fri Oct 11 15:27:46 2002] [debug] perchild.c(1775): Determining if request 
should be passed. Child Num: 1, SD: 18, sd from table: 13, hostname from server: 
test3.mydomain.ru
[Fri Oct 11 15:27:46 2002] [debug] perchild.c(1784): Passing request.
[Fri Oct 11 15:27:46 2002] [debug] perchild.c(1639): passing request to another 
child.  Vhost: test3.mydomain.ru:8080, child 1 19
[Fri Oct 11 15:27:46 2002] [debug] perchild.c(1692): Writing message to 19, 
passing sd:  29
[Fri Oct 11 15:27:46 2002] [debug] perchild.c(1702): Writing message succeeded 
53
---------------}

If I stop/start server I can be lucky with other domain.

Also there is a bug with cgi-scripts.
I browse to http://test2.mydomain.ru/cgi-bin/printenv
and see "503 Service Temporarily Unavailable" error.
error_log shows:
---------------{
[Fri Oct 11 15:32:04 2002] [error] [client 10.110.64.45] (13)Permission denied: 
unable to connect to cgi daemon after multiple tries: 
/usr/local/apache2/cgi-bin/printenv
---------------}

but it works all right once I
server:/usr/local/apache2# chmod 777 logs/cgisock

Also if I try the shell script 'showid':
---------{
#!/bin/sh
echo "Content-type: text/html\n\n"
id
-------}
as http://test2.mydomain.ru/cgi-bin/showid
it says: "uid=65534(nobody) gid=4294967295 groups=4294967295 "
i.e. default
User nobody
Group #-1
But I expect it to be "uid=1002 gid=1002 groups=1002" because of
AssignUserID #1002 #1002
in appropriate virtual section of apahce config.
So apache calls cgi-scripts under common user/group account.
But it opens html files under specific (from AssignUserID) account. I tested it 
by
-------{
server:/usr/local/apache2/htdocs# cp index.html.en test2.htm
server:/usr/local/apache2/htdocs# chown 1002 test2.htm 
server:/usr/local/apache2/htdocs# chmod 600 test2.htm 
-------}
and it opens all right as
http://test2.mydomain.ru/test2.htm
while http://test2.mydomain.ru/test1.htm and http://test2.mydomain.ru/test3.htm 
failed to open.

Well, one more note regarding
ChildPerUserID user_id group_id child_id
directive.
According to the docs (http://httpd.apache.org/docs-2.0/mod/perchild.html) 
child_id means which one child is to be assigned to user_id and group_id.
I.e.
ChildPerUserID user1 group1 4
ChildPerUserID user2 group2 5
means that fourth child is assigned to user1 and fifth child is assigned to 
user2. That doesn't correspond with practice. Abovementioned example with 
childid 4 and childid 5 leads to "Trying to use more child ID's than 
NumServers." error. childid 3 and 4 also fails, 2 and 3 work all right. As a 
surprise 3 and 3 also work all right. So as I see the sum of all childid 
parameters in all ChildPerUserID should be <= (NumServers + 1). For the previous 
Apache (2.0.40 and 2.0.36) it had to be <= NumServers.

Hope you could find a developers' time to have a look at these bugs. As I guess 
the perchild is a much wanted module for small shared-hosting companies like 
mine. So I personally looking forward for it since 2.0.36

If you need more info about abovementioned bugs I'm more than pleased to help.
Thank you for Apache.

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


Mime
View raw message