Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Celluloid:IO sample fails on rubinius 2.5.5 #232

Closed
ytaras opened this issue May 27, 2015 · 1 comment
Closed

Celluloid:IO sample fails on rubinius 2.5.5 #232

ytaras opened this issue May 27, 2015 · 1 comment

Comments

@ytaras
Copy link

ytaras commented May 27, 2015

Hello, guys.

I'm trying to use http.rb on RBX with Celluloid:IO and I tried default sample, but failed. Here's what I do:

$ curl https://raw.githubusercontent.com/httprb/http.rb/master/examples/parallel_requests_with_celluloid.rb > celluloid_test.rb
$ ruby --version
rubinius 2.5.5 (2.1.0 433d9b8c 2015-05-27 3.5.1 JI) [x86_64-darwin14.3.0]
$ uname -a
Darwin Mac-10ddb199468a.local 14.3.0 Darwin Kernel Version 14.3.0: Mon Mar 23 11:59:05 PDT 2015; root:xnu-2782.20.48~5/RELEASE_X86_64 x86_64
$ grep http Gemfile.lock
      http
  remote: https://rubygems.org/
    http (0.8.12)
      http-cookie (~> 1.0)
      http-form_data (~> 1.0.1)
      http_parser.rb (~> 0.6.0)
    http-cookie (1.0.2)
    http-form_data (1.0.1)
    http_parser.rb (0.6.0)

Now if I run the script - it fails with following stack trace:

