On Jan 15, 2008 9:55 PM, Trustin Lee <[EMAIL PROTECTED]> wrote:

> Hi Geoff,
>
> Thank you so much for the detailed report first of all.
>
> On Jan 11, 2008 2:28 PM, Geoff Cadien <[EMAIL PROTECTED]> wrote:
> > Linux
> > Java 1.6.0_03
> > Mina 2.0 trunk
> >
> > I've run into a difficult to reproduce problem when using NioConnector.
>  The
> > setup looks something like this (if I'm doing something wrong let me
> know)
> >
> >
> > NioConnector connector = new NioConnector(4)
> > connector.getFilterChain().addLast("protocolFilter", new
> > ProtocolCodecFilter(encoder, decoder));
> > connector.setHandler(new Handler());
> >
> > Here is sessionOpened fromt he Handler.
> >
> > public void sessionOpened(IoSession session) {
> >     session.write(...);
> > }
> >
> > Both sessionCreated() and sessionOpened() are called and I know that the
> > request is written.  But no other handler methods are ever called
> > (messageReceived, sessionIdle, exceptionCaught,  or sessionClosed).  Now
> > this happens only very rarely, probably < 1% of the time, under heavy
> load.
> > I did a thread dump and noticed that  each time this occurred there was
> a
> > NioProcessor still executing, and it never exited.  With some well
> placed
> > debugging I was able to determine that inside the
> > AbstractPollingIoProcecess$Worker.run() the nSession local is 1 and
> never
> > changes, so the Worker never exits.  Also allSessions() returns no
> > sessions.  So it seems as though the session has just disappeared.
>
> What happens you disconnect the connection?  Is nSession decreased to
> 0 and does NioProcessor exit?  Please let us keep updated.
>
> Actually the NioProcessor never exits, that's what was disturbing.
> nSessions stays at >= 1 and never exits even when all tcp connections have
> been terminated (verified with netstat).  I have been unable to reproduce
> the problem with any small test cases, either using the mina examples or one
> of my own.  Even in my application it happens rarely.  I wish I had more
> information to provide, but at this point I don't. :(


Thanks,

-geoff

Reply via email to