httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Erenkrantz <>
Subject Re: no seg fault recovery with worker or threaded
Date Wed, 24 Oct 2001 07:41:14 GMT
On Tue, Oct 23, 2001 at 05:00:04PM -0400, Greg Ames wrote:
> The original cause of the seg faults might be more dir_merge issues.
> fails fairly consistantly, and all of
> the recent merge problems we've seen have been for directory URLs.  But
> I'm more concerned that the MPMs aren't recovering from a worker thread
> seg fault.

Well, the redirect problem losing the vhost is related to revision 
1.28 of mod_alias.c.

<log of 1.28>
revision 1.28
date: 2001/05/06 23:27:12;  author: rbb;  state: Exp;  lines: +10 -1
Back out the recent change to ap_get_brigade, to make it use indirection
again.  The problem is that the amount of data read from the network,
is not necessarily the amount of data returned from the filters.  It is
possible for input filters to add bytes to the data read from the

To fix the original bug, I just removed the line from
that decremented r->remaining, we allow the http_filter to do that for

I have also removed an incorrect comment.

<diff between 1.27 and 1.28>
--- mod_alias.c 2001/02/18 02:58:52 1.27
+++ mod_alias.c 2001/05/06 23:27:12 1.28
@@ -335,7 +335,16 @@
            found = ap_pregsub(r->pool, p->real, r->uri,
                    p->regexp->re_nsub + 1, regm);
            if (found && doesc) {
-           found = ap_escape_uri(r->pool, found);
+                        uri_components uri;
+                        ap_parse_uri_components(r->pool, found, &uri);
+           found = ap_escape_uri(r->pool, uri.path);
+                        if (uri.query) {
+                            found = apr_pstrcat(r->pool, found, "?",
uri.query, NULL);
+                        }
+                        else if (uri.fragment) {
+                            found = apr_pstrcat(r->pool, found, "#",
uri.fragment, NULL);
+                        }
        else {


Did this sneak in (the commit log doesn't make much sense)?  I'm 
thinking this needs to be reverted back to what it was before.  I
looked at the code and thought, "Gee, shouldn't we just call
apr_escape_uri on this string?"  Looking through the history and
Apache 1.3, sure enough, that's what we used to do.  So, why
the change?

Surprised no one has caught this until now.  It also segfaults
with "RedirectMatch /foo(.*)$1" - not good.
-- justin

View raw message