[Bug 57685] New: Requests are denied while the mod_cgid daemon starts up

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 57685] New: Requests are denied while the mod_cgid daemon starts up

Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=57685

            Bug ID: 57685
           Summary: Requests are denied while the mod_cgid daemon starts
                    up
           Product: Apache httpd-2
           Version: 2.5-HEAD
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_cgid
          Assignee: [hidden email]
          Reporter: [hidden email]

Created attachment 32555
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=32555&action=edit
Delay cgi requests made before the cgid daemon has started

There is a short interval where httpd has started up and is accepting requests,
but the cgid daemon has not yet created a listening socket. In this interval,
any cgi requests made will receive a 503 response. While that response is
technically correct, it seems like a retry system could be more appropriate.

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

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 57685] Requests are denied while the mod_cgid daemon starts up

Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=57685

Edward Lu <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |PatchAvailable

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

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 57685] Requests are denied while the mod_cgid daemon starts up

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=57685

Edward Lu <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #32555|0                           |1
        is obsolete|                            |

--- Comment #1 from Edward Lu <[hidden email]> ---
Created attachment 32577
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=32577&action=edit
Delay cgi requests made before the cgid daemon has started

Rebased the patch onto trunk. Also made it not retry if the socket somehow goes
away.

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

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 57685] Requests are denied while the mod_cgid daemon starts up

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=57685

--- Comment #2 from Yann Ylavic <[hidden email]> ---
(In reply to Edward Lu from comment #1)
> Rebased the patch onto trunk. Also made it not retry if the socket somehow
> goes away.

You probably need to save errno after connect() and use that value in late
checks.

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

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 57685] Requests are denied while the mod_cgid daemon starts up

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=57685

--- Comment #3 from Edward Lu <[hidden email]> ---
Created attachment 32578
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=32578&action=edit
Delay cgi requests made before the cgid daemon has started

Good point. The errno currently isn't being saved in trunk, but it's being used
only in the log; I guess since we're using it for more in this patch, it's
better to be safe.

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

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 57685] Requests are denied while the mod_cgid daemon starts up

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=57685

--- Comment #4 from Yann Ylavic <[hidden email]> ---
Maybe declare connect_errno = 0 in the loop block so that it is initialized
when connect() succeeds?

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

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 57685] Requests are denied while the mod_cgid daemon starts up

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=57685

Edward Lu <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #32577|0                           |1
        is obsolete|                            |
  Attachment #32578|0                           |1
        is obsolete|                            |

--- Comment #5 from Edward Lu <[hidden email]> ---
Created attachment 32579
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=32579&action=edit
Delay cgi requests made before the cgid daemon has started

Done.

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

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 57685] Requests are denied while the mod_cgid daemon starts up

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=57685

Edward Lu <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #32579|0                           |1
        is obsolete|                            |

--- Comment #6 from Edward Lu <[hidden email]> ---
Created attachment 32580
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=32580&action=edit
Delay cgi requests made before the cgid daemon has started

Forgot to take out a call to sleep I was using while testing. Sorry about all
the revision spam.

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

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 57685] Requests are denied while the mod_cgid daemon starts up

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=57685

Eric Covener <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |FixedInTrunk

--- Comment #7 from Eric Covener <[hidden email]> ---
Thanks Ed and Yann, committed with minor tweaks in r1667385

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

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 57685] Requests are denied while the mod_cgid daemon starts up

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=57685

--- Comment #8 from Brad Newman <[hidden email]> ---
I encountered this problem with httpd 2.4.9, and tried the patch.  

Unfortunately, the 503 responses with the same "(2)No such file or directory:
AH01257: unable to connect to cgi daemon after multiple tries" error also
happen after a *graceful* restart of httpd.  

But the graceful restarts don't reset the scoreboard's restart_time, so if
httpd has been running for more than a minute when the graceful restart occurs,
we end up in the APLOGNO(02831) branch and don't benefit from any retries.

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

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 57685] Requests are denied while the mod_cgid daemon starts up

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=57685

Christophe JAILLET <[hidden email]> changed:

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

--- Comment #9 from Christophe JAILLET <[hidden email]> ---
This has been merged in 2.4.x in r1669559.

Is is part of 2.4.13

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Loading...