You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Olof Oberg <mi...@pedgr571.sn.umu.se> on 2002/07/26 11:12:19 UTC

Segfault on start

Hi, 

my newly built (CVS) httpd refuses to start because of segfaults 
of any spawned children (prefork).

This is a Debian GNU/Linux i386 system which has not shown any 
of these problems before (last time I built HEAD was in April or 
May).

#0  apr_bucket_alloc_create (p=0x8167ef8) at apr_buckets_alloc.c:99
(gdb) bt
#0  apr_bucket_alloc_create (p=0x8167ef8) at apr_buckets_alloc.c:99
#1  0x0808a96f in child_main (child_num_arg=5) at prefork.c:604
#2  0x0808ac40 in make_child (s=0x80ce740, slot=5) at prefork.c:790
#3  0x0808ade1 in perform_idle_server_maintenance (p=0x80cbbf0)
    at prefork.c:925
#4  0x0808b16f in ap_mpm_run (_pconf=0x80cbbf0, plog=0x8109ce8, s=0x80ce740)
    at prefork.c:1120
#5  0x0809018e in main (argc=3, argv=0x7ffff984) at main.c:645
(gdb) p *p
$1 = {parent = 0x80cbbf0, child = 0x8169f00, sibling = 0x8105cd8, 
  ref = 0x80cbbf4, cleanups = 0x8167f58, allocator = 0x8167690, 
  subprocesses = 0x0, abort_fn = 0, user_data = 0x0, tag = 0x0, 
  active = 0x8167ee0, self = 0x8167ee0, 
  self_first_avail = 0x8167f30 "x_child_init(pedgr571.sn.umu.se)"}
(gdb) p *allocator
$1 = {max_index = 0, max_free_index = 0, current_free_index = 0, mutex = 0x0, 
  owner = 0x0, free = {0x0 <repeats 20 times>}}
(gdb) p *block
$2 = {next = 0x0, index = 0, first_avail = 0x2 <Address 0x2 out of bounds>, 
  endp = 0x0}
(gdb) p list
$3 = (apr_bucket_alloc_t *) 0x2

and the corresponding (offending?) source code:

APU_DECLARE_NONSTD(apr_bucket_alloc_t *) 
apr_bucket_alloc_create(apr_pool_t *p)
{
    apr_allocator_t *allocator;
    apr_bucket_alloc_t *list;
    apr_memnode_t *block;

    apr_allocator_create(&allocator);
    block = apr_allocator_alloc(allocator, ALLOC_AMT);
    list = (apr_bucket_alloc_t *)block->first_avail;
    list->pool = p;

...


 /mill

-- 
#############################################################
# S-mail: Olof Oberg     #  mill@pedgr571.sn.umu.se         #
#         Pedagoggr. 7A  #  mill@ludd.luth.se               #
#         S-907 30 Umea  #  tdv94oog@cs.umu.se              #
# Phone:  090-197395     #  http://pedgr571.sn.umu.se/~mill #
#############################################################



Re: [pthread_mutex] apache will not load mod_jk.so

Posted by Jeff Trawick <tr...@attglobal.net>.
Dev Zero G Ltd <ma...@devzerog.com> writes:

> Hello and thanks for reading.
> 
> We have managed to build mod_jk.so and jk_jnicb.so for Apache 2.0.39
> and Tomcat 4.0.4, but neither Apache nor Tomcat will successfully use
> these modules:
> 
> when launching Apache, we get:
> 
> # /usr/local/apache2/bin/apachectl -k start
> Syntax error on line 1043 of /usr/local/apache2/conf/httpd.conf:
> Cannot load /usr/local/apache2/modules/mod_jk.so into server:
> /usr/local/apache2/modules/mod_jk.so: Undefined symbol
> "pthread_mutex_unlock"

Apache 2.0 and APR won't normally link to thread libraries on FreeBSD
because (apparently) some problems in the thread libraries on that
platform prevent Apache from working reliably.  I suspect that
mod_jk.so can't find the pthread calls because Apache was not linked
with -lpthread.

Can you build mod_jk in a way that doesn't reference the pthread
calls?  Does it have some configuration mechanism to tell it that it
doesn't need to be multi-thread capable?  I can't see how the pthread
calls are useful on FreeBSD since Apache won't work there using
a threaded model.

-- 
Jeff Trawick | trawick@attglobal.net
Born in Roswell... married an alien...

[pthread_mutex] apache will not load mod_jk.so

Posted by Dev Zero G Ltd <ma...@devzerog.com>.
Hello and thanks for reading.

We have managed to build mod_jk.so and jk_jnicb.so for Apache 2.0.39 and 
Tomcat 4.0.4, but neither Apache nor Tomcat will successfully use these 
modules:

when launching Apache, we get:

# /usr/local/apache2/bin/apachectl -k start
Syntax error on line 1043 of /usr/local/apache2/conf/httpd.conf:
Cannot load /usr/local/apache2/modules/mod_jk.so into server: 
/usr/local/apache2/modules/mod_jk.so: Undefined symbol 
"pthread_mutex_unlock"

The strange thing is that apache complains about the 
"pthread_mutex_unlock" call but about the "pthread_mutex_lock" call just 
before!!

Any advice will be appreciated. We have spent 2 weeks not trying to get 
the Tomcat/Apache connector to work to no avail. Have posted numerous 
mails to tomcat-dev@jakarta.apache.org.

Is there _nobody_ else out there trying to get Apache2 and Tomcat4 
connected on FreeBsd 4.x!?

Thanks very much in advance for nay advice!