<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>110556</bug_id>
          
          <creation_ts>2005-10-26 08:57 0000</creation_ts>
          <short_desc>apache2: clean shutdown patch</short_desc>
          <delta_ts>2008-03-24 00:28:26 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Server</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>alchemyx@uznam.net.pl</reporter>
          <assigned_to>apache-bugs@gentoo.org</assigned_to>
          <cc>aksansai@gmail.com</cc>
    
    <cc>anakin.skyw@gmx.de</cc>
    
    <cc>birder@ozemail.com.au</cc>
    
    <cc>john.mcfarlane@rockfloat.com</cc>
    
    <cc>kai@kaishome.de</cc>
    
    <cc>mail@patrick-nagel.net</cc>
    
    <cc>mattsch@gmail.com</cc>
    
    <cc>nospam@dolney.com</cc>
    
    <cc>peter@kerwien.homeip.net</cc>
    
    <cc>polynomial-c@gentoo.org</cc>

      

      
          <long_desc isprivate="0">
            <who>alchemyx@uznam.net.pl</who>
            <bug_when>2005-10-26 08:57:03 0000</bug_when>
            <thetext>We should apply same patch as for squid, because often apache doesn&apos;t stop
immediately. Proposed patch attached.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>alchemyx@uznam.net.pl</who>
            <bug_when>2005-10-26 08:58:07 0000</bug_when>
            <thetext>Created an attachment (id=71512)
apache2 clean shutdown patch
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>pquerna@apache.org</who>
            <bug_when>2005-10-26 10:08:04 0000</bug_when>
            <thetext>why?  It does stop.

The real solution is to either from backport or use 2.1, which has the
graceful-stop feature.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>alchemyx@uznam.net.pl</who>
            <bug_when>2005-10-26 10:38:12 0000</bug_when>
            <thetext>On loaded servers when you issue /etc/init.d/apache stop it takes at least 5 to
10 seconds before every process dissapears (I am using mpm-worker if it gives
any hint).

