Skip to content

Instantly share code, notes, and snippets.

View cheald's full-sized avatar

Chris Heald cheald

View GitHub Profile
"RubyThread-278: /home/kerrigan/apps/kerrigan2/shared/bundle/jruby/1.9/gems/celluloid-0.15.2/lib/celluloid/supervision_group.rb:136" daemon prio=10 tid=0x000000000115e800 nid=0x990 runnable [0x00007fa596d13000]
java.lang.Thread.State: RUNNABLE
at sun.nio.ch.EPollArrayWrapper.epollWait(Native Method)
at sun.nio.ch.EPollArrayWrapper.poll(EPollArrayWrapper.java:269)
at sun.nio.ch.EPollSelectorImpl.doSelect(EPollSelectorImpl.java:79)
at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:87)
- locked <0x00000007872b2bc0> (a sun.nio.ch.Util$2)
- locked <0x00000007872b2bb0> (a java.util.Collections$UnmodifiableSet)
- locked <0x00000007872b2978> (a sun.nio.ch.EPollSelectorImpl)
at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:98)
require 'celluloid'
$count = 0
$start = Time.now.to_f
$complete = 0
# Celluloid.task_class = Celluloid::TaskPooledFiber
class FooActor
include Celluloid
f = Fiber.new {
begin
Timeout.timeout(1) {
p Fiber.yield("y1")
}
rescue Exception => e
puts e
end
}
p f.resume "resume 1"
@cheald
cheald / MRI
Last active August 29, 2015 13:55
2.0.0-p247 :001 > require 'timeout'
=> true
2.0.0-p247 :002 > require 'fiber'
=> true
2.0.0-p247 :003 > f = Fiber.new {
2.0.0-p247 :004 > begin
2.0.0-p247 :005 > Timeout.timeout(1) {
2.0.0-p247 :006 > p Fiber.yield("y1")
2.0.0-p247 :007?> }
2.0.0-p247 :008?> rescue Exception => e
org/jruby/ext/fiber/ThreadFiber.java:163:in `yield'
org/jruby/ext/fiber/ThreadFiber.java:152:in `yield'
/usr/local/rvm/gems/jruby-1.7.10-fiber_fix/gems/celluloid-0.15.2/lib/celluloid/tasks/task_fiber.rb:18:in `signal'
/usr/local/rvm/gems/jruby-1.7.10-fiber_fix/gems/celluloid-0.15.2/lib/celluloid/tasks.rb:87:in `suspend'
/usr/local/rvm/gems/jruby-1.7.10-fiber_fix/gems/celluloid-0.15.2/lib/celluloid/tasks.rb:24:in `suspend'
/usr/local/rvm/gems/jruby-1.7.10-fiber_fix/gems/celluloid-0.15.2/lib/celluloid.rb:97:in `suspend'
/usr/local/rvm/gems/jruby-1.7.10-fiber_fix/gems/celluloid-0.15.2/lib/celluloid/calls.rb:92:in `value'
/usr/local/rvm/gems/jruby-1.7.10-fiber_fix/gems/celluloid-0.15.2/lib/celluloid/proxies/sync_proxy.rb:33:in `method_missing'
/var/www/repos/kerrigan-v2/lib/kerrigan/components/service.rb:97:in `message'
org/jruby/RubyKernel.java:1963:in `public_send'
FiberError: yield from unresumed fiber
org/jruby/ext/fiber/ThreadFiber.java:163:in `yield'
org/jruby/ext/fiber/ThreadFiber.java:152:in `yield'
/usr/local/rvm/gems/jruby-1.7.10-fiber_fix/gems/celluloid-0.15.2/lib/celluloid/tasks/task_fiber.rb:18:in `signal'
/usr/local/rvm/gems/jruby-1.7.10-fiber_fix/gems/celluloid-0.15.2/lib/celluloid/tasks.rb:87:in `suspend'
/usr/local/rvm/gems/jruby-1.7.10-fiber_fix/gems/celluloid-0.15.2/lib/celluloid/tasks.rb:24:in `suspend'
/usr/local/rvm/gems/jruby-1.7.10-fiber_fix/gems/celluloid-0.15.2/lib/celluloid.rb:97:in `suspend'
/usr/local/rvm/gems/jruby-1.7.10-fiber_fix/gems/celluloid-0.15.2/lib/celluloid/calls.rb:92:in `value'
/usr/local/rvm/gems/jruby-1.7.10-fiber_fix/gems/celluloid-0.15.2/lib/celluloid/proxies/sync_proxy.rb:33:in `method_missing'
/var/www/repos/kerrigan-v2/lib/mongo/celluloid_io_support.rb:8:in `timeout'
FiberError: yield from unresumed fiber
org/jruby/ext/fiber/ThreadFiber.java:152:in `yield'
org/jruby/ext/fiber/ThreadFiber.java:141:in `yield'
/usr/local/rvm/gems/jruby-1.7.10-fiber_fix/gems/celluloid-0.15.2/lib/celluloid/tasks/task_fiber.rb:18:in `signal'
/usr/local/rvm/gems/jruby-1.7.10-fiber_fix/gems/celluloid-0.15.2/lib/celluloid/tasks.rb:87:in `suspend'
/usr/local/rvm/gems/jruby-1.7.10-fiber_fix/gems/celluloid-0.15.2/lib/celluloid/tasks.rb:24:in `suspend'
/usr/local/rvm/gems/jruby-1.7.10-fiber_fix/gems/celluloid-0.15.2/lib/celluloid.rb:97:in `suspend'
/usr/local/rvm/gems/jruby-1.7.10-fiber_fix/gems/celluloid-0.15.2/lib/celluloid/calls.rb:92:in `value'
/usr/local/rvm/gems/jruby-1.7.10-fiber_fix/gems/celluloid-0.15.2/lib/celluloid/proxies/sync_proxy.rb:33:in `method_missing'
/var/www/repos/kerrigan-v2/lib/kerrigan/components/service.rb:97:in `message'
java.lang.NullPointerException
at org.jruby.ext.fiber.ThreadFiber.yield(ThreadFiber.java:152)
at org.jruby.ext.fiber.ThreadFiber.yield(ThreadFiber.java:141)
at org.jruby.ext.fiber.ThreadFiber$INVOKER$s$yield.call(ThreadFiber$INVOKER$s$yield.gen)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:134)
at org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:60)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:139)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:134)
Java::JavaLang::NullPointerException:
org.jruby.ext.fiber.ThreadFiber.yield(ThreadFiber.java:152)
org.jruby.ext.fiber.ThreadFiber.yield(ThreadFiber.java:141)
org.jruby.ext.fiber.ThreadFiber$INVOKER$s$yield.call(ThreadFiber$INVOKER$s$yield.gen)
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:134)
rubyjit.Celluloid::TaskFiber$$signal_094003D233EB307794B6E5C946B1CCAC6DA82AEE1108628844.__file__(/usr/local/rvm/gems/jruby-1.7.10/gems/celluloid-0.15.2/lib/celluloid/tasks/task_fiber.rb:18)
rubyjit.Celluloid::TaskFiber$$signal_094003D233EB307794B6E5C946B1CCAC6DA82AEE1108628844.__file__(/usr/local/rvm/gems/jruby-1.7.10/gems/celluloid-0.15.2/lib/celluloid/tasks/task_fiber.rb)
org.jruby.internal.runtime.methods.JittedMethod.call(JittedMethod.java:141)
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:134)
rubyjit.Celluloid::Task$$suspend_D18B437BB1CB18A167197E8992A68673DDAF5D591108628844.__file__(/usr/local/rvm/gems/jruby-1.7.10/gems/celluloid-0.15.2/lib/celluloid/tasks.r
@cheald
cheald / test.rb
Last active January 4, 2016 13:09
require 'celluloid'
$count = 0
$start = Time.now.to_f
class FooActor
include Celluloid
def listen
while true do