You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2006/08/29 11:13:28 UTC

DO NOT REPLY [Bug 40341] New: - Segfaults (in apr_bucket_alloc) and connection interruptions (by core_output_filter) on NetBSD with default cfg

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=40341>.
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=40341

           Summary: Segfaults (in apr_bucket_alloc) and connection
                    interruptions (by core_output_filter) on NetBSD with
                    default cfg
           Product: Apache httpd-2
           Version: 2.0.58
          Platform: Other
        OS/Version: NetBSD
            Status: NEW
          Severity: critical
          Priority: P2
         Component: Core
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: lkundrak@skosi.org


Hi!

After upgrading to apache 2.0.59 I experience a rather weird problem.
During retrieval of some files (like one generated in the example below) the
connection gets terminated, leaving a log message complaining that EOF was
found. Please note, that the file was gotten from /dev/zero, so it can't contain
an EOF character.

# dd if=/dev/zero bs=1k count=20 | hexdump -C > foo.txt
20+0 records in
20+0 records out
20480 bytes transferred in 0.001 secs (20480000 bytes/sec)
# 

$ wget -O - http://localhost/foo.txt
--11:00:01--  http://localhost/foo.txt
           => `-'
Resolving localhost... 127.0.0.1, ::1
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 386,547,056,641 (360G) [text/plain]

 0% [                                                                          
              ] 0             --.--K/s             00000000  00 00 00 00 00 00
00 00  00 00 00 00 00 00 00 00  |................|
*
00005000
 0% [                                                                          
              ] 90            --.--K/s             

11:00:01 (17.58 KB/s) - Connection closed at byte 90. Retrying.

--11:00:02--  http://localhost/foo.txt
  (try: 2) => `-'
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 206 Partial Content
Length: 386,547,056,641 (360G), 386,547,056,551 (360G) remaining [text/plain]

 0% [                                                                          
              ] 90            --.--K/s             

11:00:02 (0.00 B/s) - Connection closed at byte 90. Retrying.

[Tue Aug 29 10:27:07 2006] [info] [client 15.195.185.75] (70014)End of file
found: core_output_filter: writing data to the network

With some other files, and all clean 7-bit files, the connection doesn't get
terminated, but rather the worker crashes with a SIGSEGV. Let's see:

# dd if=/dev/urandom bs=1k count=10 | uuencode kwak > bleb.txt
10+0 records in
10+0 records out
10240 bytes transferred in 0.009 secs (1137777 bytes/sec)
#

$ wget -O - http://localhost/bleb.txt
--11:09:07--  http://localhost/bleb.txt
           => `-'
Resolving localhost... 127.0.0.1, ::1
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... No data received.
Retrying.

--11:09:08--  http://localhost/bleb.txt
  (try: 2) => `-'
Connecting to localhost|127.0.0.1|:80... failed: Connection refused.
Connecting to localhost|::1|:80... failed: Connection refused.
Resolving localhost... 127.0.0.1, ::1
Connecting to localhost|127.0.0.1|:80... failed: Connection refused.
Connecting to localhost|::1|:80... failed: Connection refused.
$

# gdb /usr/pkg/sbin/httpd
GNU gdb 5.3nb1
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386--netbsdelf"...(no debugging symbols found)...
(gdb) run -X
Starting program: /usr/pkg/sbin/httpd -X
(no debugging symbols found)...(no debugging symbols found)...(no debugging
symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...(no debugging
symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...(no debugging
symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...(no debugging
symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...(no debugging
symbols found)...(no debugging symbols found)...
Program received signal SIGSEGV, Segmentation fault.
[Switching to LWP 1]
0xbbba4b31 in apr_bucket_alloc () from /usr/pkg/lib/libaprutil-0.so.0
(gdb) bt
#0  0xbbba4b31 in apr_bucket_alloc () from /usr/pkg/lib/libaprutil-0.so.0
#1  0xbbba3546 in apr_bucket_simple_copy () from /usr/pkg/lib/libaprutil-0.so.0
#2  0xbbba337b in apr_bucket_shared_copy () from /usr/pkg/lib/libaprutil-0.so.0
#3  0x080dc000 in default_handler ()
#4  0x080c7308 in ap_run_handler ()
#5  0x080c7882 in ap_invoke_handler ()
#6  0x0809cc0f in ap_process_request ()
#7  0x080980c9 in ap_process_http_connection ()
#8  0x080d1ca4 in ap_run_process_connection ()
#9  0x080d1fb9 in ap_process_connection ()
#10 0x080c5c1f in child_main ()
#11 0x080c5de0 in make_child ()
#12 0x080c5e4d in startup_children ()
#13 0x080c65f3 in ap_mpm_run ()
#14 0x080cc1e7 in main ()
#15 0x080661a6 in ___start ()
(gdb) c
Continuing.

Program terminated with signal SIGSEGV, Segmentation fault.
The program no longer exists.
(gdb) 

The problem exists with http-std.conf standard configuration, as well as with
any other. My apache's version and configuration is below: (It's a standard
build from pkgsrc)

$ httpd -V 
Server version: Apache/2.0.59
Server built:   Jul 29 2006 00:52:17
Server's Module Magic Number: 20020903:12
Server loaded:  APR 0.9.12, APR-UTIL 0.9.12
Compiled using: APR 0.9.12, APR-UTIL 0.9.12
Architecture:   32-bit
Server compiled with....
 -D APACHE_MPM_DIR="server/mpm/prefork"
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses disabled)
 -D APR_USE_SYSVSEM_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="/usr/pkg"
 -D SUEXEC_BIN="/usr/pkg/bin/suexec"
 -D DEFAULT_PIDLOG="/var/run/httpd.pid"
 -D DEFAULT_SCOREBOARD="/var/run/apache_runtime_status"
 -D DEFAULT_LOCKFILE="/var/run/accept.lock"
 -D DEFAULT_ERRORLOG="/var/log/httpd/error.log"
 -D AP_TYPES_CONFIG_FILE="etc/httpd/mime.types"
 -D SERVER_CONFIG_FILE="etc/httpd/httpd.conf"
$

-- 
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: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 40341] - Segfaults (in apr_bucket_alloc) and connection interruptions (by core_output_filter) on NetBSD with default cfg

Posted by bu...@apache.org.
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=40341>.
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=40341


jorton@redhat.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO




------- Additional Comments From jorton@redhat.com  2006-08-29 17:53 -------
This looks very broken.  The 20K file is being reported as 360G in size!?

Can you build 2.0.59 from the source tarball (rather than using the NetBSD pkg
system), run the freshly-installed httpd using e.g.:

 gdb /path/to/httpd -X

and reproduce it like that?

-- 
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: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 40341] - Segfaults (in apr_bucket_alloc) and connection interruptions (by core_output_filter) on NetBSD with default cfg

Posted by bu...@apache.org.
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=40341>.
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=40341


lkundrak@skosi.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Platform|Other                       |PC




------- Additional Comments From lkundrak@skosi.org  2006-08-29 09:38 -------
UPDATE: after recompilation of both apr and apache am i no longer able to
reproduce the bug

-- 
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: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 40341] - Segfaults (in apr_bucket_alloc) and connection interruptions (by core_output_filter) on NetBSD with default cfg

Posted by bu...@apache.org.
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=40341>.
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=40341





------- Additional Comments From lkundrak@skosi.org  2006-08-29 12:09 -------
(In reply to comment #1)
> UPDATE: after recompilation of both apr and apache am i no longer able to
> reproduce the bug

Not true anymore...

-- 
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: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org