httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 57771] cleanup_script uses incorrect connection ID
Date Wed, 27 Apr 2016 00:53:11 GMT
https://bz.apache.org/bugzilla/show_bug.cgi?id=57771

Michael Thorpe <mike@gistnet.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |NEW

--- Comment #6 from Michael Thorpe <mike@gistnet.com> ---
(In reply to Eric Covener from comment #5)
> While my "cgid handler" comment is invalid because this is the INCLUDES
> filter calling into mod_cgid, I still don't see why there'd be any thread
> change here.

As a simple scenario, assume there are two MPM event threads:
1) Request A comes in and thread #1 starts handling it.
2) Request B comes in and thread #2 starts handling it.
3) Request A creates a CGI using conn_id=1.
4) Thread #1 puts request A to sleep while it waits for the CGI.
5) Request C comes in and thread #1 starts handling it (using conn_id=1).
6) Thread #2 finishes handling request B.
7) The CGI finishes, and thread #2 picks it up (changing its conn_id to 2)
since thread #1 is still handling request C.
8) Request A finishes and thread #2 enters the cleanup_script function.
9) Thread #2 stuffs the *current* connection ID (in this case, 2) and asks the
daemon for the PID for that conn_id, but that fails because no CGI was created
with that conn_id.
10) Thread #2 prints an error message saying that it couldn't clean up the CGI
for conn_id #1, because the error message code is correct even though the
daemon-request code is wrong.

> Can you capture "trace8" of this happening for a single request on a provided simple
SSI?

On a single request you'll never see the problem.  It's only when the server is
loaded that requests can get moved around between threads.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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


Mime
View raw message