fluent/fluentd · error · ArgumentError

BUG: block not specified for callback

Error message

BUG: block not specified for callback

What it means

Error "BUG: block not specified for callback" thrown in fluent/fluentd.

Source

Thrown at lib/fluent/plugin_helper/timer.rb:35

require 'fluent/plugin_helper/event_loop'
require 'set'

module Fluent
  module PluginHelper
    module Timer
      include Fluent::PluginHelper::EventLoop

      # stop     : turn checker into false (callbacks not called anymore)
      # shutdown : [-]
      # close    : [-]
      # terminate: [-]

      attr_reader :_timers # for tests

      # interval: integer/float, repeat: true/false
      def timer_execute(title, interval, repeat: true, &block)
        raise ArgumentError, "BUG: title must be a symbol" unless title.is_a? Symbol
        raise ArgumentError, "BUG: block not specified for callback" unless block_given?
        checker = ->(){ @_timer_running }
        detacher = ->(watcher){ event_loop_detach(watcher) }
        timer = TimerWatcher.new(title, interval, repeat, log, checker, detacher, &block)
        @_timers << title
        event_loop_attach(timer)
        timer
      end

      def timer_running?
        defined?(@_timer_running) && @_timer_running
      end

      def initialize
        super
        @_timers ||= Set.new
      end

      def start

View on GitHub (pinned to dd45c6e18d)

When it happens

Trigger: Thrown at lib/fluent/plugin_helper/timer.rb:35 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of fluent/fluentd@dd45c6e18d (2026-08-21). Data as JSON: /api/errors/083088e6fdb4303b. Report an issue: GitHub.