<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>28789</bug_id>
          
          <creation_ts>2013-04-04 13:10:51 +0400</creation_ts>
          <short_desc>Некорректно распознаёт состояние сервиса spamd (sysvinit)</short_desc>
          <delta_ts>2016-07-11 23:47:20 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>spamassassin-spamd</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>32263</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Evgenii Terechkov">evg</reporter>
          <assigned_to name="Sergey Y. Afonin">asy</assigned_to>
          <cc>aen</cc>
    
    <cc>asy</cc>
    
    <cc>boyarsh</cc>
    
    <cc>george</cc>
    
    <cc>lakostis</cc>
    
    <cc>slchess</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>139322</commentid>
    <comment_count>0</comment_count>
    <who name="Evgenii Terechkov">evg</who>
    <bug_when>2013-04-04 13:10:51 +0400</bug_when>
    <thetext>При dist-upgrade:

9: spamassassin-spamd               ################################################################################################### [ 75%]
Service spamd is not running.[PASSED]
Starting spamd service: Apr  4 09:00:54.837 [9855] warn: server socket setup failed, retry 1: spamd: could not create INET socket on 127.0.0.1:783: Address already in use
Apr  4 09:00:55.838 [9855] warn: server socket setup failed, retry 2: spamd: could not create INET socket on 127.0.0.1:783: Address already in use
Apr  4 09:00:56.838 [9855] warn: server socket setup failed, retry 3: spamd: could not create INET socket on 127.0.0.1:783: Address already in use
Apr  4 09:00:57.839 [9855] warn: server socket setup failed, retry 4: spamd: could not create INET socket on 127.0.0.1:783: Address already in use
Apr  4 09:00:58.840 [9855] warn: server socket setup failed, retry 5: spamd: could not create INET socket on 127.0.0.1:783: Address already in use
Apr  4 09:00:59.840 [9855] warn: server socket setup failed, retry 6: spamd: could not create INET socket on 127.0.0.1:783: Address already in use
Apr  4 09:01:00.841 [9855] warn: server socket setup failed, retry 7: spamd: could not create INET socket on 127.0.0.1:783: Address already in use
Apr  4 09:01:01.841 [9855] warn: server socket setup failed, retry 8: spamd: could not create INET socket on 127.0.0.1:783: Address already in use
Apr  4 09:01:02.842 [9855] warn: server socket setup failed, retry 9: spamd: could not create INET socket on 127.0.0.1:783: Address already in use
Apr  4 09:01:03.843 [9855] error: spamd: could not create INET socket on 127.0.0.1:783: Address already in use
spamd: could not create INET socket on 127.0.0.1:783: Address already in use
[FAILED]

Работа apt-а при этом не прерывается, но обновление пакета фактически не происходит, т.к. не происходит перезапуск. Демон в действительности запущен:

root@visp ~ # netlist|grep :783
root     1515  /usr/bi+ 5 tcp       127.0.0.1:783           0.0.0.0:0     LISTEN
root     1520  spamd c+ 5 tcp       127.0.0.1:783           0.0.0.0:0     LISTEN
root     1518  spamd c+ 5 tcp       127.0.0.1:783           0.0.0.0:0     LISTEN

Попробовал остановить вручную:
root@visp ~ # service spamd stop 
Service spamd is not running.[PASSED]

Нет эффекта:
root@visp ~ # netlist|grep :783 
root     1515  /usr/bi+ 5 tcp       127.0.0.1:783           0.0.0.0:0     LISTEN
root     1520  spamd c+ 5 tcp       127.0.0.1:783           0.0.0.0:0     LISTEN
root     1518  spamd c+ 5 tcp       127.0.0.1:783           0.0.0.0:0     LISTEN

root@visp ~ # rpm -qf =spamd
spamassassin-spamd-3.3.2-alt2

root@visp ~ # rpm -V spamassassin-spamd
root@visp ~ # cat /var/run/spamd.pid 
1515</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>140848</commentid>
    <comment_count>1</comment_count>
    <who name="Chess">slchess</who>
    <bug_when>2013-06-07 15:14:52 +0400</bug_when>
    <thetext>аналогично

#&gt; service spamd status
spamd is dead, but stale PID file exists

#&gt; cat /var/run/spamd.pid 
3465

#&gt; ps axuw | grep spam
root      3465  0.0  1.5  36396 32496 ?        Ss   12:12   0:05 /usr/bin/spamd -d --pidfile=/var/run/spamd.pid 
mail      4222 16.8  6.7 146976 139860 ?       S    12:12  20:26 spamd child</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>146824</commentid>
    <comment_count>2</comment_count>
    <who name="Sergey Y. Afonin">asy</who>
    <bug_when>2014-06-19 12:54:40 +0400</bug_when>
    <thetext>Проблема или в start-stop-daemon, или в его использовании:
http://lists.altlinux.org/pipermail/devel/2014-June/198779.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>146834</commentid>
    <comment_count>3</comment_count>
    <who name="Sergey Y. Afonin">asy</who>
    <bug_when>2014-06-20 11:11:23 +0400</bug_when>
    <thetext>В итоге, что имеем. 
1. В /proc/&lt;pid&gt;/stat имя с пробелом: &quot;/usr/bin/spamd &quot;
2. Пробел передать нельзя: http://bugzilla.altlinux.org/show_bug.cgi?id=27531#c1
3. Cимлинк /proc/&lt;pid&gt;/exe делается на бинарник с версией (/usr/bin/perl5.18.2), потому к нему привязываться тоже нельзя.

До лучших времён переписал в init-скрипте stop() и reload() с вызовом start-stop-daemon напрямую. Вроде бы работает...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>146843</commentid>
    <comment_count>4</comment_count>
    <who name="Repository Robot">repository-robot</who>
    <bug_when>2014-06-23 12:49:21 +0400</bug_when>
    <thetext>spamassassin-3.4.0-alt1 -&gt; sisyphus:

* Thu Jun 19 2014 Sergey Y. Afonin &lt;asy@altlinux&gt; 3.4.0-alt1
- NMU: 3.4.0 (ALT #30063)
- fixed start, stop, reload and status options in init.d/spamd (ALT #28789)
- changed permisson for sa-update-keys directory to 700
- added lsb init header for init.d/spamd
- removed /var/run/spamd directory (/var/run used for pid file)
- added CHILDUSER variable and described it in the /etc/sysconfig/spamd</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>146845</commentid>
    <comment_count>5</comment_count>
    <who name="Sergey Y. Afonin">asy</who>
    <bug_when>2014-06-23 12:56:39 +0400</bug_when>
    <thetext>(In reply to comment #3)

&gt; До лучших времён переписал в init-скрипте stop() и reload() с вызовом
&gt; start-stop-daemon напрямую. Вроде бы работает...

&quot;лучшие времена&quot; наступили: start-stop-daemon, оказывается, симлинк /usr/bin/perl тоже понимает, как /usr/bin/perl&lt;version&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>