{"record":{"id":"f29afd9cb4a84cb2","repo":"ruby/rubygems","slug":"failed-to-create-threads-for-the-name-worker","errorCode":null,"errorMessage":"Failed to create threads for the #{name} worker: #{creation_errors.map(&:to_s).uniq.join(\", \")}","messagePattern":"Failed to create threads for the #(.+?) worker: #(.+?)","errorType":"exception","errorClass":"ThreadCreationError","httpStatus":null,"severity":"error","filePath":"lib/bundler/worker.rb","lineNumber":111,"sourceCode":"\n    def create_threads\n      creation_errors = []\n\n      @threads = Array.new(@size) do |i|\n        Thread.start { process_queue(i) }.tap do |thread|\n          thread.name = \"#{name} Worker ##{i}\"\n        end\n      rescue ThreadError => e\n        creation_errors << e\n        nil\n      end.compact\n\n      add_interrupt_handler unless @threads.empty?\n\n      return if creation_errors.empty?\n\n      message = \"Failed to create threads for the #{name} worker: #{creation_errors.map(&:to_s).uniq.join(\", \")}\"\n      raise ThreadCreationError, message if @threads.empty?\n      Bundler.ui.info message\n    end\n\n    def add_interrupt_handler\n      @previous_interrupt_handler = trap(\"INT\") { abort_threads }\n    end\n\n    def remove_interrupt_handler\n      return unless @previous_interrupt_handler\n\n      trap \"INT\", @previous_interrupt_handler\n    end\n  end\nend\n","sourceCodeStart":93,"sourceCodeEnd":126,"githubUrl":"https://github.com/ruby/rubygems/blob/86cbb817a38ce8477b181c17467a703ded3f2be8/lib/bundler/worker.rb#L93-L126","documentation":"Error \"Failed to create threads for the #{name} worker: #{creation_errors.map(&:to_s).uniq.join(\", \")}\" thrown in ruby/rubygems.","triggerScenarios":"Thrown at lib/bundler/worker.rb:111 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"86cbb817a38ce8477b181c17467a703ded3f2be8","analyzedAt":"2026-08-23T06:27:48.159Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}