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 Tim Whittington <ti...@orionhealth.com> on 2012/07/05 05:42:15 UTC
Broken request_rec structures passed to hook methods in Apache 2.0
Hi all
I'm trying to track down the cause of a segmentation fault observed using mod_jk in Apache 2.0 on Solaris/Sparc.
>From the core dumps I've narrowed the initial crashes down to a hook function in mod_jk (for ap_hook_translate_name).
Interestingly returning immediately from this hook (e.g. return DECLINED) causes a crash in another hook, and returning immediately from that hook results in a crash in Apache/APR.
When these hooks are invoked, I've observed that several fields of the request_rec passed to the hook function are NULL.
The fields that are NULL are always the same between runs, but differ between two Solaris/Sparc machines (running Solaris 10 and the same version of Apache).
The fields that I've observed to be NULL are:
- request_rec.subprocess_env
- request_rec.notes
- request_rec.pool
The mod_jk.so in this case is built with gcc 3.4.6 with -static-libgcc (as is the Apache 2.0.64 it was built against).
The Apache the module is being loaded into is Apache 2.0.63 built with the SUNWSPro compiler.
Everything is built as 32-bit, and the mod_jk module loads and executes (to the point that it is configured and initialised, hook methods are called, and it can perform logging etc.)
Does anyone have any ideas, short of building mod_jk using the SUNWSPro compiler, to explain what is going wrong here?
cheers
tim
Re: Broken request_rec structures passed to hook methods in Apache 2.0
Posted by Nick Kew <ni...@apache.org>.
On 5 Jul 2012, at 04:42, Tim Whittington wrote:
Use apxs from your installed httpd to build your module.
That way you'll get the right compile options and header files.
And for **** sake, upgrade! 2.0 belongs in the museum!
Then you can deal with the possibility that your module is using a
subrequest or internal redirect in a way that doesn't work with 2.0.
--
Nick Kew