puppetlabs/puppet · critical · LoadError

The loaded Fiddle version is not supported.

Error message

The loaded Fiddle version is not supported.

What it means

Raised at require time by puppet/util/at_fork/solaris.rb when the Fiddle library loads but does not define Fiddle::Handle. Early Fiddle releases (on old Rubies) still delegated to the deprecated DL module and exposed DL::Handle instead; Puppet's Solaris at-fork handler (which keeps the child process in a different process contract so a service restart does not kill a running agent) needs real Fiddle classes, so it raises LoadError immediately. This aborts loading the Solaris at-fork support, not arbitrary Puppet code.

Source

Thrown at lib/puppet/util/at_fork/solaris.rb:10

# frozen_string_literal: true

require_relative '../../../puppet'
require 'fiddle'

# Early versions of Fiddle relied on the deprecated DL module and used
# classes defined in the namespace of that module instead of classes defined
# in the Fiddle's own namespace e.g. DL::Handle instead of Fiddle::Handle.
# We don't support those.
raise LoadError, _('The loaded Fiddle version is not supported.') unless defined?(Fiddle::Handle)

# Solaris implementation of the Puppet::Util::AtFork handler.
# The callbacks defined in this implementation ensure the forked process runs
# in a different contract than the parent process. This is necessary in order
# for the child process to be able to survive termination of the contract its
# parent process runs in. This is needed notably for an agent run executed
# by a puppet agent service to be able to restart that service without being
# killed in the process as a consequence of running in the same contract as
# the service, as all processes in the contract are killed when the contract
# is terminated during the service restart.
class Puppet::Util::AtFork::Solaris
  private

  {
    'libcontract.so.1' => [
      # function name,            return value type, parameter types, ...
      [:ct_ctl_abandon,          Fiddle::TYPE_INT,  Fiddle::TYPE_INT],
      [:ct_tmpl_activate,        Fiddle::TYPE_INT,  Fiddle::TYPE_INT],

View on GitHub (pinned to e227c27540)

Solutions

  1. Install the puppet-agent (puppetlabs) package, which bundles a modern Ruby and Fiddle
  2. Or upgrade the system Ruby to a release whose Fiddle defines Fiddle::Handle (2.1+)
  3. Verify with: ruby -rfiddle -e 'puts defined?(Fiddle::Handle)' — it must print 'constant'
Defensive patterns

Strategy: validation

Validate before calling

require 'fiddle'
unless defined?(Fiddle::Handle)
  abort 'Fiddle too old (DL-backed); upgrade Ruby or install the puppet-agent package'
end

Try / catch

begin
  require 'puppet/util/at_fork/solaris'
rescue LoadError => e
  # e.message == 'The loaded Fiddle version is not supported.'
  warn 'unsupported system Ruby on Solaris; switch to puppet-agent bundled Ruby'
end

Prevention

When it happens

Trigger: Running Puppet on Solaris with a Ruby whose Fiddle predates the namespace migration (roughly Ruby < 2.0-era Fiddle/DL hybrids or a hand-built libfiddle); installing the puppet gem against the OS's ancient system Ruby instead of a packaged ruby; anything that requires puppet/util/at_fork/solaris on such a Ruby.

Common situations: Solaris zones/older Solaris 10-11 images where the default Ruby is ancient; gem installs instead of the puppet-agent all-in-one package; upgrading Puppet but leaving the old system Ruby in place.

Related errors


AI-assisted analysis of puppetlabs/puppet@e227c27540 (2026-08-21). Data as JSON: /api/errors/3bbdd0b0b6b47ef8. Report an issue: GitHub.