Adding that solved problem, especialy when running apache restart, which always
failed because of not-yet-dead processes of apache. I think it is clean and good
solution, it does no harm for anybody not needing that feature.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>peter@kerwien.homeip.net</who>
            <bug_when>2006-05-02 12:01:40 0000</bug_when>
            <thetext>I would also like to see that something was done to the restart problem of apache. Often a restart fails, and you need to do a start after the failed restart.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jakub@gentoo.org</who>
            <bug_when>2006-08-30 06:58:25 0000</bug_when>
            <thetext>*** Bug 145596 has been marked as a duplicate of this bug. ***</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>kai@kaishome.de</who>
            <bug_when>2006-09-01 08:51:58 0000</bug_when>
            <thetext>(In reply to comment #2)
&gt; why?  It does stop.
&gt; 
&gt; The real solution is to either from backport or use 2.1, which has the
&gt; graceful-stop feature.

Why? Yes, it does stop, but it does not immediatly restart - because it does not immediatly stop.

I ask myself why you are argumenting against a quickfix. As far as I can see your argumentation is now almost 1 year old, I suggestion of backporting was not picked up. But apache2 is marked stable.

Either the quickfix should be applied and a new bug should be opened for improving this - or apache 2.0 should be put back to testing or unstable.

It is currently unusable in a production environment when you do automated restarts because it is totally unreliable.

Sorry, just my 2 pence. I love Gentoo for it&apos;s stability and affords to keep packages stable with custom patches applied by the ebuilds (and 2.1 isn&apos;t marked stable). This argumentation is just ignorance. &quot;The right way&quot; is subject to your liking, not to the community&apos;s a/o users&apos; liking.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vericgar@gentoo.org</who>
            <bug_when>2006-10-15 16:12:24 0000</bug_when>
            <thetext>We have moved to using start-stop-daemon in apache 2.0.59-r1. start-stop-daemon should do all the heavy lifting for us, and so stops and restarts now work correctly.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jakub@gentoo.org</who>
            <bug_when>2007-01-22 07:24:55 0000</bug_when>
            <thetext>*** Bug 163162 has been marked as a duplicate of this bug. ***</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jakub@gentoo.org</who>
            <bug_when>2007-01-31 17:30:10 0000</bug_when>
            <thetext>*** Bug 164717 has been marked as a duplicate of this bug. ***</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>anakin.skyw@gmx.de</who>
            <bug_when>2007-01-31 23:59:47 0000</bug_when>
            <thetext>&gt;and so stops and restarts now work correctly.

Apparently not. Bug 164717</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jakub@gentoo.org</who>
            <bug_when>2007-02-05 14:31:11 0000</bug_when>
            <thetext>*** Bug 165448 has been marked as a duplicate of this bug. ***</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jakub@gentoo.org</who>
            <bug_when>2007-02-05 14:31:29 0000</bug_when>
            <thetext>People are still moaning about this... Reopen.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>john.mcfarlane@rockfloat.com</who>
            <bug_when>2007-02-05 14:38:44 0000</bug_when>
            <thetext>Sorry for the dup... I should have thought to search closed bugs too?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>ziapannocchia@gmail.com</who>
            <bug_when>2007-04-09 07:28:38 0000</bug_when>
            <thetext>I had a lot of problems with apache-2.2.4 stop and restart functions.

1. start-stop-daemon does not work, while apache2ctl does. This behaviour is undependent from the following observations.
2. http.conf does explicitly not use &quot;PidFile&quot; voice and defaults to /var/run/apache2.pid. I thing may be better to add an explicit line for it.
3. init script uses explicitly the option &quot;--pidfile&quot; setted to /var/run/apache2.pid. I thing may it be better to insert a variable in /etc/conf/apache to change this choice.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>phreak@gentoo.org</who>
            <bug_when>2007-05-26 18:20:47 0000</bug_when>
            <thetext>This should be fixed now.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jakub@gentoo.org</who>
            <bug_when>2008-01-20 09:16:14 0000</bug_when>
            <thetext>*** Bug 206730 has been marked as a duplicate of this bug. ***</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jakub@gentoo.org</who>
            <bug_when>2008-02-15 19:29:35 0000</bug_when>
            <thetext>*** Bug 210272 has been marked as a duplicate of this bug. ***</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>mattsch@gmail.com</who>
            <bug_when>2008-02-15 19:37:43 0000</bug_when>
            <thetext>(In reply to comment #15)
&gt; This should be fixed now.
&gt; 

How exactly has this been fixed?  Is there a patch/version we can test?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jakub@gentoo.org</who>
            <bug_when>2008-02-15 19:39:37 0000</bug_when>
            <thetext>(In reply to comment #18)
&gt; How exactly has this been fixed?  Is there a patch/version we can test?

No, there&apos;s no fix if you still have the issue. Providing a wrong return status is none of Gentoo problem, take it upstream. 
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>mattsch@gmail.com</who>
            <bug_when>2008-02-15 19:42:52 0000</bug_when>
            <thetext>Has anyone filed a bug for this upstream yet?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>mattsch@gmail.com</who>
            <bug_when>2008-02-15 20:06:18 0000</bug_when>
            <thetext>Since I could not find a bug reported on this upstream, I filed one myself there.  Here&apos;s a link to the bug if you want to track it:

http://issues.apache.org/bugzilla/show_bug.cgi?id=44433</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jakub@gentoo.org</who>
            <bug_when>2008-02-28 05:05:37 0000</bug_when>
            <thetext>*** Bug 211690 has been marked as a duplicate of this bug. ***</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jakub@gentoo.org</who>
            <bug_when>2008-02-28 06:17:36 0000</bug_when>
            <thetext>Since people keep adding themselves here: you do NOT want to use restart, pretty much ever. Use /etc/init.d/apache2 reload if all you are after is reloading your configuration. You can configure how the reload will be done via RELOAD_TYPE variable in /etc/conf.d/apache2 (most likely you just want to stick with the default graceful one).

For more info, see http://httpd.apache.org/docs/2.2/stopping.html

If you want /etc/init.d/restart to work as with all the rest of the stuff out there, make upstream fix it - http://issues.apache.org/bugzilla/show_bug.cgi?id=44433 - since restart really means stop &amp;&amp; start and the second part won&apos;t happen until the first one succeeded; alas apache doesn&apos;t bother itself with checking properly whether it really stopped first, and just returns success.
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>hollow@gentoo.org</who>
            <bug_when>2008-02-28 16:28:29 0000</bug_when>
            <thetext>the reason we don&apos;t actually fix (read: workaround) this, can be easily seen at http://svn.debian.org/viewsvn/pkg-apache/trunk/apache2/apache2.2-common.apache2.init?rev=544&amp;view=markup

such crap is just not maintainable</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>hollow@gentoo.org</who>
            <bug_when>2008-03-22 15:33:48 0000</bug_when>
            <thetext>i have to specify a comment</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>hollow@gentoo.org</who>
            <bug_when>2008-03-22 15:34:32 0000</bug_when>
            <thetext>fixed in svn with much less code</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>mattsch@gmail.com</who>
            <bug_when>2008-03-23 17:52:45 0000</bug_when>
            <thetext>I thought the whole point was that this was a bug the developers at apache needed to fix?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>hollow@gentoo.org</who>
            <bug_when>2008-03-24 00:28:26 0000</bug_when>
            <thetext>(In reply to comment #27)
&gt; I thought the whole point was that this was a bug the developers at apache
&gt; needed to fix?
&gt; 

yes, but i decided we cannot wait until upstream fixes their signal mess, i tried it, but gave up after two hours or so ...</thetext>
          </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>71512</attachid>
            <date>2005-10-26 08:58 0000</date>
            <desc>apache2 clean shutdown patch</desc>
            <filename>apache2-cleanshutdown.patch</filename>
            <type>text/plain</type>
            <data encoding="base64">LS0tIC90bXAvYXBhY2hlMgkyMDA1LTEwLTI2IDE3OjU2OjM1LjAwMDAwMDAwMCArMDIwMAorKysg
L2V0Yy9pbml0LmQvYXBhY2hlMgkyMDA1LTEwLTI2IDE3OjUzOjA4LjAwMDAwMDAwMCArMDIwMApA
QCAtODMsNiArODMsMzMgQEAKIAljaGVja2NvbmZpZyB8fCByZXR1cm4gMQogCWViZWdpbiAiU3Rv
cHBpbmcgYXBhY2hlMiIKIAkke0FQQUNIRTJ9ICR7QVBBQ0hFMl9PUFRTfSAtayBzdG9wCisKKwlQ
SUQ9YGNhdCAvdmFyL3J1bi9hcGFjaGUyLnBpZCAyPi9kZXYvbnVsbGAKKworICAgICAgICAjIE5v
dyB3ZSBoYXZlIHRvIHdhaXQgdW50aWwgc3F1aWQgaGFzIF9yZWFsbHlfIHN0b3BwZWQuCisgICAg
ICAgIHNsZWVwIDIKKyAgICAgICAgaWYgdGVzdCAtbiAiJFBJRCIgJiYga2lsbCAtMCAkUElEIDI+
L2Rldi9udWxsCisgICAgICAgIHRoZW4KKyAgICAgICAgICAgICAgICBlaW5mb24gIldhaXRpbmcg
LiIKKyAgICAgICAgICAgICAgICBjbnQ9MAorICAgICAgICAgICAgICAgIHdoaWxlIGtpbGwgLTAg
JFBJRCAyPi9kZXYvbnVsbAorICAgICAgICAgICAgICAgIGRvCisgICAgICAgICAgICAgICAgICAg
ICAgICBjbnQ9YGV4cHIgJGNudCArIDFgCisgICAgICAgICAgICAgICAgICAgICAgICBpZiBbICRj
bnQgLWd0IDYwIF0KKyAgICAgICAgICAgICAgICAgICAgICAgIHRoZW4KKyAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgIyBXYWl0ZWQgMTIwIHNlY29uZHMgbm93LiBGYWlsLgorICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICBlZW5kIDEgIkZhaWxlZC4iCisgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgIGJyZWFrCisgICAgICAgICAgICAgICAgICAgICAgICBmaQorICAg
ICAgICAgICAgICAgICAgICAgICAgc2xlZXAgMgorICAgICAgICAgICAgICAgICAgICAgICAgZWNo
byAtbiAiLiIKKyAgICAgICAgICAgICAgICBkb25lCisgICAgICAgICAgICAgICAgZWNobyAtbiAi
ZG9uZS4iCisgICAgICAgICAgICAgICAgZWVuZCAwCisgICAgICAgIGVsc2UKKyAgICAgICAgICAg
ICAgICBlZW5kIDAKKyAgICAgICAgZmkKKwogCWVlbmQgJD8KIH0KIAo=
</data>        

          </attachment>
    </bug>

</bugzilla>