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

Specify Celluloid::IO::UDPSocket#recvfrom to flags=0 #56

Merged
merged 1 commit into from
Jan 1, 2016

Conversation

tricknotes
Copy link

This is a workaround for behavior change against Celluloid::IO with Ruby 2.3.
see also: celluloid/celluloid-io#163

This is a workaround for behavior change against Celluloid::IO with Ruby 2.3.
see also: celluloid/celluloid-io#163
@tricknotes
Copy link
Author

This commit will fix some tests, but there is a failing test on Ruby 2.3.

E, [2015-12-31T03:36:26.560601 #5714] ERROR -- : Actor crashed!
RuntimeError: can't modify frozen String
    /Users/tricknotes/.rbenv/versions/2.3.0-dev/lib/ruby/2.3.0/resolv.rb:2463:in `block in create'
    /Users/tricknotes/.rbenv/versions/2.3.0-dev/lib/ruby/2.3.0/resolv.rb:2463:in `scan'
    /Users/tricknotes/.rbenv/versions/2.3.0-dev/lib/ruby/2.3.0/resolv.rb:2463:in `create'
    /Users/tricknotes/.rbenv/versions/2.3.0-dev/lib/ruby/gems/2.3.0/gems/celluloid-io-0.16.2/lib/celluloid/io/tcp_socket.rb:56:in `initialize'
    /Users/tricknotes/src/github.com/ioquatix/rubydns/lib/rubydns/resolver.rb:240:in `new'
    /Users/tricknotes/src/github.com/ioquatix/rubydns/lib/rubydns/resolver.rb:240:in `try_tcp_server'
    /Users/tricknotes/src/github.com/ioquatix/rubydns/lib/rubydns/resolver.rb:199:in `try_server'
    /Users/tricknotes/src/github.com/ioquatix/rubydns/lib/rubydns/resolver.rb:157:in `block (2 levels) in dispatch_request'
    /Users/tricknotes/.rbenv/versions/2.3.0-dev/lib/ruby/gems/2.3.0/gems/celluloid-0.16.0/lib/celluloid.rb:407:in `block in timeout'
    /Users/tricknotes/.rbenv/versions/2.3.0-dev/lib/ruby/gems/2.3.0/gems/celluloid-0.16.0/lib/celluloid/actor.rb:252:in `timeout'
    /Users/tricknotes/.rbenv/versions/2.3.0-dev/lib/ruby/gems/2.3.0/gems/celluloid-0.16.0/lib/celluloid.rb:406:in `timeout'
    /Users/tricknotes/src/github.com/ioquatix/rubydns/lib/rubydns/resolver.rb:156:in `block in dispatch_request'
    /Users/tricknotes/src/github.com/ioquatix/rubydns/lib/rubydns/resolver.rb:284:in `block in each'
    /Users/tricknotes/src/github.com/ioquatix/rubydns/lib/rubydns/resolver.rb:281:in `each'
    /Users/tricknotes/src/github.com/ioquatix/rubydns/lib/rubydns/resolver.rb:281:in `each'
    /Users/tricknotes/src/github.com/ioquatix/rubydns/lib/rubydns/resolver.rb:147:in `dispatch_request'
    /Users/tricknotes/src/github.com/ioquatix/rubydns/lib/rubydns/resolver.rb:93:in `query'
    /Users/tricknotes/.rbenv/versions/2.3.0-dev/lib/ruby/gems/2.3.0/gems/celluloid-0.16.0/lib/celluloid/calls.rb:26:in `public_send'
    /Users/tricknotes/.rbenv/versions/2.3.0-dev/lib/ruby/gems/2.3.0/gems/celluloid-0.16.0/lib/celluloid/calls.rb:26:in `dispatch'
    /Users/tricknotes/.rbenv/versions/2.3.0-dev/lib/ruby/gems/2.3.0/gems/celluloid-0.16.0/lib/celluloid/calls.rb:63:in `dispatch'
    /Users/tricknotes/.rbenv/versions/2.3.0-dev/lib/ruby/gems/2.3.0/gems/celluloid-0.16.0/lib/celluloid/cell.rb:60:in `block in invoke'
    /Users/tricknotes/.rbenv/versions/2.3.0-dev/lib/ruby/gems/2.3.0/gems/celluloid-0.16.0/lib/celluloid/cell.rb:71:in `block in task'
    /Users/tricknotes/.rbenv/versions/2.3.0-dev/lib/ruby/gems/2.3.0/gems/celluloid-0.16.0/lib/celluloid/actor.rb:357:in `block in task'
    /Users/tricknotes/.rbenv/versions/2.3.0-dev/lib/ruby/gems/2.3.0/gems/celluloid-0.16.0/lib/celluloid/tasks.rb:57:in `block in initialize'
    /Users/tricknotes/.rbenv/versions/2.3.0-dev/lib/ruby/gems/2.3.0/gems/celluloid-0.16.0/lib/celluloid/tasks/task_fiber.rb:15:in `block in create'

However this is a Ruby's bug and it is fixed on trunk.

@ioquatix
Copy link
Member

ioquatix commented Jan 1, 2016

Looks fine, but we should revert once Celluloid::IO releases a fixed version.

ioquatix added a commit that referenced this pull request Jan 1, 2016
Specify `Celluloid::IO::UDPSocket#recvfrom` to `flags=0`
@ioquatix ioquatix merged commit f5cd7c4 into socketry:stable Jan 1, 2016
@tricknotes tricknotes deleted the workaround-for-ruby-2.3 branch January 1, 2016 03:51
@ioquatix
Copy link
Member

ioquatix commented Jan 2, 2016

It seems like 2.3.0 is a bit of a borked release? Perhaps we should skip 2.3.0 and wait for 2.3.1?

@tricknotes
Copy link
Author

I think so too :<

@ioquatix
Copy link
Member

ioquatix commented Jan 4, 2016

maybe they will do a patch release which fixes this broken behaviour? or is it slated for 2.3.1?

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

Successfully merging this pull request may close these issues.

2 participants