You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by MK...@IN.Safenet-inc.com on 2007/02/28 11:12:52 UTC

Module Crashes if build as a shared object

Hi all

One of my apache module crashes if it is used as shared module but works
fine if it is build as static module.

Also it was working fine as shared module before I upgraded to kernel 2.6
and glibc 2.3.4.

Following is the back trace 


(gdb) bt
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb7d43bbb in pthread_setspecific () from /lib/libpthread.so.0
#2  0x080c92de in child_main (child_num_arg=0) at worker.c:1258
#3  0x080c9434 in make_child (s=0x8109270, slot=0) at worker.c:1341
#4  0x080c9cbc in ap_mpm_run (_pconf=0x81020a8, plog=0x814c1d0, s=0x8109270)
at worker.c:1543
#5  0x080686b8 in main (argc=6, argv=0xbfafb7d4) at main.c:717


Can anyone help?????????

Regards
Manmeet Singh



The information contained in this electronic mail transmission may be privileged and confidential, and therefore, protected from disclosure. If you have received this communication in error, please notify us immediately by replying to this message and deleting it from your computer without copying or disclosing it.

Re: Module Crashes if build as a shared object

Posted by Jeff Trawick <tr...@gmail.com>.
On 2/28/07, MKhurana@in.safenet-inc.com <MK...@in.safenet-inc.com> wrote:
>
>
>
> Hi all
>
> One of my apache module crashes if it is used as shared module but works
> fine if it is build as static module.

Watch out for static variable usage in your module.  That's a common
cause of this type of problem.  Static variables don't retain their
values between the multiple calls to the post-config hook when your
module is built as a DSO.

> Also it was working fine as shared module before I upgraded to kernel 2.6
> and glibc 2.3.4.

shrug

> Following is the back trace
>
>
> (gdb) bt
> #0  0xffffe410 in __kernel_vsyscall ()
> #1  0xb7d43bbb in pthread_setspecific () from /lib/libpthread.so.0
> #2  0x080c92de in child_main (child_num_arg=0) at worker.c:1258

child_main doesn't call pthread_setspecific(), so some info is missing
or just incorrect.

I'd recommend stepping through your module's initialization hooks and
looking for unexpected behavior.