Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Zookeeper >> mail # user >> Testing expired sessions bug?


+
Ben Bangert 2012-08-21, 20:00
+
Jordan Zimmerman 2012-08-21, 20:02
+
Ben Bangert 2012-08-21, 20:13
+
Jordan Zimmerman 2012-08-21, 20:41
+
Ben Bangert 2012-08-21, 21:30
+
Jordan Zimmerman 2012-08-21, 21:43
+
Ben Bangert 2012-08-21, 22:18
+
Michi Mutsuzaki 2012-08-21, 22:39
+
Ben Bangert 2012-08-21, 23:08
+
Michi Mutsuzaki 2012-08-21, 23:31
+
Ben Bangert 2012-08-22, 00:56
Copy link to this message
-
Re: Testing expired sessions bug?
On Wed, Aug 22, 2012 at 2:56 AM, Ben Bangert <[EMAIL PROTECTED]> 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
[NIOServerCxn.Factory:0.0.0.0/0.0.0.0:20000:NIOServerCnxn$Factory@251][]
- Accepted socket connection from /127.0.0.1:61933
2012-08-22 20:20:38,548 [myid:] - DEBUG
[NIOServerCxn.Factory:0.0.0.0/0.0.0.0:20000:NIOServerCnxn@735][] -
Session establishment request from client /127.0.0.1:61933 client's
lastZxid is 0x0
2012-08-22 20:20:38,549 [myid:] - INFO
[NIOServerCxn.Factory:0.0.0.0/0.0.0.0:20000:NIOServerCnxn@770][] -
Client attempting to renew session 0x1394f908ca00000 at
/127.0.0.1:61933
2012-08-22 20:20:38,549 [myid:] - INFO
[NIOServerCxn.Factory:0.0.0.0/0.0.0.0:20000:NIOServerCnxn@1435][] -
Closed socket connection for client /127.0.0.1:61932 which had
sessionid 0x1394f908ca00000
2012-08-22 20:20:38,552 [myid:] - INFO
[NIOServerCxn.Factory:0.0.0.0/0.0.0.0:20000:NIOServerCnxn@1573][] -
Invalid session 0x1394f908ca00000 for client /127.0.0.1:61933,
probably expired
2012-08-22 20:20:38,552 [myid:] - TRACE
[NIOServerCxn.Factory:0.0.0.0/0.0.0.0:20000:NIOServerCnxn@435][] - 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:0.0.0.0/0.0.0.0:20000:NIOServerCnxn@1435][] -
Closed socket connection for client /127.0.0.1:61933 which had
sessionid 0x1394f908ca00000
2012-08-22 20:20:38,555 [myid:] - DEBUG
[NIOServerCxn.Factory:0.0.0.0/0.0.0.0:20000:NIOServerCnxn@1459][] -
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.

Hanno
+
Hanno Schlichting 2012-08-22, 20:09
+
Jordan Zimmerman 2012-08-21, 20:40
+
Marshall McMullen 2012-08-22, 21:59