apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject core dump in ap_send_fd
Date Thu, 20 Dec 2001 18:09:57 GMT
ap_send_fd expects the length of the input to send.

First of all is there a way not to specify the length? I've a fd (can be 
a pipe to a process), and I've no way to figure out the length of the 
output. How APR can handle this? This breaks the compatibility with 
send_fd from httpd-1.3.x.

Second, I've found something that appears to be a bug. If I tell 
ap_send_fd to send one char more than the size of the file that I try to 
send, it asserts and dumps core, the latter probably is bad.

[Fri Dec 21 02:03:29 2001] file core.c, line 2271, assertion 
"total_bytes_left > 0 && tmplen > 0" failed
[Fri Dec 21 02:03:30 2001] [error] server reached MaxClients setting, 
consider raising the MaxClients setting
[Fri Dec 21 02:03:30 2001] [notice] child pid 2607 exit signal Aborted 
(6), possible coredump in /home/stas/apache.org/mp-subproc/t

Here is the trace:

#0  0x402aea41 in kill () from /lib/libc.so.6
#1  0x40272f9b in raise (sig=6) at signals.c:65
#2  0x402afe73 in abort () from /lib/libc.so.6
#3  0x080b853d in ap_log_assert () at log.c:569
#4  0x080c4ab7 in sendfile_it_all (c=0x8bbf9b0, fd=0x8bd17d0, 
hdtr=0xbffff1d0,
     file_offset=344, file_bytes_left=1, total_bytes_left=1, flags=1)
     at core.c:2271
#5  0x080c5e7b in core_output_filter (f=0x8bbfc50, b=0x8bbfcc0) at 
core.c:3314
#6  0x080bf3e9 in ap_pass_brigade (next=0x8bbfc50, bb=0x8bd1858)
     at util_filter.c:388
#7  0x0808e440 in ap_http_header_filter (f=0x8bca888, b=0x8bd1858)
     at http_protocol.c:1241
#8  0x080bf3e9 in ap_pass_brigade (next=0x8bca888, bb=0x8bd1858)
     at util_filter.c:388
#9  0x080c10e5 in ap_content_length_filter (f=0x8bca870, b=0x8bd1858)
     at protocol.c:994
#10 0x080bf3e9 in ap_pass_brigade (next=0x8bca870, bb=0x8bd1878)
     at util_filter.c:388
#11 0x080c0a3c in end_output_stream (r=0x8bc38f0) at protocol.c:736
#12 0x08090338 in ap_process_request (r=0x8bc38f0) at http_request.c:301
#13 0x0808cb77 in ap_process_http_connection (c=0x8bbf9c0) at 
http_core.c:280
#14 0x080bda27 in ap_run_process_connection (c=0x8bbf9c0) at connection.c:84
#15 0x080b42fe in child_main (child_num_arg=0) at prefork.c:684
---Type <return> to continue, or q <return> to quit---
#16 0x080b4443 in make_child (s=0x8bae9b8, slot=0) at prefork.c:772
#17 0x080b44a4 in startup_children (number_to_start=1) at prefork.c:795
#18 0x080b4789 in ap_mpm_run (_pconf=0x81025c8, plog=0x81486e0, s=0x8bae9b8)
     at prefork.c:994
#19 0x080b9279 in main (argc=7, argv=0xbffff624) at main.c:457
#20 0x4029c6a0 in __libc_start_main () from /lib/libc.so.6

This is with:

*** /home/stas/httpd/prefork/bin/httpd -V
Server version: Apache/2.0.30-dev
Server built:   Dec 18 2001 16:22:19
Server's Module Magic Number: 20011212:0
Architecture:   32-bit
Server compiled with....
  -D APACHE_MPM_DIR="server/mpm/prefork"
  -D APR_HAS_SENDFILE
  -D APR_HAS_MMAP
  -D APR_HAVE_IPV6
  -D APR_USE_FCNTL_SERIALIZE
  -D APR_USE_PTHREAD_SERIALIZE
  -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
  -D APR_HAS_OTHER_CHILD
  -D AP_HAVE_RELIABLE_PIPED_LOGS
  -D HTTPD_ROOT="/home/stas/httpd/prefork"
  -D SUEXEC_BIN="/home/stas/httpd/prefork/bin/suexec"
  -D DEFAULT_ERRORLOG="logs/error_log"
  -D SERVER_CONFIG_FILE="conf/httpd.conf"

uname -a
Linux hope.stason.org 2.4.8-19mdk #1 Wed Sep 5 16:41:25 CEST 2001 i686 
unknown


_____________________________________________________________________
Stas Bekman             JAm_pH      --   Just Another mod_perl Hacker
http://stason.org/      mod_perl Guide   http://perl.apache.org/guide
mailto:stas@stason.org  http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/


Mime
View raw message