The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

prefork: killing failed child

Discussion in 'E-mail Discussions' started by bloatedstoat, May 3, 2016.

  1. bloatedstoat

    bloatedstoat Well-Known Member

    Joined:
    Jun 14, 2012
    Messages:
    76
    Likes Received:
    6
    Trophy Points:
    8
    Location:
    Victoria, Australia
    cPanel Access Level:
    Root Administrator
    Hello,

    We were upgraded to WHM 56.0 (build 9) by way of upcp last night, since then we're seeing hundreds of entries in the maillog with the below.

    May 3 23:37:35 server_name spamd[160119]: prefork: killing failed child 160180 fd=8 at /usr/local/cpanel/3rdparty/perl/522/lib64/perl5/cpanel_lib/Mail/SpamAssassin/SpamdForkScaling.pm line 172.

    Anyone else experiencing this issue?
    Any insight and solution appreciated.
    Thanks.
     
  2. Ameya Barwe

    Ameya Barwe Well-Known Member

    Joined:
    Jan 1, 2016
    Messages:
    49
    Likes Received:
    2
    Trophy Points:
    8
    Location:
    Nashik
    cPanel Access Level:
    Root Administrator
    I think, might be some issues with last cPanel update, can you again run /scripts/upcp --force and see if this resolve it or not?
     
  3. alpinist

    alpinist Registered

    Joined:
    Jun 9, 2011
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Seeing exactly the same issue. Running run /scripts/upcp --force did not resolve it.

    This is what it looks like in NewRelic:


    spamd.jpg
     
    #3 alpinist, May 4, 2016
    Last edited by a moderator: May 4, 2016
  4. icmp

    icmp Registered

    Joined:
    May 5, 2016
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    FL
    cPanel Access Level:
    Root Administrator
    We're seeing the same thing. It's disturbing (but not surprising) that cPanel updates can break things like this.

    I noticed that we have a new file dated from May 3rd /etc/cpspamd.conf which specifies (new?) more aggressive than default maxchildren and maxspare values (3, 1 respectively) which might be causing the error to be more frequently triggered.
     
  5. bloatedstoat

    bloatedstoat Well-Known Member

    Joined:
    Jun 14, 2012
    Messages:
    76
    Likes Received:
    6
    Trophy Points:
    8
    Location:
    Victoria, Australia
    cPanel Access Level:
    Root Administrator
    This issue persists despite running upcp again.
    Could someone from cpanel confirm if a ticket should be opened for this issue.
    Is there a known problem with a case number?

    Code:
    May  7 11:29:56 xxxxxxxxx spamd[503806]: prefork: killing failed child 430632 fd=9 at /usr/local/cpanel/3rdparty/perl/522/lib64/perl5/cpanel_lib/Mail/SpamAssassin/SpamdForkScaling.pm line 172
    Thank you.
     
  6. bjoern

    bjoern Registered

    Joined:
    May 11, 2016
    Messages:
    1
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Germany
    cPanel Access Level:
    DataCenter Provider
    I was facing the exact same issue and contacted cPanel support.
    Their suggestion has been working just fine in my setup.

    My steps to finally resolve the issue were:

    # rm /var/cpanel/dormant_services/spamd/enabled
    # systemctl restart exim.service
    # systemctl restart spamd.service

     
    bloatedstoat likes this.
  7. bloatedstoat

    bloatedstoat Well-Known Member

    Joined:
    Jun 14, 2012
    Messages:
    76
    Likes Received:
    6
    Trophy Points:
    8
    Location:
    Victoria, Australia
    cPanel Access Level:
    Root Administrator
    @bjoern thank you for this. I'll implement later today.
     
  8. tmaciupa

    tmaciupa Registered

    Joined:
    May 16, 2016
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Szczecin, Poland
    cPanel Access Level:
    Root Administrator
    Check in /etc/init.d/spamd:
    $DAEMONIZE /usr/local/cpanel/3rdparty/perl/514/bin/spamd

    I've changed this:
    $DAEMONIZE /usr/local/cpanel/3rdparty/perl/522/bin/spamd
    after last update
     
  9. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,852
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    Is anyone experiencing issues with SpamAssassin functioning as expected, or is it just the log output that's concerning? The "prefork: killing failed child" entries you see in the log output is normal behavior that's associated with the dormant service functionality for spamd in cPanel 56. Per our documentation:

    This setting configures the system to unload idle services from memory after up to ten minutes of inactivity, and then loads listening devices that correspond to it. This setting reduces memory usage, but delays responses from dormant services. When you enable this setting for a service, that service will immediately enter dormant mode whenever you reboot your server or restart the service.

    You can read more about this in the version 56 release notes:

    56 Release Notes - Documentation - cPanel Documentation

    Thank you.
     
  10. ilmostro7

    ilmostro7 Registered

    Joined:
    Apr 6, 2016
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    US
    cPanel Access Level:
    DataCenter Provider
    I've seen this on multiple VPSs. The service is shown as "failed" and the process is not running.

    Code:
    spamd[8458]: prefork: killing failed child 11654 fd=10 at /usr/local/cpanel/3rdparty/perl/522/lib64/perl5/cpanel_lib/Mail/SpamAssassin/SpamdForkScaling.pm line 172.
    
    
    ● spamd.service - Apache SpamAssassin™ deferral daemon
      Loaded: loaded (/etc/systemd/system/spamd.service; static; vendor preset: disabled)
      Active: inactive (dead) since Sun 2016-09-04 06:41:10 CDT; 5 days ago
    Condition: start condition failed at Fri 2016-09-09 08:41:49 CDT; 14h ago
    Main PID: 8458 (code=killed, signal=TERM)
    
    Sep 04 06:37:45  spamd[8458]: prefork: killing failed child 11654 fd=10 at /usr/local/cpanel/3rdparty/perl/522/lib64/perl5/cpanel_lib/Mail/SpamAssassin/SpamdForkScaling.pm line 172.
    Sep 04 06:37:45  spamd[8458]: prefork: killed child 11654
    Sep 04 06:37:45  spamd[8458]: prefork: killing failed child 11652 fd=8 at /usr/local/cpanel/3rdparty/perl/522/lib64/perl5/cpanel_lib/Mail/SpamAssassin/SpamdForkScaling.pm line 172.
    Sep 04 06:37:45  spamd[8458]: prefork: killed child 11652
    Sep 04 06:37:45  spamd[8458]: prefork: killing failed child 11653 fd=9 at /usr/local/cpanel/3rdparty/perl/522/lib64/perl5/cpanel_lib/Mail/SpamAssassin/SpamdForkScaling.pm line 172.
    Sep 04 06:37:45  spamd[8458]: prefork: killed child 11653
    Sep 04 06:37:45  spamd[8458]: prefork: killing failed child 11650 fd=6 at /usr/local/cpanel/3rdparty/perl/522/lib64/perl5/cpanel_lib/Mail/SpamAssassin/SpamdForkScaling.pm line 172.
    Sep 04 06:37:45  spamd[8458]: prefork: killed child 11650
    Sep 04 06:37:45  spamd[8458]: spamd: handled cleanup of child pid [11654] due to SIGCHLD: interrupted, signal 2 (0002)
    Sep 04 06:37:45  spamd[8458]: spamd: handled cleanup of child pid [11652] due to SIGCHLD: interrupted, signal 2 (0002)
    
    Here is the content within the /etc/systemd/system/spamd.service file:

    Code:
      1  [Unit]
      2  Description=Apache SpamAssassin™ deferral daemon
      3  ConditionPathExists=!/etc/eximdisable
      4  ConditionPathExists=!/etc/spamdisable
      5  ConditionPathExists=!/var/cpanel/dnsonly
      6  ConditionPathExists=/etc/cpspamd.conf
      7  After=network-online.target
       
      8  [Service]
      9  Type=forking
      10  PIDFile=/var/run/spamd.pid
      11  ExecStart=/usr/local/cpanel/scripts/restartsrv_spamd
       
      12  [Install]
    
     
  11. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,852
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Could you open a support ticket using the link in my signature so we can take a closer look? You can post the ticket number here so we can update this thread with the outcome.

    Thank you.
     

Share This Page