Skip to content

undefined method `time' on nil:NilClass. (NoMethodError) #177

@asppsa

Description

@asppsa

Hi there,

I'm seeing error messages like the following while stress-testing a server I'm making that uses concurrent-ruby.

[2014-10-25T15:39:16.169601 #23662] DEBUG -- : undefined method `time' on nil:NilClass. (NoMethodError)
kernel/delta/kernel.rb:78:in `time (method_missing)'
/home/asp/.rvm/gems/rbx-2.2.10/bundler/gems/concurrent-ruby-041196d6de89/lib/concurrent/executor/timer_set.rb:130:in `process_tasks'
kernel/common/kernel.rb:460:in `loop'
/home/asp/.rvm/gems/rbx-2.2.10/bundler/gems/concurrent-ruby-041196d6de89/lib/concurrent/executor/timer_set.rb:126:in `process_tasks'
kernel/common/method.rb:71:in `call'
kernel/bootstrap/proc.rb:18:in `call'
/home/asp/.rvm/gems/rbx-2.2.10/bundler/gems/concurrent-ruby-041196d6de89/lib/concurrent/executor/ruby_single_thread_executor.rb:65:in `work'
kernel/common/kernel.rb:460:in `loop'
/home/asp/.rvm/gems/rbx-2.2.10/bundler/gems/concurrent-ruby-041196d6de89/lib/concurrent/executor/ruby_single_thread_executor.rb:61:in `work'
/home/asp/.rvm/gems/rbx-2.2.10/bundler/gems/concurrent-ruby-041196d6de89/lib/concurrent/executor/ruby_single_thread_executor.rb:55:in `new_worker_thread'
kernel/bootstrap/proc.rb:20:in `call'
kernel/bootstrap/thread.rb:391:in `__run__'

The issue appears in 0.7.0 as well as with a checkout of the latest code from git. Under Rubinius I get error messages; under jruby things just seem to freeze, and I haven't tried MRI. These errors (or lack of errors for jruby) seem to coincide with all actors in the system ceasing to respond to messages.

See this gist for example which reproduces the problem, along with sample output from running in Rubinius on my Linux system. I'm not really sure what part of this is making things break, but it seems to be a combination of high load, timer tasks and terminated actors with children. I don't think I'm doing anything "illegal" in the example, but I may well be wrong!

Thanks for all your work on this gem. This issue aside, I'm finding these concurrency tools to be a huge game-changer for programming in Ruby.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA bug in the library or documentation.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions