You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Justin Erenkrantz <je...@ebuilt.com> on 2001/12/02 01:30:19 UTC

Segfault with MMAPed files...

Requesting a large file segfaults with HEAD in bucket MMAP code.  
The bucket data looks like it is getting trounced somehow.

Looking into this now, but posting in case this strikes an
immediate chord with someone.  =)  -- justin

#0  0xdfb51614 in apr_mmap_offset (addr=0xdf1ff744, mmap=0x10, offset=0)
    at common.c:74
#1  0xdfb84a32 in mmap_read (b=0x8163de0, str=0xdf1ff804,
length=0xdf1ff800, 
    block=APR_BLOCK_READ) at apr_buckets_mmap.c:69
#2  0xdfb837df in file_read (e=0x8163de0, str=0xdf1ff804,
len=0xdf1ff800, 
    block=APR_BLOCK_READ) at apr_buckets_file.c:125
#3  0x80d6663 in core_output_filter (f=0x81b410c, b=0x81b415c) at
core.c:3081
#4  0x80cc3ea in ap_pass_brigade (next=0x81b410c, bb=0x81bc38c)
    at util_filter.c:388
#5  0x807e3e3 in ap_http_header_filter (f=0x81bc28c, b=0x81bc38c)
    at http_protocol.c:1239
---
#1  0xdfb84a32 in mmap_read (b=0x8163de0, str=0xdf1ff804,
length=0xdf1ff800, 
    block=APR_BLOCK_READ) at apr_buckets_mmap.c:69
69          ok = apr_mmap_offset(&addr, m->mmap, b->start);
(gdb) print *m
$1 = {refcount = {refcount = 1}, mmap = 0x10}
---


Re: Segfault with MMAPed files...

Posted by Cliff Woolley <cl...@yahoo.com>.
On Sat, 1 Dec 2001, Justin Erenkrantz wrote:

> Actually, it isn't a large file - it's a 0 length file (a bug in
> my archiving scripts trounced all of the files - so the files were
> actually empty).  This is even better.  =)  -- justin

Whoops!!  Patch on the way.

--Cliff


--------------------------------------------------------------
   Cliff Woolley
   cliffwoolley@yahoo.com
   Charlottesville, VA



Re: Segfault with MMAPed files...

Posted by Justin Erenkrantz <je...@ebuilt.com>.
On Sat, Dec 01, 2001 at 04:30:19PM -0800, Justin Erenkrantz wrote:
> Requesting a large file segfaults with HEAD in bucket MMAP code.  
> The bucket data looks like it is getting trounced somehow.
> 
> Looking into this now, but posting in case this strikes an
> immediate chord with someone.  =)  -- justin

Actually, it isn't a large file - it's a 0 length file (a bug in
my archiving scripts trounced all of the files - so the files were
actually empty).  This is even better.  =)  -- justin


Re: Segfault with MMAPed files...

Posted by Cliff Woolley <jw...@virginia.edu>.
On Sat, 1 Dec 2001, Justin Erenkrantz wrote:

> Requesting a large file segfaults with HEAD in bucket MMAP code.
> The bucket data looks like it is getting trounced somehow.
>
> Looking into this now, but posting in case this strikes an
> immediate chord with someone.  =)  -- justin

Crap, my commit must have broken something.  But I tested it with a 9MB
file before committing and it worked as expected.  Can you give me a more
specific case to repeat the bug with?

Thanks,
Cliff

--------------------------------------------------------------
   Cliff Woolley
   cliffwoolley@yahoo.com
   Charlottesville, VA