On 29/12/08 18:56, Tupshin Harper wrote:
1. Problem Description:

I'm attempting to upgrade one of the largest (measured both by users and
lines of code, I suspect) mod_perl sites from mod_perl 1 to mod_perl 2,
and also from 32 bit OS to 64 bit at the same time. I converted our
calls to use the new API, and basic functionality started working.
However, I am experiencing frequent segfaults in APR::Table (stack trace
below) when loading pages.

Just out of curiosity, are you handling APR::Table objects directly ?

Somewhere betwen 1 out of every 2-4 page
loads will cause it. Identical problem occurs on:
64 bit Debian Lenny with stock mod_perl 2.0.4
64 bit Debian Lenny with hand-built mod_perl 2.0.5-dev from latest source.
64 bit Centos 5.2 with stock mod_perl 2.0.2.

Let me know if there is any other information you need.

See below. Of course, a shorter, reproducible test case would be the ideal.

I have not yet
tried it with mod_perl 2 on a 32-bit OS.

[...]

Method it crashes in:

/* Try to shortcut apr_table_get by fetching the key using the current
  * iterator (unless it's inactive or points at different key).
  */
static MP_INLINE const char *mpxs_APR__Table_FETCH(pTHX_ SV *tsv,
                                                    const char *key)
{
     SV* rv = modperl_hash_tied_object_rv(aTHX_ "APR::Table", tsv);
     const int i = mpxs_apr_table_iterix(rv);
     apr_table_t *t = INT2PTR(apr_table_t *, SvIVX(SvRV(rv)));

Possibly smells like a 64 bit issue to me.

     const apr_array_header_t *arr = apr_table_elts(t);
     apr_table_entry_t *elts = (apr_table_entry_t *)arr->elts;<---crashing line 
186

Can you get a little more information out of the current local variables.

i.e. I'd be interested in seeing the value of:

i
*t
*arr

Which you can easily do from withing gdb with

(gdb) display *t
(gdb) display *arr

--
Philippe M. Chiasson     GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5
http://gozer.ectoplasm.org/       m/gozer\@(apache|cpan|ectoplasm)\.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@perl.apache.org
For additional commands, e-mail: dev-h...@perl.apache.org

Reply via email to