zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hanno Schlichting <ha...@hannosch.eu>
Subject Re: Testing expired sessions bug?
Date Wed, 22 Aug 2012 18:54:56 GMT
On Wed, Aug 22, 2012 at 2:56 AM, Ben Bangert <ben@groovie.org> wrote:
> So the C binding doesn't work when loading a session ID if another process on the same
computer is already using that? How come the tests pass most of the time?

As a bit more info, here's the trace log of such a failed session
reuse using ZK 3.4.3 with a single server:

2012-08-22 20:20:38,548 [myid:] - INFO
- Accepted socket connection from /
2012-08-22 20:20:38,548 [myid:] - DEBUG
[NIOServerCxn.Factory:][] -
Session establishment request from client / client's
lastZxid is 0x0
2012-08-22 20:20:38,549 [myid:] - INFO
[NIOServerCxn.Factory:][] -
Client attempting to renew session 0x1394f908ca00000 at
2012-08-22 20:20:38,549 [myid:] - INFO
[NIOServerCxn.Factory:][] -
Closed socket connection for client / which had
sessionid 0x1394f908ca00000
2012-08-22 20:20:38,552 [myid:] - INFO
[NIOServerCxn.Factory:][] -
Invalid session 0x1394f908ca00000 for client /,
probably expired
2012-08-22 20:20:38,552 [myid:] - TRACE
[NIOServerCxn.Factory:][] - Add
a buffer to outgoingBuffers, sk sun.nio.ch.SelectionKeyImpl@6a5f6303
is valid: true
2012-08-22 20:20:38,554 [myid:] - INFO
[NIOServerCxn.Factory:][] -
Closed socket connection for client / which had
sessionid 0x1394f908ca00000
2012-08-22 20:20:38,555 [myid:] - DEBUG
[NIOServerCxn.Factory:][] -
ignoring exception during input shutdown
java.net.SocketException: Socket is not connected
	at sun.nio.ch.SocketChannelImpl.shutdown(Native Method)
	at sun.nio.ch.SocketChannelImpl.shutdownInput(SocketChannelImpl.java:633)
	at sun.nio.ch.SocketAdaptor.shutdownInput(SocketAdaptor.java:360)
	at org.apache.zookeeper.server.NIOServerCnxn.closeSock(NIOServerCnxn.java:1455)
	at org.apache.zookeeper.server.NIOServerCnxn.close(NIOServerCnxn.java:1412)
	at org.apache.zookeeper.server.NIOServerCnxn.doIO(NIOServerCnxn.java:632)
	at org.apache.zookeeper.server.NIOServerCnxn$Factory.run(NIOServerCnxn.java:262)

Note how there's no ZooTrace entries in here and no "Session 0x... is
valid..." message as logged in ZooKeeperServer.revalidateSession.
Reading the server code it looks like the checkPasswd check fails in
reopenSession. But I have no idea why that would suddenly happen in
some of the cases.


View raw message