Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 91552 invoked from network); 15 Jan 2011 18:21:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 15 Jan 2011 18:21:11 -0000 Received: (qmail 59311 invoked by uid 500); 15 Jan 2011 18:21:11 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 59098 invoked by uid 500); 15 Jan 2011 18:21:10 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Id: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 59087 invoked by uid 99); 15 Jan 2011 18:21:09 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 15 Jan 2011 18:21:09 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jlpoole56@gmail.com designates 209.85.160.50 as permitted sender) Received: from [209.85.160.50] (HELO mail-pw0-f50.google.com) (209.85.160.50) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 15 Jan 2011 18:21:09 +0000 Received: by pwi4 with SMTP id 4so826358pwi.37 for ; Sat, 15 Jan 2011 10:20:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:message-id:date:from:reply-to:user-agent :mime-version:to:cc:subject:references:in-reply-to:content-type; bh=jX2Fey6NrtnQwetX+o7FNu2IIH7QChTDPm4iloxi/o8=; b=PXLTstDylwcE/OtR5ZU/JmimxpWZZK/cACFde0N3xdttYIu1Ix+05vw5X9qNHJ8RaE U9sHaaTkhSNSLJfMGi1kI9DKExqrKiG+4puQyo+E/WoyYI81qAN52zT3QquRgWhVe7Rx B9PLaHE2+a/7Lndk3lbn4pBNyUy6qfzvFexTQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type; b=gjbqEcYVgxUwV/VsQ7VvkFNCNrmoo2+MA1/O0dE3s13McVEKsNsgmxqCN3WoLgk/sH 3TYBgZiCYk1h+huFkFDJ6vCYvoSdjitskg6CHEvVTjdQdtgeQ13El+U7Cx2ZsHZ1Ppvm Gr/CfUPySv79Jg7kjunJBVPl8uXjbgk4+jroY= Received: by 10.142.177.10 with SMTP id z10mr1910756wfe.47.1295115648791; Sat, 15 Jan 2011 10:20:48 -0800 (PST) Received: from [192.168.168.2] (70-36-204-192.dsl.static.sonic.net [70.36.204.192]) by mx.google.com with ESMTPS id x18sm3604956wfa.11.2011.01.15.10.20.46 (version=SSLv3 cipher=RC4-MD5); Sat, 15 Jan 2011 10:20:47 -0800 (PST) Message-ID: <4D31E57E.9010904@gmail.com> Date: Sat, 15 Jan 2011 10:20:46 -0800 From: "John L. Poole" Reply-To: jlpoole56@gmail.com User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7 MIME-Version: 1.0 To: Sander Temme CC: dev@apr.apache.org Subject: Re: testprocmutex hangs References: <4D062CEE.8000508@gmail.com> <14D184AA-4BE7-4C7B-83F9-852586D6CB0D@temme.net> <4D120916.7080804@gmail.com> <01978FE8-1D9C-43F9-94E7-A45258774E92@temme.net> In-Reply-To: <01978FE8-1D9C-43F9-94E7-A45258774E92@temme.net> Content-Type: multipart/mixed; boundary="------------040000020409050402010009" This is a multi-part message in MIME format. --------------040000020409050402010009 Content-Type: multipart/alternative; boundary="------------080103000307000409020901" --------------080103000307000409020901 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi Sander, Dismayed, I needed to take a break from the fact that Apache on my ARM (SheevaPlug) rapidly dies with a segmentation fault provided little trail with which to debug. Background: Here are the bugs I filed in Gentoo which simply further document the problem I experienced. https://bugs.gentoo.org/show_bug.cgi?id=347910 www-servers/apache-2.2.16 builds then Segmentation faults at start up I'm the only commentator https://bugs.gentoo.org/show_bug.cgi?id=347908 www-apache/libapreq2-2.12 fails to build: configure: error: Bad apache2 binary (/usr/sbin/apache2) I'm basically the only commentator (fixed an ommission) I then posted to this mailing list on 12/13/2010. The last suggestion was Sander's, so here is what I did. I'm not quite sure how I should execute the "on top" part of your suggestion Current install. Apache: I downloaded httpd-2.2.16.tar.bz2 and created a working directory at /usr/local/src/httpd-2.2.16 I created an output working area: /var/tmp/apache/httpd Within /usr/local/src/httpd-2.2.16 I did the following: plug httpd-2.2.16 # CFLAGS="-DDEBUG -O0"; export CFLAGS plug httpd-2.2.16 # ./configure --prefix=/var/tmp/apache/httpd --enable-maintainer-mode plug httpd-2.2.16 # make plug httpd-2.2.16 # make install plug httpd-2.2.16 # cd /var/tmp/apache/httpd/bin plug httpd-2.2.16 # gdb httpd GNU gdb (Gentoo 7.0.1 p1) 7.0.1 Copyright (C) 2009 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "armv5tel-softfloat-linux-gnueabi". For bug reporting instructions, please see: ... Reading symbols from /usr/local/src/httpd-2.2.16/httpd...(no debugging symbols found)...done. warning: not using untrusted file "/usr/local/src/httpd-2.2.16/.gdbinit" (gdb) run -X Starting program: /usr/local/src/httpd-2.2.16/httpd -X [Thread debugging using libthread_db enabled] Program received signal SIGSEGV, Segmentation fault. 0x402600e4 in apr_palloc () from /usr/lib/libapr-1.so.0 (gdb)) bt #0 0x402600e4 in apr_palloc () from /usr/lib/libapr-1.so.0 #1 0x4025a988 in apr_array_make () from /usr/lib/libapr-1.so.0 #2 0x400ddb54 in apr_hook_sort_register () from /usr/lib/libaprutil-1.so.0 #3 0x00051f74 in ap_hook_create_connection () #4 0x0003f838 in register_hooks () #5 0x000485e4 in ap_register_hooks () #6 0x00048974 in ap_add_module () #7 0x00048d64 in ap_setup_prelinked_modules () #8 0x00028be0 in main () (gdb) quit ... plug httpd-2.2.16 # gdb httpd GNU gdb (Gentoo 7.0.1 p1) 7.0.1 Copyright (C) 2009 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "armv5tel-softfloat-linux-gnueabi". For bug reporting instructions, please see: ... Reading symbols from /usr/local/src/httpd-2.2.16/httpd...(no debugging symbols found)...done. warning: not using untrusted file "/usr/local/src/httpd-2.2.16/.gdbinit" (gdb) run Starting program: /usr/local/src/httpd-2.2.16/httpd [Thread debugging using libthread_db enabled] Program received signal SIGSEGV, Segmentation fault. 0x402600e4 in apr_palloc () from /usr/lib/libapr-1.so.0 (gdb) bt #0 0x402600e4 in apr_palloc () from /usr/lib/libapr-1.so.0 #1 0x4025a988 in apr_array_make () from /usr/lib/libapr-1.so.0 #2 0x400ddb54 in apr_hook_sort_register () from /usr/lib/libaprutil-1.so.0 #3 0x00051f74 in ap_hook_create_connection () #4 0x0003f838 in register_hooks () #5 0x000485e4 in ap_register_hooks () #6 0x00048974 in ap_add_module () #7 0x00048d64 in ap_setup_prelinked_modules () #8 0x00028be0 in main () (gdb) APR: I have apr-1.4.2 downloaded, but am not sure how to install it so that my custom install of apache at /var/tmp/apache utilizes it. plug apr-1.4.2 #make clean plug apr-1.4.2 # ... plug apr-1.4.2 # echo $CFLAGS -DDEBUG -O0 plug apr-1.4.2 # ./configure --enable-maintainer-mode plug apr-1.4.2 # make The output from ./configure, make,make install, and gdb are posted at: http://snipt.org/wknpm For convenience, here is the back trace: #0 0x402600e4 in apr_palloc () from /usr/lib/libapr-1.so.0 #1 0x4025a988 in apr_array_make () from /usr/lib/libapr-1.so.0 #2 0x400ddb54 in apr_hook_sort_register () from /usr/lib/libaprutil-1.so.0 #3 0x00051f74 in ap_hook_create_connection () #4 0x0003f838 in register_hooks () #5 0x000485e4 in ap_register_hooks () #6 0x00048974 in ap_add_module () #7 0x00048d64 in ap_setup_prelinked_modules () #8 0x00028be0 in main () Please let me know if there is any other compile or debug step I should take to create something helpful to identify the problem. Thank you for you help, John On 12/22/2010 7:57 AM, Sander Temme wrote: > On Dec 22, 2010, at 6:20 AM, John L. Poole wrote: > >> Am I missing something, as the output above seems the same as when I did not have debugging > How are you making Apache use your new library? I suggest compiling your own Apache on top of your own APR/APR-Util, and debugging against that. > > In the system build, something is clearly happening that horribly confuses the debugger. > > S. > -- John Laurence Poole P.O. Box 6566 Napa CA 94581-6566 707-812-1323 office --------------080103000307000409020901 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hi Sander,

