You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2009/01/29 23:52:44 UTC

DO NOT REPLY [Bug 46632] New: mod_jk's sockets close prematurely when the server forks a child

https://issues.apache.org/bugzilla/show_bug.cgi?id=46632

           Summary: mod_jk's sockets close prematurely when the server forks
                    a child
           Product: Tomcat Connectors
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_jk
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: jleslie@placebase.com


mod_jk registers its cleanup handler to be called both during plain_cleanup and
child_cleanup:

  apr_pool_cleanup_register(p, s, jk_apr_pool_cleanup, jk_apr_pool_cleanup);

So, whenever a server forks a child, ie, when mod_cgi creates its child
process, jk_apr_pool_cleanup() gets called.  jk_apr_pool_cleanup() does a
shutdown() on its sockets, which closes down the socket for the parent process.

Maybe it should use close() instead of shutdown(), or be registered as
apr_pool_cleanup_register(p, s, jk_apr_pool_cleanup, jk_apr_pool_cleanup_null);
?

Note, with mod_jk 1.2.18, a load balancing worker isn't able to recover from
this, and it brings down the whole LB worker for awhile.  1.2.27 seems to be
able to recover.

After a CGI is hit and jk's sockets get closed underneath it, the logs look
like:

[Wed Jan 28 21:39:50 2009] [22841:42432] [info] 
ajp_send_request::jk_ajp_common.c (1178): Socket 75 is not connected any more
(errno=-1)
[Wed Jan 28 21:39:50 2009] [22841:42432] [info] 
ajp_send_request::jk_ajp_common.c (1202): Error sending request. Will try
another pooled connection
[Wed Jan 28 21:39:50 2009] [22841:42432] [info] 
ajp_send_request::jk_ajp_common.c (1224): All endpoints are disconnected or
dead
[Wed Jan 28 21:39:50 2009] [22841:42432] [info]  ajp_service::jk_ajp_common.c
(1783): Sending request to tomcat failed,  recoverable operation attempt=1


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 46632] mod_jk's sockets close prematurely when the server forks a child

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46632

--- Comment #2 from Rainer Jung <ra...@kippdata.de> 2010-02-23 02:48:07 UTC ---
Will be part of 1.2.29.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 46632] mod_jk's sockets close prematurely when the server forks a child

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46632

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|http://localhost:8080/green |
                   |stone3/library?a=p&sa=home  |

--- Comment #5 from Mark Thomas <ma...@apache.org> 2010-04-06 15:00:58 UTC ---
Spam removal

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 46632] mod_jk's sockets close prematurely when the server forks a child

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46632

Rainer Jung <ra...@kippdata.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 46632] mod_jk's sockets close prematurely when the server forks a child

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46632

letuan88153 <le...@zing.vn> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|                            |http://localhost:8080/green
                   |                            |stone3/library?a=p&sa=home

--- Comment #4 from letuan88153 <le...@zing.vn> 2010-04-06 14:57:01 UTC ---
Name: Le Van Tuan
Class: LPI- IP-MAC
Country: Viet Nam

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 46632] mod_jk's sockets close prematurely when the server forks a child

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46632

--- Comment #1 from Mladen Turk <mt...@apache.org> 2009-12-21 03:26:27 UTC ---
Fixed in the SVN.

If needed the child cleanup certainly cannot be the same as standard pool
cleanup we are using currently.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 46632] mod_jk's sockets close prematurely when the server forks a child

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46632

Konstantin Kolinko <kn...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         OS/Version|Windows XP                  |Linux

--- Comment #6 from Konstantin Kolinko <kn...@gmail.com> 2010-04-06 22:52:25 UTC ---
Restoring the original value of OS/Version field.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 46632] mod_jk's sockets close prematurely when the server forks a child

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46632

letuan88153 <le...@zing.vn> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         OS/Version|Linux                       |Windows XP

--- Comment #3 from letuan88153 <le...@zing.vn> 2010-04-06 14:54:53 UTC ---
Name: Le Van Tuan
Class: LPI- IP-MAC
Country: Viet Nam

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org