net.spy.MemcachedClient shutdown exceptions
David Olliges
davido at itasoftware.com
Tue Feb 26 21:29:35 UTC 2008
Hi,
I'm seeing intermittent Exceptions in the logs when running a test
that creates a new client, uses it, then shuts it down.
Exception in thread "Memcached IO over {MemcachedConnection to
localhost/127.0.0.1:11221 localhost/127.0.0.1:11222} - SHUTTING DOWN
(informed client)" java.nio.channels.CancelledKeyException
at sun.nio.ch.SelectionKeyImpl.ensureValid(SelectionKeyImpl.java:55)
at sun.nio.ch.SelectionKeyImpl.interestOps(SelectionKeyImpl.java:64)
at net.spy.memcached.protocol.TCPMemcachedNodeImpl.fixupOps
(TCPMemcachedNodeImpl.java:372)
at net.spy.memcached.MemcachedConnection.handleIO
(MemcachedConnection.java:275)
at net.spy.memcached.MemcachedConnection.handleIO
(MemcachedConnection.java:182)
at net.spy.memcached.MemcachedClient.run(MemcachedClient.java:740)
Exception in thread "Memcached IO over {MemcachedConnection to
localhost/127.0.0.1:11221 localhost/127.0.0.1:11222} - SHUTTING DOWN
(telling client)" java.lang.NullPointerException
at net.spy.memcached.protocol.TCPMemcachedNodeImpl.fixupOps
(TCPMemcachedNodeImpl.java:372)
at net.spy.memcached.MemcachedConnection.handleIO
(MemcachedConnection.java:275)
at net.spy.memcached.MemcachedConnection.handleIO
(MemcachedConnection.java:182)
at net.spy.memcached.MemcachedClient.run(MemcachedClient.java:740)
Exception in thread "Memcached IO over {MemcachedConnection to
localhost/127.0.0.1:11221 localhost/127.0.0.1:11222} - SHUTTING DOWN
(telling client)" java.lang.NullPointerException
at net.spy.memcached.protocol.TCPMemcachedNodeImpl.fixupOps
(TCPMemcachedNodeImpl.java:372)
at net.spy.memcached.MemcachedConnection.handleIO
(MemcachedConnection.java:275)
at net.spy.memcached.MemcachedConnection.handleIO
(MemcachedConnection.java:182)
at net.spy.memcached.MemcachedClient.run(MemcachedClient.java:740)
When I look at the source, I don't see any code that tries to prevent
the race condition between the IO handling code in
MemcachedConnection and the shutdown() call that closes each
connection. Is this a bug, or am I misreading the code?
Thanks,
David
More information about the memcached
mailing list