ArgumentError: comparison of Time with nil failed


I got this error in logstash.

ArgumentError: comparison of Time with nil failed
             >= at org/jruby/
             >= at org/jruby/
         filter at /opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-filter-throttle-2.0.2/lib/logstash/filters/throttle.rb:172
   multi_filter at /opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.0.0-java/lib/logstash/filters/base.rb:152
           each at org/jruby/
   multi_filter at /opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.0.0-java/lib/logstash/filters/base.rb:149
  cond_func_523 at (eval):10519
           each at org/jruby/
  cond_func_523 at (eval):10516
  cond_func_522 at (eval):10538
           each at org/jruby/
  cond_func_522 at (eval):10535
    filter_func at (eval):1783
   filterworker at /opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.0.0-java/lib/logstash/pipeline.rb:219
  start_filters at /opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.0.0-java/lib/logstash/pipeline.rb:154

I'm getting this error and another one (other topic) and my logstash stops every X hours.

Is there a solutionf or that?

Is there a procedure to debug problems like this in logstash? it's becoming not usefull work like this.


This looks like a bug in the throttle filter. Here's the offending line:

I don't understand how this can fail since we're explicitly checking for @next_expiration being non-nil before comparing it to now. Perhaps it's a thread-safety problem? Still puzzling since @threadsafe is set to false.

I suggest you file an issue on GitHub: