Plugins should do any global actions in a separate method called by the agent from a single thread.

Description

From - starting 10 redis inputs will cause strange errors to occur:

And sometimes

Plugins currently are supposed to load ruby libraries in the 'register' method, but in inputs and filters this could be invoked simultaneously in separate threads.

Split 'register' into two methods. global_init and instance_init, perhaps with better names. Alternately, if 'register' is really for global only things, then just move where 'register' is called and update the docs describing its intent.

Gliffy Diagrams

Activity

Show:

Hiroshi Nakamura March 8, 2012 at 2:53 AM

Weird, but common in debugging JVM? OS?

Hope you can remove that "sleep 1" line.

Jordan Sissel March 7, 2012 at 7:22 PM

I even tried reproducing on JRuby 1.6.3 (the version released with logstash 1.0.17 which had this problem) and I couldn't reproduce it. So strange!

The tickets linked in this issue show me easily able to reproduce this. I tested on 1.6.3, 1.6.5, and 1.6.7 - no problems, crazy! I'll try again today

Hiroshi Nakamura March 7, 2012 at 12:33 PM

autoload should have no relation to this issue as I wrote above. What is suspected is the multi-threading require problem.

Hiroshi Nakamura March 7, 2012 at 12:32 PM

Thanks. Cannot reproduce with JRuby 1.6.6+? We backported thread-safe autoload and a possible multi-threading require problem at 1.6.6 so it might affect this issue...

Jordan Sissel March 7, 2012 at 4:28 AM

can't seem to reproduce this anymore

Fixed

Details

Assignee

Reporter

Fix versions

Affects versions

Created September 4, 2011 at 3:21 AM
Updated April 19, 2013 at 8:23 PM
Resolved November 9, 2011 at 9:30 PM