Translated message

A translation of this page exists in English.

ワーカー/イベントの mpm でセグメンテーション違反が発生した Apache httpd で 2 回以上連続で graceful reload を実行すると、logrotate がトリガーされる

Solution Verified - Updated -

Issue

  • 複数の別個の httpd ログファイルがあるので、/etc/logrotate.d には、service httpd reload または systemctl reload httpd を呼び出すファイルが複数あります。logrotate が実行され、Apache httpd ログファイルがローテーションされるたびに、メイン (root) の Apache httpd プロセスがセグメンテーション違反でクラッシュし、サービスが失敗した状態のままになります。Apache エラーログには次のように記載されています。

    [Sun Aug 07 03:24:02.357442 2016] [mpm_event:notice] [pid 15813:tid 140606026332224] AH00493: SIGUSR1 received.  Doing graceful restart
    [Sun Aug 07 03:24:02.445959 2016] [core:notice] [pid 15813:tid 140606026332224] AH00060: seg fault or similar nasty error detected in the parent process
    
  • Apache httpd がワーカーまたはイベント MPM 用に設定されている場合に、複数のグレースフルリロードが立て続けに試行されると、メインプロセスでセグメンテーション違反が発生します。RHEL7 httpd での再現:

    [root@a72 ~]# yum -y install httpd
    Installed:
      httpd.x86_64 0:2.4.6-40.el7_2.4
    Dependency Installed:
      apr.x86_64 0:1.4.8-3.el7
      apr-util.x86_64 0:1.5.2-6.el7
      httpd-tools.x86_64 0:2.4.6-40.el7_2.4
      mailcap.noarch 0:2.1.41-2.el7   
    [root@a72 ~]# sed -i -e '/^Load/s/^/#/' -e '/#Load.*event/s/^#//' /etc/httpd/conf.modules.d/00-mpm.conf
    [root@a72 ~]# systemctl start httpd
    [root@a72 ~]# while :; do ((n++)); systemctl reload httpd || break; done 2>/dev/null; echo reload failed after count=$n
    reload failed after count=16
    [root@a72 ~]# tail -2 /var/log/httpd/error_log
    [Thu Sep 15 11:59:37.467927 2016] [mpm_event:notice] [pid 1564:tid 140279584745536] AH00493: SIGUSR1 received.  Doing graceful restart
    [Thu Sep 15 11:59:37.505167 2016] [core:notice] [pid 1564] AH00060: seg fault or similar nasty error detected in the parent process
    

Environment

  • Red Hat Enterprise Linux 7
    • ワーカーまたはイベントが MPM に設定された httpd の EL7 バージョン。テストでは、次の影響が確認されました。
      • httpd-2.4.6-40.el7_2.4.x86_64
      • httpd24-2.4.6-62.ep7.el7.x86_64
      • httpd24-httpd-2.4.18-11.el7.x86_64
      • jbcs-httpd24-httpd-2.4.6-77.SP1.jbcs.el7.x86_64
      • jbcs-httpd24-httpd-2.4.29-17.jbcs.el7.x86_64

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content