Stefan Fritsch | 1 Feb 2008 10:41
Picon
Favicon

Re: PR42829: graceful restart with multiple listeners using prefork MPM can result in hung processes

Joe Orton wrote:
> I mentioned in the bug that the signal handler could cause undefined
> behaviour, but I'm not sure now whether that is true.  On Linux I can
> reproduce some cases where this will happen, which are all due to
> well-defined behaviour:
>
> 1) with some (default on Linux) accept mutex types,
> apr_proc_mutex_lock() will loop on EINTR.  Hence, children blocked
> waiting for the mutex do "hang" until the mutex is released.  Fixing
> this would need some APR work, new interfaces, blah

This is not a problem. On graceful-stop or reload the processes will get
the lock one by one and die (or hang somewhere else). I have never seen a
left over process hanging in this function.

> 2) prefork's apr_pollset_poll() loop-on-EINTR loop was not checking
> die_now; the child holding the mutex will not die immediately if poll
> fails with EINTR, and will hence appear to "hang" until a new connection
> is recevied.  Fixed by http://svn.apache.org/viewvc?rev=613260&view=rev

IMHO this is the same as 3), as apr_pollset_poll() will be called again
but with all fds already closed.

> I can also reproduce a third case, but I'm not sure about the cause:
>
> 3) apr_pollset_poll() is blocking despite the fact that the listening
> fds are supposedly already closed before entering the syscall.

This is the main problem in my experience.

(Continue reading)

Akins, Brian | 1 Feb 2008 13:50

Re: Transfer time in apache

On 1/30/08 11:25 PM, "Niko Wilfritz Sianipar Sianipar"
<niko_sianipar <at> yahoo.co.id> wrote:

> Please help me with this problem:
> 
> HOW TO get/know/calculate transfer time of a packet not the entire of a file
> (just a packet) that just sent to a client in Apache web server?

Register a network filter on the connection and keep track of time there.
It's not quit what you want, but it's close.

--

-- 
Brian Akins
Chief Operations Engineer
Turner Digital Media Technologies

Jim Jagielski | 1 Feb 2008 16:15
Favicon

Re: Gentle reminder of outstanding contributed patches


On Jan 31, 2008, at 4:35 PM, André Malo wrote:

> * William A. Rowe, Jr. wrote:
>
>> Jose,
>>
>> thank you for the gentle reminder. They really do work :)
>>
>> I'll review the trunk patch and its test for <location > in  
>> subrequests,
>> and propose for backport, since this is all tied into several bug  
>> fixes
>> and new features I'm working on.  Location walking isn't easy, only a
>> small handful of us know that code path, so forgive us for moving  
>> slowly.
>
> I still fear that it will break file based subrequest as in (e.g.)
> mod_xsendfile or mod_cern_meta setups. I'm quite short of time  
> though, so
> I'm not able to provide some tests here ATM. Sorry to be of no more  
> help
> here right now. However, it should be said if someone else may get  
> some
> round tuits...
>

I'm testing now... trying to isolate the codepaths that would
be affected and then creating tests that would trigger them...

(Continue reading)

Mladen Turk | 1 Feb 2008 22:57
Picon
Favicon
Gravatar

Re: svn commit: r617656 - /httpd/httpd/branches/2.2.x/STATUS

rpluem <at> apache.org wrote:
> 
> URL: http://svn.apache.org/viewvc?rev=617656&view=rev
> Log:
> * Add non functional comment patch and vote.
>

Are we really gone that far?
I simply wouldn't have the nerves for something like that :)

Regards,
Mladen

Ruediger Pluem | 1 Feb 2008 23:35
Picon
Favicon

Re: svn commit: r617656 - /httpd/httpd/branches/2.2.x/STATUS


On 02/01/2008 10:57 PM, Mladen Turk wrote:
> rpluem <at> apache.org wrote:
>>
>> URL: http://svn.apache.org/viewvc?rev=617656&view=rev
>> Log:
>> * Add non functional comment patch and vote.
>>
> 
> Are we really gone that far?
> I simply wouldn't have the nerves for something like that :)

