Uploaded image for project: 'Facter'
  1. Facter
  2. FACT-2856

Facter fails when interface name is not UTF-8

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: FACT 4.0.47
    • Component/s: None
    • Labels:
    • Template:
    • Team:
      Night's Watch
    • Sub-team:
    • Story Points:
      3
    • Sprint:
      ghost 25.11
    • Method Found:
      Needs Assessment
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Hide
      A pointer used to indicate networking information was being released by the GC to early and the memory was overriden, resulting in inconsistent data.

      The fix extends the scope of the pointer so that the memory it points to does not get freed prematurely.
      Show
      A pointer used to indicate networking information was being released by the GC to early and the memory was overriden, resulting in inconsistent data. The fix extends the scope of the pointer so that the memory it points to does not get freed prematurely.
    • QA Risk Assessment:
      Needs Assessment

      Description

      OS Name/Version: Solaris 11-64

      **Facter fails with the following message:

      raceback (most recent call last):
              12: from /opt/puppetlabs/puppet/bin/facter:10:in `<main>'
              11: from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/facter/framework/cli/cli_launcher.rb:23:in `start'
              10: from /opt/puppetlabs/puppet/lib/ruby/gems/2.7.0/gems/thor-1.0.1/lib/thor/base.rb:485:in `start'
               9: from /opt/puppetlabs/puppet/lib/ruby/gems/2.7.0/gems/thor-1.0.1/lib/thor.rb:392:in `dispatch'
               8: from /opt/puppetlabs/puppet/lib/ruby/gems/2.7.0/gems/thor-1.0.1/lib/thor/invocation.rb:127:in `invoke_command'
               7: from /opt/puppetlabs/puppet/lib/ruby/gems/2.7.0/gems/thor-1.0.1/lib/thor/command.rb:27:in `run'
               6: from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/facter/framework/cli/cli.rb:114:in `query'
               5: from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/facter.rb:395:in `to_user_output'
               4: from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/facter/framework/formatters/legacy_fact_formatter.rb:16:in `format'
               3: from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/facter/framework/formatters/legacy_fact_formatter.rb:26:in `format_for_no_query'
               2: from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/facter/framework/formatters/legacy_fact_formatter.rb:63:in `hash_to_facter_format'
               1: from /opt/puppetlabs/puppet/lib/ruby/2.7.0/json/common.rb:286:in `pretty_generate'
      /opt/puppetlabs/puppet/lib/ruby/2.7.0/json/common.rb:286:in `generate': "\\xC8" from ASCII-8BIT to UTF-8 (Encoding::UndefinedConversionError)

       

      The problem is reproducible 1 in 10 runs with --show-legacy argument. 

      Other faulty logs:

      [2020-11-12 06:40:30.648504 ] DEBUG Facter::Resolvers::Solaris::Networking - Command /usr/sbin/dhcpinfo -i b ServerID completed with the following stderr message: /usr/sbin/dhcpinfo: interface is not under DHCP control
      [2020-11-12 06:40:30.648775 ] DEBUG Facter::Resolvers::Solaris::Networking - Error! 9
      [2020-11-12 06:40:30.648885 ] DEBUG Facter::Resolvers::Solaris::Networking - Error! 9
      [2020-11-12 06:40:30.649085 ] DEBUG Facter::Resolvers::Solaris::Networking - Error! 9
      [2020-11-12 06:40:30.654791 ] DEBUG Facter::Core::Execution::Posix - Executing command: /usr/sbin/dhcpinfo -i  ServerID
      [2020-11-12 06:40:30.658743 ] DEBUG Facter::Core::Execution::Posix - Executing command: /usr/sbin/smbios -t SMB_TYPE_BIOS
      [2020-11-12 06:40:30.662268 ] DEBUG Facter::Resolvers::Solaris::Networking - Command /usr/sbin/dhcpinfo -i  ServerID completed with the following stderr message: /usr/sbin/dhcpinfo: interface is not under DHCP control
      [2020-11-12 06:40:30.662619 ] DEBUG Facter::Resolvers::Solaris::Networking - Error! 9
      [2020-11-12 06:40:30.662774 ] DEBUG Facter::Resolvers::Solaris::Networking - Error! 9
      [2020-11-12 06:40:30.663076 ] DEBUG Facter::Resolvers::Solaris::Networking - Error! 9
      [2020-11-12 06:40:30.663639 ] DEBUG Facter::Core::Execution::Posix - Executing command: /usr/sbin/dhcpinfo -i T�~
      �~
      x� ServerID

      [2020-11-12 06:40:30.678758 ] DEBUG Facter::Resolvers::Solaris::Networking - resolving fact dhcp, but undefined method `each' for nil:NilClass
      [2020-11-12 06:40:30.679221 ] DEBUG Facter::Resolvers::Solaris::Networking - Error! 134
      [2020-11-12 06:40:30.679957 ] DEBUG Facter::Core::Execution::Posix - Executing command: /usr/sbin/dhcpinfo -i lo0 ServerID
      [2020-11-12 06:40:30.684805 ] DEBUG Facter::Resolvers::Solaris::Networking - Command /usr/sbin/dhcpinfo -i lo0 ServerID completed with the following stderr message: /usr/sbin/dhcpinfo: interface is not under DHCP control
      [2020-11-12 06:40:30.685528 ] DEBUG Facter::Core::Execution::Posix - Executing command: /usr/sbin/dhcpinfo -i net0 ServerID
      [2020-11-12 06:40:30.690370 ] DEBUG Facter::Resolvers::Solaris::Networking - Error! 134
      [2020-11-12 06:40:30.691141 ] DEBUG Facter::Core::Execution::Posix - Executing command: /usr/sbin/dhcpinfo -i lo0 ServerID
      [2020-11-12 06:40:30.695950 ] DEBUG Facter::Resolvers::Solaris::Networking - Command /usr/sbin/dhcpinfo -i lo0 ServerID completed with the following stderr message: /usr/sbin/dhcpinfo: interface is not under DHCP control
      [2020-11-12 06:40:30.696140 ] DEBUG Facter::Resolvers::Solaris::Networking - Error! 134
      [2020-11-12 06:40:30.697004 ] DEBUG Facter::Core::Execution::Posix - Executing command: /usr/sbin/dhcpinfo -i net0 ServerID
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              bogdan.irimie Bogdan Irimie
              Reporter:
              oana.tanasoiu Oana Tanasoiu
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support