Dismayed, I needed to take a break from the fact that Apache on my ARM (SheevaPlug) rapidly dies with a segmentation fault provided little trail with which to debug. 

Background:
Here are the bugs I filed in Gentoo which simply further document the problem I experienced.

https://bugs.gentoo.org/show_bug.cgi?id=347910
www-servers/apache-2.2.16 builds then Segmentation faults at start up
I'm the only commentator

https://bugs.gentoo.org/show_bug.cgi?id=347908
www-apache/libapreq2-2.12 fails to build: configure: error: Bad apache2 binary (/usr/sbin/apache2)
I'm basically the only commentator (fixed an ommission)

I then posted to this mailing list on 12/13/2010.

The last suggestion was Sander's, so here is what I did.  I'm not quite sure how I should execute the "on top" part of your suggestion

Current install.

Apache:
I downloaded  httpd-2.2.16.tar.bz2 and created a working directory at /usr/local/src/httpd-2.2.16
I created an output working area: /var/tmp/apache/httpd

Within /usr/local/src/httpd-2.2.16  I did the following:

    plug httpd-2.2.16 # CFLAGS="-DDEBUG -O0"; export CFLAGS
    plug httpd-2.2.16 # ./configure --prefix=/var/tmp/apache/httpd --enable-maintainer-mode
    plug httpd-2.2.16 # make
    plug httpd-2.2.16 # make install
    plug httpd-2.2.16 # cd /var/tmp/apache/httpd/bin

    plug httpd-2.2.16 # gdb httpd
    GNU gdb (Gentoo 7.0.1 p1) 7.0.1
    Copyright (C) 2009 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
    and "show warranty" for details.
    This GDB was configured as "armv5tel-softfloat-linux-gnueabi".
    For bug reporting instructions, please see:
    <http://bugs.gentoo.org/>...
    Reading symbols from /usr/local/src/httpd-2.2.16/httpd...(no debugging symbols found)...done.
    warning: not using untrusted file "/usr/local/src/httpd-2.2.16/.gdbinit"
    (gdb) run -X
    Starting program: /usr/local/src/httpd-2.2.16/httpd -X
    [Thread debugging using libthread_db enabled]

    Program received signal SIGSEGV, Segmentation fault.
    0x402600e4 in apr_palloc () from /usr/lib/libapr-1.so.0
    (gdb)) bt
    #0  0x402600e4 in apr_palloc () from /usr/lib/libapr-1.so.0
    #1  0x4025a988 in apr_array_make () from /usr/lib/libapr-1.so.0
    #2  0x400ddb54 in apr_hook_sort_register () from /usr/lib/libaprutil-1.so.0
    #3  0x00051f74 in ap_hook_create_connection ()
    #4  0x0003f838 in register_hooks ()
    #5  0x000485e4 in ap_register_hooks ()
    #6  0x00048974 in ap_add_module ()
    #7  0x00048d64 in ap_setup_prelinked_modules ()
    #8  0x00028be0 in main ()
    (gdb) quit
    ...
   
    plug httpd-2.2.16 # gdb httpd
    GNU gdb (Gentoo 7.0.1 p1) 7.0.1
    Copyright (C) 2009 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
    and "show warranty" for details.
    This GDB was configured as "armv5tel-softfloat-linux-gnueabi".
    For bug reporting instructions, please see:
    <http://bugs.gentoo.org/>...
    Reading symbols from /usr/local/src/httpd-2.2.16/httpd...(no debugging symbols found)...done.
    warning: not using untrusted file "/usr/local/src/httpd-2.2.16/.gdbinit"
    (gdb) run
    Starting program: /usr/local/src/httpd-2.2.16/httpd
    [Thread debugging using libthread_db enabled]

    Program received signal SIGSEGV, Segmentation fault.
    0x402600e4 in apr_palloc () from /usr/lib/libapr-1.so.0
    (gdb) bt
    #0  0x402600e4 in apr_palloc () from /usr/lib/libapr-1.so.0
    #1  0x4025a988 in apr_array_make () from /usr/lib/libapr-1.so.0
    #2  0x400ddb54 in apr_hook_sort_register () from /usr/lib/libaprutil-1.so.0
    #3  0x00051f74 in ap_hook_create_connection ()
    #4  0x0003f838 in register_hooks ()
    #5  0x000485e4 in ap_register_hooks ()
    #6  0x00048974 in ap_add_module ()
    #7  0x00048d64 in ap_setup_prelinked_modules ()
    #8  0x00028be0 in main ()
    (gdb)