It was my patch and I discovered the error during review and
wanted to keep 2.2.x and trunk the same after I fixed it in trunk.
It's that simple :-).

Regards

Rüdiger

Picon
Favicon

Balasan: Re: Transfer time in apache

How to do that?? What must I know about network filter??

"Akins, Brian" <Brian.Akins <at> turner.com> wrote:

On 1/30/08 11:25 PM, "Niko Wilfritz Sianipar Sianipar"
wrote:

> Please help me with this problem:
>
> HOW TO get/know/calculate transfer time of a packet not the entire of a file
> (just a packet) that just sent to a client in Apache web server?


Register a network filter on the connection and keep track of time there.
It's not quit what you want, but it's close.

--
Brian Akins
Chief Operations Engineer
Turner Digital Media Technologies

<at> ya hoo.co.id>

Bergabunglah dengan orang-orang yang berwawasan, di bidang Anda di Yahoo! Answers
Ruediger Pluem | 2 Feb 2008 17:54
Picon
Favicon

idempotent http methods

In r617822 I introduced the function is_idempotent as a static function
to mod_proxy_ajp.c. It seems quite clear that others could benefit from this
function as well. To what scope should I move this function?
Should I move it to proxy_util.c and thus extending the proxy API or should
I move it to the http module (e.g. http_protocol.c) and thus extend the core API?
Thoughts?

Nick Kew | 2 Feb 2008 19:08

Re: idempotent http methods (svn commit: r617822)

On Sat, 02 Feb 2008 16:35:40 -0000
rpluem <at> apache.org wrote:

> +static int is_idempotent(request_rec *r)
> +{
> +    /*
> +     * If the request has arguments it might not be idempotent as it
> might have
> +     * side-effects.
> +     */
> +    if (r->args) {
> +        return 0;
> +    }

That breaks RFC compliance, as soon as someone uses it to test
idempotence.

> +    /*
> +     * RFC2616 (9.1.2): GET, HEAD, PUT, DELETE, OPTIONS, TRACE are
> considered
> +     * idempotent. Hint: HEAD requests use M_GET as method number as
> well.
> +     */
> +    switch (r->method_number) {
> +        case M_GET:
> +        case M_DELETE:
> +        case M_PUT:
> +        case M_OPTIONS:
> +        case M_TRACE:
> +            return 1;
> +        /* Everything else is not considered idempotent. */
> +        default:
> +            return 0;
> +    }
> +}

Suggested solution: an enum, with a third value for an idempotent
method with arguments.  The caller then determines how to use it.

That's in response to your post to dev <at> .  OTTOMH it seems to me
to work as a core function.  How many existing handlers apply
an equivalent test?

--

-- 
Nick Kew

Application Development with Apache - the Apache Modules Book
http://www.apachetutor.org/

Ruediger Pluem | 2 Feb 2008 21:14
Picon
Favicon

Re: idempotent http methods (svn commit: r617822)


On 02/02/2008 07:08 PM, Nick Kew wrote:
> On Sat, 02 Feb 2008 16:35:40 -0000
> rpluem <at> apache.org wrote:
> 
> 
>> +static int is_idempotent(request_rec *r)
>> +{
>> +    /*
>> +     * If the request has arguments it might not be idempotent as it
>> might have
>> +     * side-effects.
>> +     */
>> +    if (r->args) {
>> +        return 0;
>> +    }
> 
> That breaks RFC compliance, as soon as someone uses it to test
> idempotence.

Thats the question: On one side you are correct that the RFC clearly states
in 9.1.2 that GET / HEAD is idempotent. OTOH in 13.9 the RFC says that GET / HEAD
requests with arguments can have significant side effects and therefore responses
to these queries should be only cached if the response contains an expiration time.
I may chose a bad name with is_idempotent as the purpose is to determine if we
can retry this request again once it has been sent to a backend (partially)  and
the real main argument for retrying or not retrying seems to me if the already
sent request can cause side-effects that prohibit to sent it again.
Non idempotent methods are said to have these, so we cannot sent them again.

> 
>> +    /*
>> +     * RFC2616 (9.1.2): GET, HEAD, PUT, DELETE, OPTIONS, TRACE are
>> considered
>> +     * idempotent. Hint: HEAD requests use M_GET as method number as
>> well.
>> +     */
>> +    switch (r->method_number) {
>> +        case M_GET:
>> +        case M_DELETE:
>> +        case M_PUT:
>> +        case M_OPTIONS:
>> +        case M_TRACE:
>> +            return 1;
>> +        /* Everything else is not considered idempotent. */
>> +        default:
>> +            return 0;
>> +    }
>> +}
> 
> Suggested solution: an enum, with a third value for an idempotent
> method with arguments.  The caller then determines how to use it.

