You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2013/02/28 15:33:14 UTC

[Bug 54622] New: shared memory cleanup

https://issues.apache.org/bugzilla/show_bug.cgi?id=54622

            Bug ID: 54622
           Summary: shared memory cleanup
           Product: Apache httpd-2
           Version: 2.4.3
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_auth_digest
          Assignee: bugs@httpd.apache.org
          Reporter: tm@del.bg
    Classification: Unclassified

Created attachment 30005
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=30005&action=edit
Let apachectl cleanup stale shm and pid files

If httpd dies for some reason (see bellow) it leaves shared memory segments
behind, and won't start until shm is cleaned up manually.

One of the reasons for unclean shutdown might be bug in the apache itself (or
some module like mod_php etc.).

Another reason might be Linux oom killer.

Yet another reason might be: shared hosting environment, heavy server load
(maybe incoming DoS), you want to restart apache — execute httpd -k stop, wait
several seconds or even a minute, finally give up and kill -9.

The error mod_auth_digest spits is:

[Sun Feb 17 04:28:02.765535 2013] [auth_digest:error] [pid 17934] (17)File
exists: AH01762: Failed to create shared memory segment on file
/apache/logs/authdigest_shm.17934
[Sun Feb 17 04:28:02.765580 2013] [auth_digest:error] [pid 17934] (17)File
exists: AH01760: failed to initialize shm - all nonce-count checking, one-time
nonces, and MD5-sess algorithm disabled
[Sun Feb 17 04:28:02.765588 2013] [:emerg] [pid 17934] AH00020: Configuration
Failed, exiting

My solutions for now is patched apachectl (see attached patch).

Our best case scenario is if apache could improve on this, so we don't have to
do it ourselves.

If that cannot be done, at least changing owner of shm segments to apache, so
that we could more easily / safely select them for cleanup.


Related issues:
 * https://issues.apache.org/bugzilla/show_bug.cgi?id=7838 (Apache leaves
shared memory segments and dies after unclean shutdown)
 * https://issues.apache.org/bugzilla/show_bug.cgi?id=16056 (Shared memory &
mutex ownership not correctly established for SysV mutexes)


Best regards,
Teodor

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 54622] shared memory cleanup

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54622

Christophe JAILLET <ch...@wanadoo.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |PatchAvailable

-- 
You are receiving this mail because:
You are the assignee for the bug.

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