APR:
I have apr-1.4.2  downloaded, but am not sure how to install it so that my custom install of apache at /var/tmp/apache utilizes it.

plug apr-1.4.2 #make clean
plug apr-1.4.2 # ...
plug apr-1.4.2 # echo $CFLAGS
-DDEBUG -O0
plug apr-1.4.2 # ./configure --enable-maintainer-mode
plug apr-1.4.2 # make

The output from ./configure, make,make install, and gdb are posted at:

http://snipt.org/wknpm

For convenience, here is the back trace:

#0  0x402600e4 in apr_palloc () from /usr/lib/libapr-1.so.0
#1  0x4025a988 in apr_array_make () from /usr/lib/libapr-1.so.0
#2  0x400ddb54 in apr_hook_sort_register () from /usr/lib/libaprutil-1.so.0
#3  0x00051f74 in ap_hook_create_connection ()
#4  0x0003f838 in register_hooks ()
#5  0x000485e4 in ap_register_hooks ()
#6  0x00048974 in ap_add_module ()
#7  0x00048d64 in ap_setup_prelinked_modules ()
#8  0x00028be0 in main ()

Please let me know if there is any other compile or debug step I should take to create something helpful to identify the problem. 

Thank you for you help,

John



On 12/22/2010 7:57 AM, Sander Temme wrote:
On Dec 22, 2010, at 6:20 AM, John L. Poole wrote:

Am I missing something, as the output above seems the same as when I did not have debugging
How are you making Apache use your new library?  I suggest compiling your own Apache on top of your own APR/APR-Util, and debugging against that. 

In the system build, something is clearly happening that horribly confuses the debugger. 

S.


--
Email Rider

John Laurence Poole
P.O. Box 6566
Napa CA 94581-6566
707-812-1323 office

--------------080103000307000409020901-- --------------040000020409050402010009 Content-Type: text/x-vcard; charset=utf-8; name="jlpoole56.vcf" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="jlpoole56.vcf" begin:vcard fn:John Poole n:Poole;John adr:;;P.O. Box 6566;Napa;CA;94581-6566;USA email;internet:jlpoole56@gmail.net tel;work:650-607-0853 tel;home:707-812-1323 note:For street address, email me. version:2.1 end:vcard --------------040000020409050402010009--