DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38403>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38403





------- Additional Comments From [EMAIL PROTECTED]  2006-02-04 12:44 -------
(In reply to comment #11)
Thanks for the update.

> 
> ap_core_input_filter (f=0x195740b8, b=0x9feddc8, mode=AP_MODE_GETLINE,
>     block=APR_BLOCK_READ, readbytes=0) at core_filters.c:141
> 141         BRIGADE_NORMALIZE(ctx->b);
> 
> 
> code says this:
> 
>     /* ### This is bad. */
>     BRIGADE_NORMALIZE(ctx->b);
> 
> 
> but I'm not sure whether "this is bad" refers to a possible bug or just a
> performance issue. 
> 
> Is there a simple way to inspect the BRIGADE in gdb ? I guess there's a 
> special

Yes, there is a helpful macro to inspect a brigade in gdb (dump_brigade). Please
have a look at the end of the section of
http://httpd.apache.org/dev/debugging.html#gdb

BRIGADE_NORMALIZE is a macro that does a loop. May it would be helpful to 
replace

BRIGADE_NORMALIZE(ctx->b);

with the expanded macro to see if the loop is never left.

do { 
    apr_bucket *e = APR_BRIGADE_FIRST(ctx->b); 
    do {  
        if (e->length == 0 && !APR_BUCKET_IS_METADATA(e)) { 
            apr_bucket *d; 
            d = APR_BUCKET_NEXT(e); 
            apr_bucket_delete(e); 
            e = d; 
        } 
        else { 
            e = APR_BUCKET_NEXT(e); 
        } 
    } while (!APR_BRIGADE_EMPTY(ctx->b) && (e != 
APR_BRIGADE_SENTINEL(ctx->b))); 
} while (0)

Furthermore it would be better to use step / next instead of stepi to check
where the code circles. stepi only executes one assembler instruction, whereas
step executes one line of C code.

In your initial comment to this bug you mentioned that a thread is looping with
close(-1). Would it be possible to get a backtrace of this thread?

So I would recommend the following next steps:

1. Expand the BRIGADE_NORMALIZE macro and recompile.
2. If the error occurs again do a dump_brigade ctx->b and attach the output
3. Check with if the BRIGADE_NORMALIZE loop is left. For this set a breakpoint
after the loop and cont. If you reach it the loop is left if not we circle in
the loop.
4. Try to get a backtrace of the thread that loops with close(-1)

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

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to