$ ruby celluloid_test.rb
E, [2015-05-27T13:38:28.300779 #26671] ERROR -- : Actor crashed!
ArgumentError: Data object has already been freed
    /Users/ytaras/.rvm/gems/rbx-2.5.5/gems/http-0.8.12/lib/http/response/parser.rb:12:in `<< (add)'
    /Users/ytaras/.rvm/gems/rbx-2.5.5/gems/http-0.8.12/lib/http/connection.rb:202:in `read_more'
    /Users/ytaras/.rvm/gems/rbx-2.5.5/gems/http-0.8.12/lib/http/connection.rb:97:in `read_headers!'
    /Users/ytaras/.rvm/gems/rbx-2.5.5/gems/http-0.8.12/lib/http/client.rb:69:in `make_request'
    /Users/ytaras/.rvm/gems/rbx-2.5.5/gems/http-0.8.12/lib/http/client.rb:51:in `perform'
    /Users/ytaras/.rvm/gems/rbx-2.5.5/gems/http-0.8.12/lib/http/cache/null_cache.rb:9:in `perform'
    /Users/ytaras/.rvm/gems/rbx-2.5.5/gems/http-0.8.12/lib/http/client.rb:50:in `perform'
    /Users/ytaras/.rvm/gems/rbx-2.5.5/gems/http-0.8.12/lib/http/client.rb:39:in `request'
    /Users/ytaras/.rvm/gems/rbx-2.5.5/gems/http-0.8.12/lib/http/chainable.rb:74:in `request'
    /Users/ytaras/.rvm/gems/rbx-2.5.5/gems/http-0.8.12/lib/http/chainable.rb:18:in `get'
    celluloid_test.rb:18:in `fetch'
    /Users/ytaras/.rvm/gems/rbx-2.5.5/gems/celluloid-0.16.0/lib/celluloid/calls.rb:26:in `dispatch'
    /Users/ytaras/.rvm/gems/rbx-2.5.5/gems/celluloid-0.16.0/lib/celluloid/calls.rb:63:in `dispatch'
    /Users/ytaras/.rvm/gems/rbx-2.5.5/gems/celluloid-0.16.0/lib/celluloid/cell.rb:60:in `invoke'
    /Users/ytaras/.rvm/gems/rbx-2.5.5/gems/celluloid-0.16.0/lib/celluloid/cell.rb:71:in `task'
    /Users/ytaras/.rvm/gems/rbx-2.5.5/gems/celluloid-0.16.0/lib/celluloid/actor.rb:357:in `task'
    /Users/ytaras/.rvm/gems/rbx-2.5.5/gems/celluloid-0.16.0/lib/celluloid/tasks.rb:57:in `initialize'
    /Users/ytaras/.rvm/gems/rbx-2.5.5/gems/celluloid-0.16.0/lib/celluloid/tasks/task_fiber.rb:15:in `create'
    kernel/bootstrap/proc.rb:20:in `call'
W, [2015-05-27T13:38:28.303121 #26671]  WARN -- : Terminating task: type=:call, meta={:method_name=>:fetch}, status=:iowait
    Celluloid::TaskFiber backtrace unavailable. Please try `Celluloid.task_class = Celluloid::TaskThread` if you need backtraces here.
An exception occurred running celluloid_test.rb:

task was terminated (Celluloid::Task::TerminatedError)

Backtrace:

/Users/ytaras/.rvm/gems/rbx-2.5.5/gems/celluloid-0.16.0/lib/celluloid/tasks/task_fiber.rb:34:in `terminate'
/Users/ytaras/.rvm/gems/rbx-2.5.5/gems/celluloid-0.16.0/lib/celluloid/actor.rb:345:in `cleanup'
/Users/ytaras/.rvm/gems/rbx-2.5.5/gems/celluloid-0.16.0/lib/celluloid/actor.rb:329:in `shutdown'
/Users/ytaras/.rvm/gems/rbx-2.5.5/gems/celluloid-0.16.0/lib/celluloid/actor.rb:321:in `handle_crash'
/Users/ytaras/.rvm/gems/rbx-2.5.5/gems/celluloid-0.16.0/lib/celluloid/actor.rb:166:in `run'
/Users/ytaras/.rvm/gems/rbx-2.5.5/gems/celluloid-0.16.0/lib/celluloid/actor.rb:130:in `start'
/Users/ytaras/.rvm/gems/rbx-2.5.5/gems/celluloid-0.16.0/lib/celluloid/thread_handle.rb:13:in `initialize'
/Users/ytaras/.rvm/gems/rbx-2.5.5/gems/celluloid-0.16.0/lib/celluloid/actor_system.rb:32:in `get_thread'
/Users/ytaras/.rvm/gems/rbx-2.5.5/gems/celluloid-0.16.0/lib/celluloid/internal_pool.rb:130:in `create'
(celluloid):0:in `remote procedure call'
/Users/ytaras/.rvm/gems/rbx-2.5.5/gems/celluloid-0.16.0/lib/celluloid/future.rb:104:in `value'
/Users/ytaras/.rvm/gems/rbx-2.5.5/gems/celluloid-0.16.0/lib/celluloid/future.rb:68:in `value'
/Users/ytaras/Projects/other/celluloid_test/celluloid_test.rb:32:in `__script__'
celluloid_test.rb:30:in `__script__'
                   Celluloid::Task(Celluloid::TaskFiber)#suspend at /Users/ytaras/.rvm/gems/rbx-2.5.5/gems/celluloid-0.16.0/lib/celluloid/tasks.rb:88
                                         Celluloid::Task.suspend at /Users/ytaras/.rvm/gems/rbx-2.5.5/gems/celluloid-0.16.0/lib/celluloid/tasks.rb:24
                                     Celluloid::IO::Reactor#wait at /Users/ytaras/.rvm/gems/rbx-2.5.5/gems/celluloid-io-0.16.2/lib/celluloid/io/reactor.rb:46
                            Celluloid::IO::Reactor#wait_readable at /Users/ytaras/.rvm/gems/rbx-2.5.5/gems/celluloid-io-0.16.2/lib/celluloid/io/reactor.rb:21
                                     Celluloid::IO.wait_readable at /Users/ytaras/.rvm/gems/rbx-2.5.5/gems/celluloid-io-0.16.2/lib/celluloid/io.rb:53
   Celluloid::IO::Stream(Celluloid::IO::TCPSocket)#wait_readable at /Users/ytaras/.rvm/gems/rbx-2.5.5/gems/celluloid-io-0.16.2/lib/celluloid/io/stream.rb:30
  { } in Celluloid::IO::Stream(Celluloid::IO::TCPSocket)#sysread at /Users/ytaras/.rvm/gems/rbx-2.5.5/gems/celluloid-io-0.16.2/lib/celluloid/io/stream.rb:43
                        Celluloid::IO::Stream::Latch#synchronize at /Users/ytaras/.rvm/gems/rbx-2.5.5/gems/celluloid-io-0.16.2/lib/celluloid/io/stream.rb:389
         Celluloid::IO::Stream(Celluloid::IO::TCPSocket)#sysread at /Users/ytaras/.rvm/gems/rbx-2.5.5/gems/celluloid-io-0.16.2/lib/celluloid/io/stream.rb:39
     Celluloid::IO::Stream(Celluloid::IO::TCPSocket)#readpartial at /Users/ytaras/.rvm/gems/rbx-2.5.5/gems/celluloid-io-0.16.2/lib/celluloid/io/stream.rb:128
                                 HTTP::Timeout::Null#readpartial at /Users/ytaras/.rvm/gems/rbx-2.5.5/gems/http-0.8.12/lib/http/timeout/null.rb:41
                                      HTTP::Connection#read_more at /Users/ytaras/.rvm/gems/rbx-2.5.5/gems/http-0.8.12/lib/http/connection.rb:202
                                  HTTP::Connection#read_headers! at /Users/ytaras/.rvm/gems/rbx-2.5.5/gems/http-0.8.12/lib/http/connection.rb:97
                                       HTTP::Client#make_request at /Users/ytaras/.rvm/gems/rbx-2.5.5/gems/http-0.8.12/lib/http/client.rb:69
                                     { } in HTTP::Client#perform at /Users/ytaras/.rvm/gems/rbx-2.5.5/gems/http-0.8.12/lib/http/client.rb:51
                                  HTTP::Cache::NullCache#perform at /Users/ytaras/.rvm/gems/rbx-2.5.5/gems/http-0.8.12/lib/http/cache/null_cache.rb:9
                                            HTTP::Client#perform at /Users/ytaras/.rvm/gems/rbx-2.5.5/gems/http-0.8.12/lib/http/client.rb:50
                                            HTTP::Client#request at /Users/ytaras/.rvm/gems/rbx-2.5.5/gems/http-0.8.12/lib/http/client.rb:39
                                 HTTP::Chainable(Module)#request at /Users/ytaras/.rvm/gems/rbx-2.5.5/gems/http-0.8.12/lib/http/chainable.rb:74
                                     HTTP::Chainable(Module)#get at /Users/ytaras/.rvm/gems/rbx-2.5.5/gems/http-0.8.12/lib/http/chainable.rb:18
                                               HttpFetcher#fetch at celluloid_test.rb:18
                   Celluloid::Call(Celluloid::SyncCall)#dispatch at /Users/ytaras/.rvm/gems/rbx-2.5.5/gems/celluloid-0.16.0/lib/celluloid/calls.rb:26
                                    Celluloid::SyncCall#dispatch at /Users/ytaras/.rvm/gems/rbx-2.5.5/gems/celluloid-0.16.0/lib/celluloid/calls.rb:63
                                   { } in Celluloid::Cell#invoke at /Users/ytaras/.rvm/gems/rbx-2.5.5/gems/celluloid-0.16.0/lib/celluloid/cell.rb:60
                                     { } in Celluloid::Cell#task at /Users/ytaras/.rvm/gems/rbx-2.5.5/gems/celluloid-0.16.0/lib/celluloid/cell.rb:71
                                    { } in Celluloid::Actor#task at /Users/ytaras/.rvm/gems/rbx-2.5.5/gems/celluloid-0.16.0/lib/celluloid/actor.rb:357
         { } in Celluloid::Task(Celluloid::TaskFiber)#initialize at /Users/ytaras/.rvm/gems/rbx-2.5.5/gems/celluloid-0.16.0/lib/celluloid/tasks.rb:57
                              { } in Celluloid::TaskFiber#create at /Users/ytaras/.rvm/gems/rbx-2.5.5/gems/celluloid-0.16.0/lib/celluloid/tasks/task_fiber.rb:15
                                                       Proc#call at kernel/bootstrap/proc.rb:20
@tarcieri
Copy link
Member

Celluloid::IO is not going to be supported in 1.0. See #204 and #225

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants