Getting an "undefined method' error in the buffer plugin


I’m seeing a sporadic error/warn message in the logs:

#0 emit transaction failed: error_class=NoMethodError error="undefined method `synchronize' for nil:NilClass" location="/opt/td-agent/lib/ruby/gems/2.7.0/gems/fluentd-1.12.3/lib/fluent/plugin/buffer.rb:358:in `block in write'"

I’m not entirely sure what to make of it, it’s logged as a warning but it looks like it’s an error. Is it benign? Should I ignore it? I’m trying to make sure that it’s not causing data loss, if anyone knows, please help out. My config is as follows:

  tag queries
  @type tail
  path /logs/*-queries*.log
  pos_file /var/run/td-agent/queries.pos
  read_from_head true
      @type regexp
      time_key datetime
      time_format %Y-%m-%d %H:%M:%S,%L
      keep_time_key true
      expression ^(?<datetime>[^A-Z]*) (?<level>[A-Z]*) org.apache.solr.core.SolrCore.Request: \[(?<orgid>[^_]*)_(?<shard>[^_]*)_replica_(?<replica>[^\]]*)\].*params={(?<params>.*)} hits=(?<hits>[0-9]*) status=(?<status>[0-9]*) QTime=(?<qtime>[0-9]*)$

<match queries>
  @type http
  endpoint_url    http://****
  http_method     post
  serializer      json   # default: form
  retryable_response_codes      [500, 424]
  slow_flush_log_threshold 60.0
  buffered        true
    @type file
    path /var/run/td-agent/queries-buffer
    flush_thread_count 32
    chunk_limit_size 16M
    total_limit_size 64GB
    flush_at_shutdown false
    flush_mode immediate
    retry_forever true
    overflow_action throw_exception

Environment: Ubuntu 20.04.2, td-agent version 4.1.1-1.

This does feel like a bug, though as you said it might not mean data loss or something significant. If possible see an update to the latest td-agent 4.2 resolves otherwise a github issue might be best way to try and resolve