While working on https://github.com/fidothe/saxon-rb I hit errors in production using a semi-experimental branch (https://github.com/fidothe/saxon-rb/tree/error-reporting) in a threaded XML-processing program.
The errors were the same NoMethodError: undefined method __jcreate_meta!'
as in jruby/jruby#6160, and the program structure is almost identical save for some loading indirection thanks to the use of autoload
.
I am running it in a CI-type environment where 20+ EC2 instances are spun up to process a large amount of data. Most, but not all, runs I'd have one instance's process crash with the error.
Creating an instance of the problem class (https://github.com/fidothe/saxon-rb/blob/error-reporting/lib/saxon/error_reporter.rb, EgClass
in this reproduction case) on the main thread, rather than in the worker threads, has made the problem vanish entirely.