I have been happly using mod_perl for more than a year. My application uses the Apache::Session package. One day, July 4 to be specific, my httpd_perl childs stated dying. The error log say:

[notice] child pid (...) exit signal Segmentation fault (11)

After putting a lot of prints to STDERR, I found that the processes were dying at the following line of code:

untie(%session)

Where %session is the Apache::Session hash. This is very odd because I didn't change anything on my dedicated server that day. And it is also odd because sometimes work, sometimes fail. So far this is what I have tried to do to solve this:

1) Recompile apache+mod_perl
2) run under mod_cgi. This results in "premature end of script headers".

I store the sessions in a MySQL database.

I will now give you more details of my configuration:
mod_perl: 1.29
apache: 1.33
perl: 5.8.4
mysql: 4.1.10a
Apache::Session: 1.6
Apache::Session::MySQL 1.01
CGI::Application 3.31
RedHat Linux kernel 2.4.20-37.9.legacy

Just for completeness, this is part of the code I am using.

my %session;
my $id = $q->cookie( 'COOKIE-NAME' ) || undef;
eval
    {
      tie %session, 'Apache::Session::MySQL', $id,
        {
         Handle => $self->param('mydbh'),
         LockHandle => $self->param('mydbh')
        };
    };
if ($@) # if an error occurred, old session is unavailable; create a new one
    {
      $id = undef;
      tie %session, 'Apache::Session::MySQL', $id,
        {
         Handle => $self->param('mydbh'),
         LockHandle => $self->param('mydbh')
        };
    }

I would really appreciate any help.

Regards,

Gustavo Delfino
Caracas, Venezuela.

Reply via email to