Menu

#24 IOException in doNetworkIO

open
nobody
None
5
2009-04-21
2009-04-21
Anonymous
No

Hi,
There seems to be an issue with closed channels not being taken out of the selector and giving rise to an IOException later on when a channel is raised for read but has no valid session in the socChanMap.

The stack trace for the exception (including the extra throw debug that mohadib) is:

java.lang.Throwable
at jerklib.ConnectionManager.doNetworkIO(ConnectionManager.java:383)
at jerklib.ConnectionManager$2.run(ConnectionManager.java:356)
at java.util.TimerThread.mainLoop(Timer.java:534)
at java.util.TimerThread.run(Timer.java:484)
Exception in thread "Timer-4" java.lang.NullPointerException
at jerklib.ConnectionManager.doNetworkIO(ConnectionManager.java:385)
at jerklib.ConnectionManager$2.run(ConnectionManager.java:356)
at java.util.TimerThread.mainLoop(Timer.java:534)
at java.util.TimerThread.run(Timer.java:484)

I _think_ it's being caused by the following, which is thrown earlier:

java.nio.channels.ClosedChannelException
at sun.nio.ch.SocketChannelImpl.ensureWriteOpen(SocketChannelImpl.java:144)
at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:342)
at jerklib.Connection.doWrites(Connection.java:290)
at jerklib.Connection.quit(Connection.java:407)
at jerklib.Session.close(Session.java:318)
at ircweb.IRCHandler.close(IRCHandler.java:84)
at ircweb.CareTaker.run(CareTaker.java:37)
java.nio.channels.ClosedChannelException
at sun.nio.ch.SocketChannelImpl.ensureWriteOpen(SocketChannelImpl.java:144)
at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:342)
at jerklib.Connection.doWrites(Connection.java:290)
at jerklib.Connection.quit(Connection.java:407)
at jerklib.Session.disconnected(Session.java:667)
at jerklib.Connection.doWrites(Connection.java:295)
at jerklib.Connection.quit(Connection.java:407)
at jerklib.Session.close(Session.java:318)
at ircweb.IRCHandler.close(IRCHandler.java:84)
at ircweb.CareTaker.run(CareTaker.java:37)

Discussion


Log in to post a comment.