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

cf-promises goes into infinite loop when iterating over an array of lists

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Evaluation
    • Labels:
      None

      Description

      Attempted to upgrade a working community 3.4.5 install to community 3.5.3.

      The embedded call to cf-promises -c /var/cfengine/inputs/promises.cf goes into an infinite loop.

      Calling cf-agent -Kv:

      <pre># cf-agent -Kv | tee out
      2014-03-31T09:21:33-0400 verbose: Work directory is /var/cfengine
      2014-03-31T09:21:33-0400 verbose: Looking for a source of entropy in '/var/cfengine/randseed'
      2014-03-31T09:21:33-0400 verbose: Making sure that locks are private...
      2014-03-31T09:21:33-0400 verbose: Checking integrity of the state database
      2014-03-31T09:21:33-0400 verbose: Checking integrity of the module directory
      2014-03-31T09:21:33-0400 verbose: Checking integrity of the PKI directory
      2014-03-31T09:21:33-0400 verbose: Loaded private key at '/var/cfengine/ppkeys/localhost.priv'
      2014-03-31T09:21:33-0400 verbose: Loaded public key '/var/cfengine/ppkeys/localhost.pub'
      2014-03-31T09:21:33-0400 verbose: Setting cfengine default port to 5308, '5308'
      2014-03-31T09:21:33-0400 verbose: Reference time set to 'Mon Mar 31 09:21:33 2014'
      2014-03-31T09:21:33-0400 verbose: CFEngine Core 3.5.3
      2014-03-31T09:21:33-0400 verbose: Host name is: wesson.offsite.psu.edu
      2014-03-31T09:21:33-0400 verbose: Operating System Type is linux
      2014-03-31T09:21:33-0400 verbose: Operating System Release is 2.6.32-358.14.1.el6.x86_64
      2014-03-31T09:21:33-0400 verbose: Architecture = x86_64
      2014-03-31T09:21:33-0400 verbose: Using internal soft-class linux for host wesson.offsite.psu.edu
      2014-03-31T09:21:33-0400 verbose: The time is now Mon Mar 31 09:21:33 2014
      2014-03-31T09:21:33-0400 verbose: Extended system discovery is only available in CFEngine Enterprise
      2014-03-31T09:21:33-0400 verbose: Additional hard class defined as: 64_bit
      2014-03-31T09:21:33-0400 verbose: Additional hard class defined as: linux_2_6_32_358_14_1_el6_x86_64
      2014-03-31T09:21:33-0400 verbose: Additional hard class defined as: linux_x86_64
      2014-03-31T09:21:33-0400 verbose: Additional hard class defined as: linux_x86_64_2_6_32_358_14_1_el6_x86_64
      2014-03-31T09:21:33-0400 verbose: GNU autoconf class from compile time: compiled_on_linux_gnu
      2014-03-31T09:21:33-0400 verbose: Address given by nameserver: 146.186.173.119
      2014-03-31T09:21:33-0400 verbose: No interface exception file /var/cfengine/inputs/ignore_interfaces.rx
      2014-03-31T09:21:33-0400 verbose: Interface 1: lo
      2014-03-31T09:21:33-0400 verbose: Interface 2: em1
      2014-03-31T09:21:33-0400 verbose: IP address of host set to 146.186.173.119
      2014-03-31T09:21:33-0400 verbose: Trying to locate my IPv6 address
      2014-03-31T09:21:33-0400 verbose: Found IPv6 address 2610:8:4000:7d:146:186:173:119
      2014-03-31T09:21:33-0400 verbose: Found IPv6 address fe80::d6ae:52ff:fe6e:ab19
      2014-03-31T09:21:33-0400 verbose: Looking for environment from cf-monitord...
      2014-03-31T09:21:33-0400 verbose: Loading environment...
      2014-03-31T09:21:33-0400 verbose: Environment data loaded
      2014-03-31T09:21:33-0400 verbose: This appears to be a redhat (or redhat-based) system.
      2014-03-31T09:21:33-0400 verbose: Looking for redhat linux info in 'Red Hat Enterprise Linux Server release 6.5 (Santiago)'
      2014-03-31T09:21:33-0400 verbose: Found 8 processors
      2014-03-31T09:21:33-0400 verbose: Persistent class 'measurements:messages_high_ldt' for 0 more minutes
      2014-03-31T09:21:33-0400 verbose: Adding persistent class 'measurements:messages_high_ldt' to heap
      2014-03-31T09:21:33-0400 verbose: This agent is bootstrapped to 'wesson.offsite.psu.edu'
      2014-03-31T09:21:33-0400 verbose: Promises seem to change
      2014-03-31T09:21:33-0400 verbose: Input file is changed since last validation, validating it
      2014-03-31T09:21:33-0400 verbose: Verifying the syntax of the inputs...
      2014-03-31T09:21:33-0400 verbose: Checking policy with command '"/var/cfengine/bin/cf-promises" -c "/var/cfengine/inputs/promises.cf"'
      </pre>

      It hangs after that.

      If we strace that last command, we see, after it seems to be done parsing the inputs described in promises.cf:

      <pre>getuid() = 0
      getgid() = 0
      getuid() = 0
      getgid() = 0
      getuid() = 0
      getgid() = 0
      getuid() = 0
      getgid() = 0
      getuid() = 0
      getgid() = 0
      getuid() = 0
      getgid() = 0
      getuid() = 0
      getgid() = 0
      getuid() = 0
      getgid() = 0
      getuid() = 0
      getgid() = 0
      getuid() = 0
      getgid() = 0
      getuid() = 0
      getgid() = 0
      getuid() = 0
      getgid() = 0
      getuid() = 0
      getgid() = 0
      getuid() = 0
      getgid() = 0
      getuid() = 0
      getgid() = 0
      getuid() = 0
      getgid() = 0
      getuid() = 0
      getgid() = 0
      getuid() = 0
      getgid() = 0
      getuid() = 0
      getgid() = 0
      getuid() = 0
      getgid() = 0
      getuid() = 0
      getgid() = 0
      getuid() = 0
      getgid() = 0
      </pre>

      And it just goes like that forever.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              a10053 Marcin Pasinski
              Reporter:
              phalenor Andrew Cobaugh
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: