You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Daniel Freedman <fr...@physics.cornell.edu> on 2005/03/18 18:12:15 UTC

Apache2 troubles with shmcb SSLSessionCache...

Hi,

I've searched the Apache and Debian mailing lists and generally
googled for information about this problem, but came up empty.  I also
emailed users@httpd.apache.org without response, and thought of
sending it to modssl-users, but the apache list archives shows no
activity on that list...

Anyway, I'm using apache 2.0.53 (mpm-prefork) on Debian testing on two
different ia32 machines, with generally similar installs, and
exhibiting the following problem only on one of them (which
complicates the problem, in my analysis).

Namely, apache2 won't properly start if I include the following
directive in my configuration file:

  SSLSessionCache shmcb:/var/log/apache2/scache(512000)

I get the following error in my logs:

  [error] Cannot allocate shared memory: (22)Invalid argument

I've read reports on various mailing lists of a similar error where it
cannot allocate shared memory as the cache file named in Apache's
"SSLSessionCache" already exists.  In those cases (generally from
unclean shutdowns) it appeared that the solution was easy: just
manually delete the offending cache file.

In my case, the file doesn't exist ahead of time (nor should it), and
I'm getting this "Invalid argument" error.  Note also, that I've
properly installed the Debian libmm13 package (upstream: OSSP mm),
which appears to be necessary for properly functioning shmcb, even
though this doesn't appear to be widely documented.  I've also tried
to decrease the amount of requested memory, going as low as 64000, but
all to no avail so far.

Any suggestions, please?

Thanks,
Daniel


-- 
Daniel A. Freedman <fr...@physics.cornell.edu>, Graduate Fellow
  Electronic Structure Calculations, LASSP, Cornell University

Re: Apache2 troubles with shmcb SSLSessionCache...

Posted by Joe Orton <jo...@redhat.com>.
On Fri, Mar 18, 2005 at 12:12:15PM -0500, Daniel Freedman wrote:
> Anyway, I'm using apache 2.0.53 (mpm-prefork) on Debian testing on two
> different ia32 machines, with generally similar installs, and
> exhibiting the following problem only on one of them (which
> complicates the problem, in my analysis).

Are you using the Debian-packaged version of httpd, or compiling from
source?

> Namely, apache2 won't properly start if I include the following
> directive in my configuration file:
> 
>   SSLSessionCache shmcb:/var/log/apache2/scache(512000)
> 
> I get the following error in my logs:
> 
>   [error] Cannot allocate shared memory: (22)Invalid argument

Can you run the httpd process under strace to see exactly what is 
failing?

  strace -o /tmp/httpd.trace /path/to/httpd -X

then upload /tmp/httpd.trace somewhere.

joe

Re: Apache2 troubles with shmcb SSLSessionCache...

Posted by Daniel Freedman <fr...@physics.cornell.edu>.
Just in case others have the same problem---

Through Joe Orton's kind assistance (below), I resolved this issue by
upgrading my kernel to 2.4.27.  It appears to be an issue with
Debian's APR using shmem properly with 2.2.x kernels.

I filed a bug with Debian's bug tracker...

Thanks all.


On Fri, Mar 18, 2005, Daniel Freedman wrote:
> Hi,
> 
> I've searched the Apache and Debian mailing lists and generally
> googled for information about this problem, but came up empty.  I also
> emailed users@httpd.apache.org without response, and thought of
> sending it to modssl-users, but the apache list archives shows no
> activity on that list...
> 
> Anyway, I'm using apache 2.0.53 (mpm-prefork) on Debian testing on two
> different ia32 machines, with generally similar installs, and
> exhibiting the following problem only on one of them (which
> complicates the problem, in my analysis).
> 
> Namely, apache2 won't properly start if I include the following
> directive in my configuration file:
> 
>   SSLSessionCache shmcb:/var/log/apache2/scache(512000)
> 
> I get the following error in my logs:
> 
>   [error] Cannot allocate shared memory: (22)Invalid argument
> 
> I've read reports on various mailing lists of a similar error where it
> cannot allocate shared memory as the cache file named in Apache's
> "SSLSessionCache" already exists.  In those cases (generally from
> unclean shutdowns) it appeared that the solution was easy: just
> manually delete the offending cache file.
> 
> In my case, the file doesn't exist ahead of time (nor should it), and
> I'm getting this "Invalid argument" error.  Note also, that I've
> properly installed the Debian libmm13 package (upstream: OSSP mm),
> which appears to be necessary for properly functioning shmcb, even
> though this doesn't appear to be widely documented.  I've also tried
> to decrease the amount of requested memory, going as low as 64000, but
> all to no avail so far.
> 
> Any suggestions, please?
> 
> Thanks,
> Daniel
> 
> 
> -- 
> Daniel A. Freedman <fr...@physics.cornell.edu>, Graduate Fellow
>   Electronic Structure Calculations, LASSP, Cornell University