|
This is just a guess off the top of my head (so apologies
if its wildly inaccurate), but I wonder whether it has anything to do with
processor threads being shut down if they dont do any work?
When an attempt is made to read from a PipedInputStream, a
check is made every second to see whether the last thread to write to the
associated PipedOutputStream is still alive.
From PipedInputStream:
int trials = 2;
while (in < 0) { if (closedByWriter) { /* closed by writer, return EOF */ return -1; } if ((writeSide != null) && (!writeSide.isAlive()) && (--trials < 0)) { throw new IOException("Pipe broken"); } /* might be a writer waiting */ notifyAll(); try { wait(1000); } catch (InterruptedException ex) { throw new java.io.InterruptedIOException(); } } So,
if mina shuts down the thread which caused the last write
after inactivity (which I think it
might do), this could
be the cause.
Dave From: Jose Alberto Fernandez [mailto:[EMAIL PROTECTED] Sent: 24 November 2005 15:11 To: Apache Directory Developers List Subject: [MINA] Error on StreamIOHandler Hi, we are getting the following
stack trace when one is not constantly typing on a telnet session connected
using StreamIOHandler: java.io.IOException: Pipe
broken
at
java.io.PipedInputStream.read(PipedInputStream.java:255)
at
org.apache.mina.io.handler.StreamIoHandler$PipedInputStream.read(StreamIoHandler.java:223)
at
java.io.PipedInputStream.read(PipedInputStream.java:305)
at
org.apache.mina.io.handler.StreamIoHandler$PipedInputStream.read(StreamIoHandler.java:229)
at
sun.nio.cs.StreamDecoder$CharsetSD.readBytes(StreamDecoder.java:411)
at
sun.nio.cs.StreamDecoder$CharsetSD.implRead(StreamDecoder.java:453)
at
sun.nio.cs.StreamDecoder.read(StreamDecoder.java:183)
at
java.io.InputStreamReader.read(InputStreamReader.java:167)
at
java.io.BufferedReader.fill(BufferedReader.java:136)
at
java.io.BufferedReader.readLine(BufferedReader.java:299)
at
java.io.BufferedReader.readLine(BufferedReader.java:362)
at
com.cellectivity.poker.clienthandler.telnet.PokerTelnetHandler$Worker.run(PokerTelnetHandler.java:340)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:595) This is MINA 0.8.1. We have only one
connection and this occurs every time we do not use the telnet session for a
little while, less than a minute. Has anyone seen
this error before? Any way to solve it? Jose
Alberto This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you. |
- RE: [MINA] Error on StreamIOHandler Irving, Dave
- RE: [MINA] Error on StreamIOHandler Jose Alberto Fernandez
- RE: [MINA] Error on StreamIOHandler Irving, Dave
- RE: [MINA] Error on StreamIOHandler Jose Alberto Fernandez
- RE: [MINA] Error on StreamIOHandler Irving, Dave
- RE: [MINA] Error on StreamIOHandler Irving, Dave
- Re: [MINA] Error on StreamIOHandler Alex Cruise
- Re: [MINA] Error on StreamIOHandler Trustin Lee
- Re: [MINA] Error on StreamIOHandle... Alex Cruise
- [MINA] OutOfMemoryError on streaming l... Johannes Zillmann
- Re: [MINA] OutOfMemoryError on str... Niklas Therning
