celluloid / celluloid-io

UNMAINTAINED: See celluloid/celluloid#779 - Evented sockets for Celluloid actors
https://celluloid.io
MIT License
879 stars 93 forks source link

Stream patches. Cover Errno::ETIMEDOUT and all other failures when reading / writing. #61

Closed digitalextremist closed 11 years ago

digitalextremist commented 11 years ago

Been getting this a lot:

Reel::RackWorker crashed!
Errno::ETIMEDOUT: Connection timed out - write_nonblock
    kernel/common/io.rb:1196:in `write_nonblock'
    /usr/local/rvm/gems/rbx-head/bundler/gems/celluloid-io-6ac8ad9c615b/lib/celluloid/io/stream.rb:64:in `syswrite'
    /usr/local/rvm/gems/rbx-head/bundler/gems/celluloid-io-6ac8ad9c615b/lib/celluloid/io/stream.rb:398:in `synchronize'
    /usr/local/rvm/gems/rbx-head/bundler/gems/celluloid-io-6ac8ad9c615b/lib/celluloid/io/stream.rb:61:in `syswrite'
    /usr/local/rvm/gems/rbx-head/bundler/gems/celluloid-io-6ac8ad9c615b/lib/celluloid/io/stream.rb:356:in `do_write'
    /usr/local/rvm/gems/rbx-head/bundler/gems/celluloid-io-6ac8ad9c615b/lib/celluloid/io/stream.rb:256:in `<<'
    /usr/local/rvm/gems/rbx-head/bundler/gems/reel-531adaf9465b/lib/reel/response.rb:66:in `render'
    /usr/local/rvm/gems/rbx-head/bundler/gems/reel-531adaf9465b/lib/reel/connection.rb:132:in `respond'
    /usr/local/rvm/gems/rbx-head/bundler/gems/reel-531adaf9465b/lib/reel/rack_worker.rb:85:in `handle_request'
    /usr/local/rvm/gems/rbx-head/bundler/gems/reel-531adaf9465b/lib/reel/rack_worker.rb:65:in `handle'
    /usr/local/rvm/gems/rbx-head/bundler/gems/celluloid-594e63068e98/lib/celluloid/calls.rb:25:in `dispatch'
    /usr/local/rvm/gems/rbx-head/bundler/gems/celluloid-594e63068e98/lib/celluloid/calls.rb:67:in `dispatch'
    /usr/local/rvm/gems/rbx-head/bundler/gems/celluloid-594e63068e98/lib/celluloid/actor.rb:322:in `handle_message'
    /usr/local/rvm/gems/rbx-head/bundler/gems/celluloid-594e63068e98/lib/celluloid/tasks.rb:42:in `initialize'
    /usr/local/rvm/gems/rbx-head/bundler/gems/celluloid-594e63068e98/lib/celluloid/tasks/task_fiber.rb:9:in `create'
    kernel/bootstrap/proc.rb:22:in `call'
    (celluloid):0:in `remote procedure call'

Unless I'm wrong, it couldn't hurt to return 0 characters written, as in the case of EOFError which was previously the only caught exception allowed to return 0.

digitalextremist commented 11 years ago

Damn. Not sure what happened here because I pulled in master before doing this. Not sure that it've not been this way if I did actually branch for the revision. Will write a post-it note or tattoo it on my hands or something: BRANCH BEFORE REVISING.

coveralls commented 11 years ago

Coverage Status

Coverage remained the same when pulling d138dff024af29cae2cafb4e4ea71e394b09f6a4 on penultimatix:master into 646c1d701428c1e5c775435e24618f5f544eb9b8 on celluloid:master.

digitalextremist commented 11 years ago

That second commit ought to catch the read_partial that's unrelated to what I set out to do.

coveralls commented 11 years ago

Coverage Status

Coverage decreased (-0.85%) when pulling 02c77620a8c67e194611ee49634b98cb6ac61010 on penultimatix:master into 646c1d701428c1e5c775435e24618f5f544eb9b8 on celluloid:master.

digitalextremist commented 11 years ago

Following the tests failing in Travis, still unrelated to the original thing I noticed but in the same vicinity.

coveralls commented 11 years ago

Coverage Status

Coverage remained the same when pulling aba3f92d059e1a0731125560477a8c2b5f38db9a on penultimatix:master into 646c1d701428c1e5c775435e24618f5f544eb9b8 on celluloid:master.

coveralls commented 11 years ago

Coverage Status

Coverage remained the same when pulling 25b95cb0d872b304471c3295f97c8a082606db24 on penultimatix:master into 646c1d701428c1e5c775435e24618f5f544eb9b8 on celluloid:master.

digitalextremist commented 11 years ago

*read

coveralls commented 11 years ago

Coverage Status

Coverage remained the same when pulling c119b30b70b87c8e1d32ae6063ccb8fad1589eaf on penultimatix:master into 646c1d701428c1e5c775435e24618f5f544eb9b8 on celluloid:master.

coveralls commented 11 years ago

Coverage Status

Coverage remained the same when pulling 61beb73bc74e9ff79530028f78a83be13af10081 on penultimatix:master into 646c1d701428c1e5c775435e24618f5f544eb9b8 on celluloid:master.

digitalextremist commented 11 years ago

Everyone knows I ought to close this shiaat.

tarcieri commented 11 years ago

Go ahead and open an issue for Errno::ETIMEDOUT

digitalextremist commented 11 years ago

Resolved the two EOFError test failures. Now one is left:

rspec /home/vagrant/.bundler/rbx/1.9/celluloid-cdfab73bdb7d/spec/support/actor_examples.rb:682 # Celluloid::IO behaves like a Celluloid Actor using Threads timers suspends execution of a method (but not the actor) for a given time
coveralls commented 11 years ago

Coverage Status

Coverage decreased (-0.85%) when pulling cf33c287bf609315b9fdb031c5f05359f7dc207f on penultimatix:master into 646c1d701428c1e5c775435e24618f5f544eb9b8 on celluloid:master.

coveralls commented 11 years ago

Coverage Status

Coverage remained the same when pulling 36d2b65dfdb6ffefe3bb9b795f5e47bfc3524e13 on penultimatix:master into 646c1d701428c1e5c775435e24618f5f544eb9b8 on celluloid:master.

coveralls commented 11 years ago

Coverage Status

Coverage remained the same when pulling f7edd0fc1ce23894002e4c1a0f229eb5c951d409 on penultimatix:master into 646c1d701428c1e5c775435e24618f5f544eb9b8 on celluloid:master.

digitalextremist commented 11 years ago

This is passing in all the cases I need it looks like... it appears. I did the cleanup you asked and will maintain that practice. I cannot handle the actor behavior failure, but that is pending @halorgium.

coveralls commented 11 years ago

Coverage Status

Coverage remained the same when pulling f7edd0fc1ce23894002e4c1a0f229eb5c951d409 on penultimatix:master into 646c1d701428c1e5c775435e24618f5f544eb9b8 on celluloid:master.

coveralls commented 11 years ago

Coverage Status

Coverage remained the same when pulling fca636115726490e656ad838e30dd038e63ed085 on penultimatix:master into df768cd3cdb2747512cab56f71a8d9b68e9f9161 on celluloid:master.

digitalextremist commented 11 years ago

This PR is now out of sync with master and generally obsolete.