So you think of something like this (ok, no enum, but similar):

#define METHOD_NON_IDEMPOTENT       0
#define METHOD_IDEMPOTENT           1
#define METHOD_IDEMPOTENT_WITH_ARGS 2

static int is_idempotent(request_rec *r)
{
    /*
     * RFC2616 (9.1.2): GET, HEAD, PUT, DELETE, OPTIONS, TRACE are considered
     * idempotent. Hint: HEAD requests use M_GET as method number as well.
     */
    switch (r->method_number) {
        case M_GET:
        case M_DELETE:
        case M_PUT:
        case M_OPTIONS:
        case M_TRACE:
            /*
             * If the request has arguments it might have side-effects and thus
             * it might be undesirable to resent it to a backend again·
             * automatically.
             */
            if (r->args) {
                return METHOD_IDEMPOTENT_WITH_ARGS;
            }
            return METHOD_IDEMPOTENT;
        /* Everything else is not considered idempotent. */
        default:
            return METHOD_NON_IDEMPOTENT;
    }
}

> 
> That's in response to your post to dev <at> .  OTTOMH it seems to me
> to work as a core function.  How many existing handlers apply
> an equivalent test?
> 

I know of none currently, but I assume that at least in mod_proxy(_http) the
need for this test will rise, once we try to finally solve the race problem in
mod_proxy_http when it sends a request over a connection that is closed just
at this moment.

Regards

Rüdiger

bugzilla | 4 Feb 2008 08:08
Picon
Favicon

Bug report for Apache httpd-1.3 [2008/02/03]

