Skip to content

Failures in logging have catastrophic consequences for Actors #159

@obrok

Description

@obrok

Running the following code in irb produces a fatal: No live threads left. Deadlock? on 2.1.2. On jruby the process just hangs indefinitely.

require "concurrent"
Concurrent.configuration.logger = lambda do |level, progname, message = nil, &block|
  fail
end

class Bob < Concurrent::Actor::RestartingContext
  def on_message(msg)
    p :hi
  end
end

bob = Bob.spawn(:bob)

I also encountered this when the process was finishing and the logger used inside Concurrent.configuration.logger got closed before concurrent-ruby finished its cleanup, but I couldn't reproduce it in a code snippet.

Metadata

Metadata

Assignees

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