httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guntupalli, Santhi" <>
Subject FW: help - Apche 2.0 - Unix
Date Tue, 13 May 2003 12:02:17 GMT
	I have not got any reply for my problem that I mentioned below. I am
not getting any logic or I am doing any mistake in configuration/build. I am
building the Apache 2.0 with the following options - to enable DSO Support
and MPM is worker and then I will install it.

CC="cc" \
./configure --enable-so --with-mpm=worker

These two are enough?? or anything else I have to give. 

And also I build Apache with "cc" compiler and My application/module is
written in C++ code and  I build with "KCC" Compiler. Because use of
different compilers for Apache and my application is creating this problem.
When I load my library then Apache hangs and fails at the following point. I
am anxiously waiting for help, please anybody can help me out in this
regard, Anybody faced this type of problem before. I am very grateful if I
get any reply.


-----Original Message-----
From: Guntupalli, Santhi 
Sent: Saturday, May 10, 2003 6:13 PM
To: ''
Subject: RE: help - Apche 2.0 - Unix

	Thanks for your response. I had debugged the code. This is the point
where it is failing. this backtrace is at procsup.c.

(gdb) bt
#0  apr_proc_detach (daemonize=1074511840) at procsup.c:57
#1  0x00000001200525dc in worker_pre_config (pconf=0x140068028, 
    plog=0x1400b0828, ptemp=0x1400b5828) at worker.c:1900
#2  0x0000000120068038 in ap_run_pre_config (pconf=0x140068028, 
    plog=0x1400b0828, ptemp=0x1400b5828) at config.c:123
#3  0x0000000120054f98 in main (argc=7, argv=0x11ffff208) at main.c:615

after this daemonize=1 and going inside the if(daemonize) this condition,
after this fork() is being called and fails inside this if condition, this
is the error I am getting this

program received signal SIGSEGV, Segmentation fault.
warning: Hit heuristic-fence-post without finding
warning: enclosing function for address 0x3ff80dd74b0
0x000003ff80dd74b0 in ?? ()

when I give backtrace here this is the trace.
(gdb) bt
#0  0x000003ff80dd74b0 in ?? ()
#1  0x000003ff80176d68 in __do_atfork () from /usr/shlib/
#2  0x000003ff80176d68 in __do_atfork () from /usr/shlib/
Error accessing memory address 0x10: Invalid argument.

I have built apache with MPM as worker.

I have written small test program which uses this Apache APIs. This is my
small test program: test.cxx

extern "C"{
#include "httpd.h"
#include "http_config.h"
#include "http_protocol.h"
#include "http_log.h"
#include "util_script.h"
#include "http_main.h"
#include "http_request.h"

static int test_handler(request_rec *r)
  int result = 500;
return 1;
static void register_hooks(apr_pool_t *p) {
    ap_hook_handler(test_handler, NULL, NULL, APR_HOOK_MIDDLE);

extern "C"{
module AP_MODULE_DECLARE_DATA server_module = {
    NULL,                     /* per-directory config creator */
    NULL,                     /* dir config merger */
    NULL,                     /* server config creator */
    NULL,                     /* server config merger */
    NULL,                     /* command table */
    register_hooks, /* set up other request processing hooks */

This small test program test.cxx creates
While creating this shared library I link with "-lpthread -lm -lexc" ( all
these are OS libraries ) apart from Apache shared libraries. Apache was
started. When I opened from webbrowser "localhost:80" "I am getting internal
error" and does not open the home page of Apache.  When  again I relink with
"-lpthread -lm -lexc -lrt" this time Apache does not start ( because of
"lrt" library) and failing at the same point as mentioned in the above
trace. I did not understand how this linking is  making this difference for
apache to start. I am working on Tru64 4.OG and 5.1A.  I have tested with
both C and C++ code.
I have seen same behavior.

What could be the problem. Any solution to this. Any help is very much


-----Original Message-----
From: amit athavale []
Sent: Thursday, May 08, 2003 9:00 PM
Subject: Re: help - Apche 2.0 - Unix

If you send gdb back trace of hanged process it will be helpful. 

If you dont know how to do it :

use "ps -aef | grep httpd" command to find pid then use "gdb httpd <pid>" to
open gdb.

After gdb prompt comes up, type "bt" to see backtrace. 


On Thu, 8 May 2003 20:01:49   
 Guntupalli, Santhi wrote:
>	We are using Apache 2.0 in our application. our application supports
>both windows and Unix (Tru64). I had built my module which uses Apache 2.0
>APIs and creates DLL (test.dll) . We are loading this DLL by LoadModule in
>"httpd.conf". I was able to start Apache and also my application works
>properly without any problems on windows.
>	The same application we support it on Unix also without any code
>change. I had built the same module with Apche 2.0 and created shared
>library "". I load this library by LoadModule from httpd.conf. 
>LoadModule test_handle modules/ 
>	If I add this in httpd.conf, when I start Apache, simply it hangs,
>it does not come to the prompt and  does not spawn any hutted processes and
>also no error. 
>	If I don't load this shared library, Apache is starting no problems.
>If I load my shared library then only apache does not start. How Load
>( my shared library) holds the apache from start. How LoadModule is related
>in spawning the httpd processes. I had tried many ways, nothing was
>what could be the problem. Same application is running on Windows, no
>problems at all, this problem I am facing it on Unix only, it does not give
>any error/log to locate the problem.
>Anybody has any clues or suggestions. any help is much appreciated.

Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail!

View raw message