You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modules-dev@httpd.apache.org by Joe Lewis <jo...@joe-lewis.com> on 2009/05/16 19:12:28 UTC

Re: Module segfault on Ubuntu apache

Fabio Zund wrote:
> However, when I compile and test the module on the apache (also 
> version 2.2.11) that comes with Ubuntu 9.04, all i get are segfaults.
>
> Does anyone know differences between the original apache and the 
> Ubuntu apache version? What in my module could cause such errors?

Unfortunately, I have never looked at the sources and patches used on 
ubuntu.  I would suggest looking at the patches they include with their 
source installation.  I think that would be a very good place to start.  
Additionally, debugging tools (e.g. gdb) might be a very good place to 
start.  Your hints for the day :  run "gdb httpd" (or whatever binary is 
used to start it, make sure you use the BINARY and not an init script), 
and then at the gdb prompt, enter "run -X" - this starts the binary in a 
single-instance mode.  Point the browser to it and generate the 
"errors".  Then type "bt" to get a back trace.  Outside of that and 
looking at the patches, I am unable to help.

Joe

Re: Module segfault on Ubuntu apache

Posted by Sorin Manolache <so...@gmail.com>.
On Sun, May 17, 2009 at 01:07, Fabio Zund <fa...@eiffel.com> wrote:
>
> Joe Lewis wrote:
>>
>> Fabio Zund wrote:
>>>
>>> However, when I compile and test the module on the apache (also version
>>> 2.2.11) that comes with Ubuntu 9.04, all i get are segfaults.
>>>
>>> Does anyone know differences between the original apache and the Ubuntu
>>> apache version? What in my module could cause such errors?
>>
>> Unfortunately, I have never looked at the sources and patches used on
>> ubuntu.  I would suggest looking at the patches they include with their
>> source installation.  I think that would be a very good place to start.
>>  Additionally, debugging tools (e.g. gdb) might be a very good place to
>> start.  Your hints for the day :  run "gdb httpd" (or whatever binary is
>> used to start it, make sure you use the BINARY and not an init script), and
>> then at the gdb prompt, enter "run -X" - this starts the binary in a
>> single-instance mode.  Point the browser to it and generate the "errors".
>>  Then type "bt" to get a back trace.  Outside of that and looking at the
>> patches, I am unable to help.
>>
>> Joe
>>
>>
> The back trace in gdb showed that the segfault was caused by apr_pstrcat ()
> in /usr/lib/libapr-1.so.0.

Make sure the last argument of apr_pstrcat is NULL:

char *result = apr_pstrcat(pool, "Hello", " ", "dolly!", "\n", NULL);

Sorin


> At this point I had libapr and libapr-util
> version 1.1.12 installed (from the packager manager). So I installed
>  apr-1.3.3
> <http://mirror.cc.columbia.edu/pub/software/apache/apr/apr-1.3.3.tar.bz2>
> from the website. The same error occured. Then I installed apr-util-1.3.4
> <http://mirror.cc.columbia.edu/pub/software/apache/apr/apr-util-1.3.4.tar.bz2>
> as well, but after that I could not start apache anymore, it says:
> "/usr/sbin/apache2: symbol lookup error: /usr/sbin/apache2: undefined
> symbol: apr_ldap_ssl_init"
>
> I guess I'll just have to wait until the ubuntu guys add the new
> apr/apr-util versions to the packet manager repository and make it work....
>
> But thanks for the help!
>
> - Fabio Zund
>
>
>




-- 
A: Because it reverses the logical flow of conversation.
Q: Why is top-posting frowned upon?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

Re: Module segfault on Ubuntu apache

Posted by Fabio Zund <fa...@eiffel.com>.
Joe Lewis wrote:
> Fabio Zund wrote:
>> However, when I compile and test the module on the apache (also 
>> version 2.2.11) that comes with Ubuntu 9.04, all i get are segfaults.
>>
>> Does anyone know differences between the original apache and the 
>> Ubuntu apache version? What in my module could cause such errors?
>
> Unfortunately, I have never looked at the sources and patches used on 
> ubuntu.  I would suggest looking at the patches they include with 
> their source installation.  I think that would be a very good place to 
> start.  Additionally, debugging tools (e.g. gdb) might be a very good 
> place to start.  Your hints for the day :  run "gdb httpd" (or 
> whatever binary is used to start it, make sure you use the BINARY and 
> not an init script), and then at the gdb prompt, enter "run -X" - this 
> starts the binary in a single-instance mode.  Point the browser to it 
> and generate the "errors".  Then type "bt" to get a back trace.  
> Outside of that and looking at the patches, I am unable to help.
>
> Joe
>
>
The back trace in gdb showed that the segfault was caused by apr_pstrcat 
() in /usr/lib/libapr-1.so.0. At this point I had libapr and libapr-util 
version 1.1.12 installed (from the packager manager). So I installed  
apr-1.3.3 
<http://mirror.cc.columbia.edu/pub/software/apache/apr/apr-1.3.3.tar.bz2> 
from the website. The same error occured. Then I installed 
apr-util-1.3.4 
<http://mirror.cc.columbia.edu/pub/software/apache/apr/apr-util-1.3.4.tar.bz2> 
as well, but after that I could not start apache anymore, it says: 
"/usr/sbin/apache2: symbol lookup error: /usr/sbin/apache2: undefined 
symbol: apr_ldap_ssl_init"

I guess I'll just have to wait until the ubuntu guys add the new 
apr/apr-util versions to the packet manager repository and make it work....

But thanks for the help!

- Fabio Zund



Re: Module segfault on Ubuntu apache

Posted by Fabio Zund <fa...@eiffel.com>.
Joe Lewis wrote:
> Fabio Zund wrote:
>> However, when I compile and test the module on the apache (also 
>> version 2.2.11) that comes with Ubuntu 9.04, all i get are segfaults.
>>
>> Does anyone know differences between the original apache and the 
>> Ubuntu apache version? What in my module could cause such errors?
>
> Unfortunately, I have never looked at the sources and patches used on 
> ubuntu.  I would suggest looking at the patches they include with 
> their source installation.  I think that would be a very good place to 
> start.  Additionally, debugging tools (e.g. gdb) might be a very good 
> place to start.  Your hints for the day :  run "gdb httpd" (or 
> whatever binary is used to start it, make sure you use the BINARY and 
> not an init script), and then at the gdb prompt, enter "run -X" - this 
> starts the binary in a single-instance mode.  Point the browser to it 
> and generate the "errors".  Then type "bt" to get a back trace.  
> Outside of that and looking at the patches, I am unable to help.
>
> Joe
>
>

Thanks for the hints, I'll do that!

- Fabio Zund