Operating System - HP-UX
1827586 Members
2729 Online
109965 Solutions
New Discussion

Apache on HP-UX compiled with REENTRANT ... flag crashes intermittently.

 
Paresh Borkar
Occasional Advisor

Apache on HP-UX compiled with REENTRANT ... flag crashes intermittently.

I would greatly appreciate any help regarding this problem. Thanks in advance.

Problem description:

On HP-UX, I compiled Apache 1.3.14 to support a multi-threaded C++ module. For this I used the following flags along with the default ones:
CFLAGS = -D_REENTRANT -D _POSIX_C_SOURCE=199506L -D_INCLUDE_HPUX_SOURCE ...
And linked libpthread.sl and libcl.sl libraries to the httpd.

Intermittently Apache dumps core for some requests by giving 'page not found' error.
The Apache core shows that it crashed in ap_table_add(). It looks like, somehow, Apache
pool got corrupted.

I tried debugging using ALLOC_DEBUG etc., but they did not helped. I am pretty much sure
that something is not getting corrupted within this multi-threaded module, as the same
module is working fine on Solaris without dumping core etc.,

- Are the above compile time flags sufficient for Apache to have a multi-threaded module.
- Are there any specific issues with Apache 1.3.14 on HP-UX.


Background:

Basically, I am porting an existing Solaris Apache webserver module to HP-UX. This
is a multi-threaded module which creates few threads to make connections to our back-end etc., For this on Solaris, I compiled Apache with _REENTRAT flag and linked libpthread.so library to httpd. This module is running without any problem on Solaris, even on heavy loads.

Thanks in advance.