jruby/jruby · error · ArgumentError

unknown key: %s

Error message

unknown key: %s

What it means

Error "unknown key: %s" thrown in jruby/jruby.

Source

Thrown at core/src/main/ruby/jruby/kernel/gc.rb:104

      used
    when :peak_committed
      peak_committed
    when :peak_init
      peak_init
    when :peak_max
      peak_max
    when :peak_used
      peak_used
    when :last_committed
      last_committed
    when :last_init
      last_init
    when :last_max
      last_max
    when :last_used
      last_used
    when Symbol
      raise ArgumentError.new(format("unknown key: %s", result_key).force_encoding("UTF-8"))
    else
      all_stats.merge!({count:, time:, committed:, init:, max:, used:, peak_committed:, peak_init:, peak_max:, peak_used:, last_committed:, last_init:, last_max:, last_used:})
    end
  end

  begin
    module Profiler
      def self.__setup__
        @profiler ||= begin
          NotifiedProfiler.new!
          # class exists and Java dependecies are also present, proceed with GC notification version
        rescue NameError
          NormalProfiler.new
        end
      end

      def self.enabled?
        __setup__

View on GitHub (pinned to fb650c13e0)

Solutions

  1. An unknown GC stat key was requested. Use one of the keys returned by GC.stat.keys.

When it happens

Trigger: Thrown at core/src/main/ruby/jruby/kernel/gc.rb:104 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of jruby/jruby@fb650c13e0 (2026-08-23). Data as JSON: /api/errors/7912d522eb7f3dfb. Report an issue: GitHub.