+---------------------------------------------------------------------------+
| Bugzilla Bug ID                                                           |
|     +---------------------------------------------------------------------+
|     | Status: UNC=Unconfirmed NEW=New         ASS=Assigned                |
|     |         OPN=Reopened    VER=Verified    (Skipped Closed/Resolved)   |
|     |   +-----------------------------------------------------------------+
|     |   | Severity: BLK=Blocker     CRI=Critical    MAJ=Major             |
|     |   |           MIN=Minor       NOR=Normal      ENH=Enhancement       |
|     |   |   +-------------------------------------------------------------+
|     |   |   | Date Posted                                                 |
|     |   |   |          +--------------------------------------------------+
|     |   |   |          | Description                                      |
|     |   |   |          |                                                  |
|10038|New|Min|2002-06-20|ab benchmaker hangs on 10K https URLs with keepali|
|10744|New|Nor|2002-07-12|suexec might fail to open log file                |
|10747|New|Maj|2002-07-12|ftp SIZE command and 'smart' ftp servers results i|
|10760|New|Maj|2002-07-12|empty ftp directory listings from cached ftp direc|
|14518|Opn|Nor|2002-11-13|QUERY_STRING parts not incorporated by mod_rewrite|
|16013|Opn|Nor|2003-01-13|Fooling mod_autoindex + IndexIgnore               |
|16631|Inf|Min|2003-01-31|.htaccess errors logged outside the virtual host l|
|17318|Inf|Cri|2003-02-23|Abend on deleting a temporary cache file if proxy |
|19279|Inf|Min|2003-04-24|Invalid chmod options in solaris build            |
|21637|Inf|Nor|2003-07-16|Timeout causes a status code of 200 to be logged  |
|21777|Inf|Min|2003-07-21|mod_mime_magic doesn't handle little gif files    |
|22618|New|Maj|2003-08-21|MultiViews invalidates PATH_TRANSLATED if cgi-wrap|
|25057|Inf|Maj|2003-11-27|Empty PUT access control in .htaccess overrides co|
|26126|New|Nor|2004-01-14|mod_include hangs with request body               |
|26152|Ass|Nor|2004-01-15|Apache 1.3.29 and below directory traversal vulner|
|26790|New|Maj|2004-02-09|error deleting old cache file                     |
|29257|Opn|Nor|2004-05-27|Problem with apache-1.3.31 and mod_frontpage (dso,|
|29498|New|Maj|2004-06-10|non-anonymous ftp broken in mod_proxy             |
|29538|Ass|Enh|2004-06-12|No facility used in ErrorLog to syslog            |
|30207|New|Nor|2004-07-20|Piped logs don't close read end of pipe           |
|30877|New|Nor|2004-08-26|htpasswd clears passwd file on Sun when /var/tmp i|
|30909|New|Cri|2004-08-28|sporadic segfault resulting in broken connections |
|31975|New|Nor|2004-10-29|httpd-1.3.33: buffer overflow in htpasswd if calle|
|32078|New|Enh|2004-11-05|clean up some compiler warnings                   |
|32539|New|   |2004-12-06|[PATCH] configure --enable-shared= brocken on SuSE|
|32974|Inf|Maj|2005-01-06|Client IP not set                                 |
|33086|New|Nor|2005-01-13|unconsistency betwen 404 displayed path and server|
|33495|Inf|Cri|2005-02-10|Apache crashes with "WSADuplicateSocket failed for|
|33772|New|Nor|2005-02-28|inconsistency in manual and error reporting by sue|
|33875|New|Enh|2005-03-07|Apache processes consuming CPU                    |
|34108|New|Nor|2005-03-21|mod_negotiation changes mtime to mtime of Document|
|34114|New|Nor|2005-03-21|Apache could interleave log entries when writing t|
|34404|Inf|Blk|2005-04-11|RewriteMap prg can not handle fpout               |
|34571|Inf|Maj|2005-04-22|Apache 1.3.33 stops logging  vhost                |
|34573|Inf|Maj|2005-04-22|.htaccess not working / mod_auth_mysql            |
|35424|New|Nor|2005-06-20|httpd disconnect in Timeout on CGI                |
|35439|New|Nor|2005-06-21|Problem with remove "/../" in util.c and mod_rewri|
|35547|Inf|Maj|2005-06-29|Problems with libapreq 1.2 and Apache::Cookie     |
|35555|New|Nor|2005-06-30|Can't find DBM on Debian Sarge                    |
|36375|Opn|Nor|2005-08-26|Cannot include http_config.h from C++ file        |
|37166|New|Nor|2005-10-19|Under certain conditions, mod_cgi delivers an empt|
|37185|New|Enh|2005-10-20|AddIcon, AddIconByType for OpenDocument format    |
|37252|New|   |2005-10-26|gen_test_char reject NLS string                   |
|38989|New|Nor|2006-03-15|restart + piped logs stalls httpd for 24 minutes (|
|39104|New|Enh|2006-03-25|[FR] fix build with -Wl,--as-needed               |
|39287|New|Nor|2006-04-12|Incorrect If-Modified-Since validation (due to syn|
|39937|New|Nor|2006-06-30|Garbage output if README.html is gzipped or compre|
|40176|New|Nor|2006-08-03|magic and mime                                    |
|40224|Ver|Nor|2006-08-10|System time crashes Apache  <at> year 2038 (win32 only?|
|41279|New|Nor|2007-01-02|Apache 1.3.37 htpasswd is vulnerable to buffer ove|
|42355|New|Maj|2007-05-08|Apache 1.3 permits non-rfc HTTP error code >= 600 |
|43626|New|Maj|2007-10-15|r->path_info returning invalid value              |
|43998|New|Min|2007-11-29|When mod_ssl   2.8.30-1.3.39 is  added to source t|
+-----+---+---+----------+--------------------------------------------------+
| Total   53 bugs                                                           |
+---------------------------------------------------------------------------+


Gmane