ruby/rubygems · error · ThreadCreationError

Failed to create threads for the #{name} worker: #{creation_

Error message

Failed to create threads for the #{name} worker: #{creation_errors.map(&:to_s).uniq.join(", ")}

What it means

Error "Failed to create threads for the #{name} worker: #{creation_errors.map(&:to_s).uniq.join(", ")}" thrown in ruby/rubygems.

Source

Thrown at lib/bundler/worker.rb:111

    def create_threads
      creation_errors = []

      @threads = Array.new(@size) do |i|
        Thread.start { process_queue(i) }.tap do |thread|
          thread.name = "#{name} Worker ##{i}"
        end
      rescue ThreadError => e
        creation_errors << e
        nil
      end.compact

      add_interrupt_handler unless @threads.empty?

      return if creation_errors.empty?

      message = "Failed to create threads for the #{name} worker: #{creation_errors.map(&:to_s).uniq.join(", ")}"
      raise ThreadCreationError, message if @threads.empty?
      Bundler.ui.info message
    end

    def add_interrupt_handler
      @previous_interrupt_handler = trap("INT") { abort_threads }
    end

    def remove_interrupt_handler
      return unless @previous_interrupt_handler

      trap "INT", @previous_interrupt_handler
    end
  end
end

View on GitHub (pinned to 86cbb817a3)

When it happens

Trigger: Thrown at lib/bundler/worker.rb:111 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of ruby/rubygems@86cbb817a3 (2026-08-23). Data as JSON: /api/errors/f29afd9cb4a84cb2. Report an issue: GitHub.