celluloid / celluloid-redis

UNMAINTAINED: See celluloid/celluloid#779
MIT License
50 stars 9 forks source link

NoMethodError: undefined method `slice!' for nil:NilClass #4

Closed gf3 closed 11 years ago

gf3 commented 11 years ago

Seeing this come up occasionally in my logs.

I've gist'd the full stack trace and the method from closest ancestor of my code. It looks like Celluloid might need to do a nil check in Redis::Connection::Celluloid#read—I'm not entirely familiar with what's expected from redis, though.

tarcieri commented 11 years ago

Seems kind of odd: the core Ruby TCPSocket#gets method seems to have the same semantics as far as returning nil on close.

Perhaps I should look elsewhere in the Redis driver for how this is handled

simonrobson commented 11 years ago

Looks like the redis-rb ruby driver actually swaps in its own implementation of gets in Redis::Connection::SocketMixin. As far as I can see it changes the semantics ofTCPSocket#gets to never return nil, instead raising Errno::ECONNRESET on end of file.

I recall seeing errors like that @gf3 describes when running the redis-rb test suite on jruby against my own attempt a celluloid driver recently. Will try to reproduce and get a patch in.

tarcieri commented 11 years ago

@gf3 can you confirm this is fixed by #5? If so I can spin a new gem

gf3 commented 11 years ago

Sure, I can give it a shot. Might take some time to show up in the logs as I'm not sure what triggered it.

gf3 commented 11 years ago

It seems to be resolved. I haven't seen the error in a few days.

tarcieri commented 11 years ago

Cool, will spin a new gem.

tarcieri commented 11 years ago

This should be fixed in 0.0.2.