Uploaded image for project: 'CFEngine Community'
  1. CFEngine Community
  2. CFE-3625

File descriptor of child higher than MAX_FD

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Higher
    • Resolution: Fixed
    • Affects Version/s: 3.15.3
    • Fix Version/s: 3.15.4, 3.18.0
    • Component/s: cf-serverd
    • Labels:
      None
    • Story Points:
      3

      Description

      I am pulling logfiles from clients and got this warning on the policy server. all files are still transferded.

      warning: File descriptor 180 of child 34996634 higher than MAX_FD, check for defunct children
      

      maxconnections is set to 800

      nofiles is set to 8192 in limits

      i have 400 clients on this policy server

      used bundle:

      bundle agent client_get ( bla )
      {
          vars:
               "download_dir" string => "/var/cfengine/mylogs";
               'lastseen'      slist => { hostsseen( "2", "lastseen", "name" ) };
               'clients'       slist => { "${sys.policy_hub}", "@{lastseen}" };    methods:
             "file_get"
               usebundle => bg_get ( "${download_dir}", "${clients}" ),
               comment   => "backgrounding agents for parallelization",
               action    => bg( "5", "5" );
      }
      
      bundle agent bg_get( download_dir, clients )
      {
         vars:
            "file_to_get" string => "dummy.log";   
         files:
            "$(download_dir)/${clients}.log"
               classes     => if_repaired("downloaded_data_for_${clients}"),
               perms       => m( "644" ),
               copy_from   => remote_dcp( "file_to_get", "$(clients)");}
      

      MAX_FD define:

      https://github.com/cfengine/core/blob/02478862ea707ed51223c1d5d2d8cd8d61d2915d/libpromises/pipes_unix.c#L42

       

      the warning is produced here:

      https://github.com/cfengine/core/blob/02478862ea707ed51223c1d5d2d8cd8d61d2915d/libpromises/pipes_unix.c#L137-L147

       

      If i assume right, the MAX_FD setting is a per thread setting and it already
      makes a realloc if the descriptors get exhausted. Maybe the MAX_FD count should follow

      sysconf(_SC_OPEN_MAX) somehow as 128 feels a littel bit low.

        Attachments

          Activity

            People

            • Assignee:
              grumpycat Christian Tremel
              Reporter:
              grumpycat Christian Tremel
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Summary Panel