[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apache-modperl
Subject:    Re: Lock handling in Apache::Session-0.99.8
From:       "Chuck O'Donnell" <cao () milf18 ! bus ! net>
Date:       1999-05-31 15:29:38
[Download RAW message or body]

On Sun, May 30, 1999 at 12:31:18PM -0700, dean@brettle.com wrote:
> "Jeffrey W. Baker" wrote:
> > 
> > dean@brettle.com wrote:
> 
> [snip]
> > > My problem appears to be that the mod_perl in another
> > > httpd child hasn't gotten around to garbage collecting an earlier
> > > session and thus still has an exclusive lock on the required semaphore.
> > > [Note that different sessions use the same semaphore.  By default, there
> > > are only 16 distinct semaphores groups (each group has a read and write
> > > semaphore) which are shared between all sessions.  This makes it fairly
> > > likely that I'll get a "semaphore collision" with only a few sessions.]
> > > So, I shouldn't wait for Perl to DESTROY my session.  I must untie() it
> > > explicitly when I'm done with it.
> > 
> > Why aren't your sessions passing out of scope at the end of the
> > request?
> 
> I'm really not sure.  I'm using HTML::Mason and I just read that some
> people are having problems with memory leaks with it, so it might be
> related to that.

For what it's worth, I recently ran into a similar problem. It may or
may not be related to what you're seeing, but I'll run through it just
in case.

Apache_1.3.6
mod_perl 1.19
Mason 0.4
FreeBSD 3.1-STABLE
mysql-3.22

The symptoms I had were:
1. Apache::Session::DBI blocking with locked sessions
2. Very occasional core dumps, no repeatable pattern
3. malloc messages in err_log, "junk pointer too low to make sense"

I spent quite a while trying to figure out what was happening, and
stumbled across a strangeness related to calling `use Module;' in a
startup.pl instead of the older `PerlModule Module' in httpd.conf.

I moved a number of modules out of startup.pl and back into
httpd.conf, namely

PerlModule Apache::DBI
PerlModule Apache::Util
PerlModule Apache::Registry
PerlModule Apache::AuthenDBI
PerlModule Apache::AuthzDBI
PerlModule Apache::Session::DBI

Everything cleared up... no hung sessions in over two weeks. Eventually,
I should go back and find out why certain modules don't load correctly
in startup.pl

Thanks,

Chuck

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic