truffleruby icon indicating copy to clipboard operation
truffleruby copied to clipboard

Concurrency issues in the first parallel iterations

Open brauliobo opened this issue 3 years ago • 1 comments

I'm experiencing a tendency for more errors at the start of a parallel loop using a threadpool (see peach).

For instance, in this project (closed source) everything is required at boot (it isn't using rails autoloader) but sometimes constants aren't recognized as loaded, so I'm seeing several of the errors below which eventually go away.

NameError: uninitialized constant Aws::SQS::Client
Did you mean?  Aws::Client
/home/braulio/Projects/olery/Review-collector/lib/review_collector/worker.rb:49:in `const_missing'
/home/braulio/Projects/olery/Review-collector/lib/review_collector/worker.rb:49:in `initialize'
/home/braulio/Projects/olery/Review-collector/task/scrape_connection.rake:72:in `block in scrape_connections'
/home/braulio/Projects/olery/Review-collector/lib/review_collector/exts/peach.rb:9:in `block (2 levels) in peach'
/home/braulio/.rvm/gems/truffleruby-21.3.0/gems/concurrent-ruby-1.1.9/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:363:in `run_task'
/home/braulio/.rvm/gems/truffleruby-21.3.0/gems/concurrent-ruby-1.1.9/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:352:in `block (3 levels) in create_worker'
<internal:core> core/kernel.rb:407:in `loop'
/home/braulio/.rvm/gems/truffleruby-21.3.0/gems/concurrent-ruby-1.1.9/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:335:in `block (2 levels) in create_worker'
<internal:core> core/throw_catch.rb:36:in `catch'
/home/braulio/.rvm/gems/truffleruby-21.3.0/gems/concurrent-ruby-1.1.9/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:334:in `block in create_worker'

brauliobo avatar Jan 18 '22 22:01 brauliobo

@brauliobo Do you have steps or some example code to reproduce this error? Thanks.

bjfish avatar Jan 19 '22 20:01 bjfish