-
-
Save zerowidth/131439c744bfe4dedc6b to your computer and use it in GitHub Desktop.
celluloid kablooey
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1.9.3@ringleader ~/Desktop/ringleader (master)*? ✘ ruby -d fail.rb | |
Exception `LoadError' at /Users/nathan/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems.rb:1264 - cannot load such file -- rubygems/defaults/operating_system | |
Exception `LoadError' at /Users/nathan/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems.rb:1273 - cannot load such file -- rubygems/defaults/ruby | |
fail.rb:13: warning: assigned but unused variable - reader | |
Exception `LoadError' at /Users/nathan/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36 - cannot load such file -- celluloid | |
D, [2012-07-10T20:44:37.479585 #84660] DEBUG -- : starting process: ls | |
D, [2012-07-10T20:44:37.483400 #84660] DEBUG -- : started with pid 84662 | |
Exception `FiberError' at /Users/nathan/.rvm/gems/ruby-1.9.3-p194@ringleader/gems/celluloid-0.11.0/lib/celluloid/task.rb:22 - fiber called across stack rewinding barrier | |
Exception `NilClass' at /Users/nathan/.rvm/gems/ruby-1.9.3-p194@ringleader/gems/celluloid-0.11.0/lib/celluloid.rb:349 - undefined method `stopped' for #<WaitForExit:0x007fed52114580> | |
/Users/nathan/.rvm/gems/ruby-1.9.3-p194@ringleader/gems/celluloid-0.11.0/lib/celluloid/calls.rb: [BUG] Segmentation fault | |
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin11.3.0] | |
-- Control frame information ----------------------------------------------- | |
c:0006 p:0065 s:0015 b:0015 l:000011 d:000014 BLOCK | |
c:0005 p:0037 s:0012 b:0012 l:000011 d:000011 METHOD /Users/nathan/.rvm/gems/ruby-1.9.3-p194@ringleader/gems/celluloid-0.11.0/lib/celluloid/calls.rb:91 | |
c:0004 p:0014 s:0007 b:0007 l:000ea0 d:000006 BLOCK /Users/nathan/.rvm/gems/ruby-1.9.3-p194@ringleader/gems/celluloid-0.11.0/lib/celluloid/actor.rb:225 | |
c:0003 p:0106 s:0005 b:0005 l:0014f0 d:000004 BLOCK /Users/nathan/.rvm/gems/ruby-1.9.3-p194@ringleader/gems/celluloid-0.11.0/lib/celluloid/task.rb:45 | |
c:0002 p:---- s:0003 b:0003 l:000002 d:000002 FINISH | |
c:0001 p:---- s:0001 b:-001 l:000000 d:000000 ------ | |
-- Ruby level backtrace information ---------------------------------------- | |
/Users/nathan/.rvm/gems/ruby-1.9.3-p194@ringleader/gems/celluloid-0.11.0/lib/celluloid/task.rb:45:in `block in initialize' | |
/Users/nathan/.rvm/gems/ruby-1.9.3-p194@ringleader/gems/celluloid-0.11.0/lib/celluloid/actor.rb:225:in `block in handle_message' | |
/Users/nathan/.rvm/gems/ruby-1.9.3-p194@ringleader/gems/celluloid-0.11.0/lib/celluloid/calls.rb:91:in `dispatch' | |
/Users/nathan/.rvm/gems/ruby-1.9.3-p194@ringleader/gems/celluloid-0.11.0/lib/celluloid/calls.rb:0:in `rescue in dispatch' | |
-- C level backtrace information ------------------------------------------- | |
See Crash Report log file under ~/Library/Logs/CrashReporter or | |
/Library/Logs/CrashReporter, for the more detail of. | |
-- Other runtime information ----------------------------------------------- | |
* Loaded script: fail.rb | |
* Loaded features: | |
0 enumerator.so | |
1 /Users/nathan/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/x86_64-darwin11.3.0/enc/encdb.bundle | |
2 /Users/nathan/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/x86_64-darwin11.3.0/enc/trans/transdb.bundle | |
3 /Users/nathan/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/defaults.rb | |
4 /Users/nathan/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/x86_64-darwin11.3.0/rbconfig.rb | |
5 /Users/nathan/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/deprecate.rb | |
6 /Users/nathan/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/exceptions.rb | |
7 /Users/nathan/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb | |
8 /Users/nathan/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems.rb | |
9 /Users/nathan/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/ubygems.rb | |
10 /Users/nathan/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/version.rb | |
11 /Users/nathan/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/requirement.rb | |
12 /Users/nathan/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/platform.rb | |
13 /Users/nathan/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb | |
14 /Users/nathan/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/path_support.rb | |
15 /Users/nathan/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb | |
16 /Users/nathan/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/thread.rb | |
17 /Users/nathan/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/monitor.rb | |
18 /Users/nathan/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/logger.rb | |
19 /Users/nathan/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/timeout.rb | |
20 /Users/nathan/.rvm/gems/ruby-1.9.3-p194@ringleader/gems/celluloid-0.11.0/lib/celluloid/version.rb | |
21 /Users/nathan/.rvm/gems/ruby-1.9.3-p194@ringleader/gems/celluloid-0.11.0/lib/celluloid/actor_proxy.rb | |
22 /Users/nathan/.rvm/gems/ruby-1.9.3-p194@ringleader/gems/celluloid-0.11.0/lib/celluloid/calls.rb | |
23 /Users/nathan/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/x86_64-darwin11.3.0/fiber.bundle | |
24 /Users/nathan/.rvm/gems/ruby-1.9.3-p194@ringleader/gems/celluloid-0.11.0/lib/celluloid/fiber.rb | |
25 /Users/nathan/.rvm/gems/ruby-1.9.3-p194@ringleader/gems/celluloid-0.11.0/lib/celluloid/core_ext.rb | |
26 /Users/nathan/.rvm/gems/ruby-1.9.3-p194@ringleader/gems/celluloid-0.11.0/lib/celluloid/cpu_counter.rb | |
27 /Users/nathan/.rvm/gems/ruby-1.9.3-p194@ringleader/gems/celluloid-0.11.0/lib/celluloid/events.rb | |
28 /Users/nathan/.rvm/gems/ruby-1.9.3-p194@ringleader/gems/celluloid-0.11.0/lib/celluloid/fsm.rb | |
29 /Users/nathan/.rvm/gems/ruby-1.9.3-p194@ringleader/gems/celluloid-0.11.0/lib/celluloid/internal_pool.rb | |
30 /Users/nathan/.rvm/gems/ruby-1.9.3-p194@ringleader/gems/celluloid-0.11.0/lib/celluloid/links.rb | |
31 /Users/nathan/.rvm/gems/ruby-1.9.3-p194@ringleader/gems/celluloid-0.11.0/lib/celluloid/logger.rb | |
32 /Users/nathan/.rvm/gems/ruby-1.9.3-p194@ringleader/gems/celluloid-0.11.0/lib/celluloid/mailbox.rb | |
33 /Users/nathan/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/set.rb | |
34 /Users/nathan/.rvm/gems/ruby-1.9.3-p194@ringleader/gems/celluloid-0.11.0/lib/celluloid/receivers.rb | |
35 /Users/nathan/.rvm/gems/ruby-1.9.3-p194@ringleader/gems/celluloid-0.11.0/lib/celluloid/registry.rb | |
36 /Users/nathan/.rvm/gems/ruby-1.9.3-p194@ringleader/gems/celluloid-0.11.0/lib/celluloid/responses.rb | |
37 /Users/nathan/.rvm/gems/ruby-1.9.3-p194@ringleader/gems/celluloid-0.11.0/lib/celluloid/signals.rb | |
38 /Users/nathan/.rvm/gems/ruby-1.9.3-p194@ringleader/gems/celluloid-0.11.0/lib/celluloid/task.rb | |
39 /Users/nathan/.rvm/gems/ruby-1.9.3-p194@ringleader/gems/celluloid-0.11.0/lib/celluloid/thread_handle.rb | |
40 /Users/nathan/.rvm/gems/ruby-1.9.3-p194@ringleader/gems/celluloid-0.11.0/lib/celluloid/timers.rb | |
41 /Users/nathan/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/x86_64-darwin11.3.0/digest.bundle | |
42 /Users/nathan/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/digest.rb | |
43 /Users/nathan/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/x86_64-darwin11.3.0/openssl.bundle | |
44 /Users/nathan/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/openssl/bn.rb | |
45 /Users/nathan/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/openssl/cipher.rb | |
46 /Users/nathan/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/x86_64-darwin11.3.0/stringio.bundle | |
47 /Users/nathan/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/openssl/config.rb | |
48 /Users/nathan/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/openssl/digest.rb | |
49 /Users/nathan/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/openssl/buffering.rb | |
50 /Users/nathan/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/x86_64-darwin11.3.0/fcntl.bundle | |
51 /Users/nathan/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/openssl/ssl-internal.rb | |
52 /Users/nathan/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/openssl/x509-internal.rb | |
53 /Users/nathan/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/openssl.rb | |
54 /Users/nathan/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/securerandom.rb | |
55 /Users/nathan/.rvm/gems/ruby-1.9.3-p194@ringleader/gems/celluloid-0.11.0/lib/celluloid/uuid.rb | |
56 /Users/nathan/.rvm/gems/ruby-1.9.3-p194@ringleader/gems/celluloid-0.11.0/lib/celluloid/actor.rb | |
57 /Users/nathan/.rvm/gems/ruby-1.9.3-p194@ringleader/gems/celluloid-0.11.0/lib/celluloid/future.rb | |
58 /Users/nathan/.rvm/gems/ruby-1.9.3-p194@ringleader/gems/celluloid-0.11.0/lib/celluloid/pool_manager.rb | |
59 /Users/nathan/.rvm/gems/ruby-1.9.3-p194@ringleader/gems/celluloid-0.11.0/lib/celluloid/supervision_group.rb | |
60 /Users/nathan/.rvm/gems/ruby-1.9.3-p194@ringleader/gems/celluloid-0.11.0/lib/celluloid/supervisor.rb | |
61 /Users/nathan/.rvm/gems/ruby-1.9.3-p194@ringleader/gems/celluloid-0.11.0/lib/celluloid.rb | |
[NOTE] | |
You may have encountered a bug in the Ruby interpreter or extension libraries. | |
Bug reports are welcome. | |
For details: http://www.ruby-lang.org/bugreport.html | |
Abort trap: 6 | |
1.9.3@ringleader ~/Desktop/ringleader (master)*? ✘ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "celluloid" | |
class App | |
include Celluloid | |
include Celluloid::Logger | |
def initialize(cmd) | |
@cmd = cmd | |
end | |
def start | |
@pid = Process.spawn @cmd | |
@exit = WaitForExit.new @pid, self | |
end | |
end | |
class WaitForExit | |
include Celluloid | |
def initialize(pid, app) | |
@pid, @app = pid, app | |
wait! | |
end | |
def wait | |
Process.wait @pid | |
@app.stopped! | |
end | |
end | |
app = App.new "ls" | |
app.start | |
sleep |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Root cause is using
self
instead ofActor.current
on line 13. Never broken ruby quite like this before, though!Helps to read the docs.