httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yann Ylavic <ylavic....@gmail.com>
Subject Re: Re: [users@httpd] Lots of messages "[ssl:warn] Resource deadlock avoided: AH02026: Failed to acquire SSL session cache lock"
Date Thu, 10 Mar 2016 16:22:53 GMT
On Thu, Mar 10, 2016 at 4:14 PM, Hildegard Meier <daku8938@gmx.de> wrote:
>
>> > Mutex file:${APACHE_LOCK_DIR} default
>>
>> Does it come from Ubuntu?
>> If so, I don't any modern Linux should configure the "file" mutex
>> mechanism by default, and you could possibly report it...
>
> Yes, that is the entry of Ubuntu 14 ("Trusty") default apache2.conf file, see
> http://packages.ubuntu.com/de/trusty/apache2
> there the linked file
> http://archive.ubuntu.com/ubuntu/pool/main/a/apache2/apache2_2.4.7-1ubuntu4.5.debian.tar.gz
> in the tarball the file
> /debian/config-dir/apache2.conf

That does not look very sensible to me...

>
> Great, thanks, I think we will try without Mutex directive. So if apache2ctl -V gives
>  -D APR_USE_SYSVSEM_SERIALIZE
>  -D APR_USE_PTHREAD_SERIALIZE
> then the first is taken as default?

The former mechanism is about synchronization between processus
(apr_proc_mutex), whereas the latter is about synchronization between
threads (apr_thread_mutex).
Actually the "pthread" mechanism used to synchronize processes is
defined as APR_USE_PROC_PTHREAD_SERIALIZE, not very easy to guess, but
that's for historical reasons (proc-pthreads were added later...).

>
> I just checked what is the active Mutex:
>
> #apache2ctl -t -D DUMP_RUN_CFG
> ServerRoot: "/etc/apache2"
> Main DocumentRoot: "/var/www"
> Main ErrorLog: "/var/log/apache2/error.log"
> Mutex watchdog-callback: using_defaults
> Mutex rewrite-map: using_defaults
> Mutex ssl-stapling: using_defaults
> Mutex proxy: using_defaults
> Mutex ssl-cache: using_defaults
> Mutex default: dir="/var/lock/apache2" mechanism=fcntl

That's when you configure "Mutex fcntl:/var/lock/apache2" right, not
by default (no Mutex)?

> Mutex mpm-accept: using_defaults
> PidFile: "/var/run/apache2/apache2.pid"
> Define: DUMP_RUN_CFG
> Define: ENABLE_USR_LIB_CGI_BIN
> User: name="www-data" id=33
> Group: name="www-data" id=33
>
> It looks strange to me that fcntl is used but no files exist in /var/lock/apache2

That's because the file is immediately unlinked after being opened
(still the inode remains until the last file descriptor is closed).
Since httpd's children processes inherit the descriptor when created,
it works (no process needs to open that file later).

>
>> Hopefully, the "file" mechanism is not suitable anyway or modern OS.
> Thanks for the info!

As Eric mentioned, "fcntl" may not be suitable either, which lets no
Mutex, if the above command reports "Mutex default: mechanism=[sysvsem
or pthread]", or explicitly "Mutex [sysvsem or pthread] default"...

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message