Issue Details (XML | Word | Printable)

Key: DIRMINA-129
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Trustin Lee
Reporter: dave irving
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
MINA

"Pipe broken" IOExceptions countered on non-active stream connections

Created: 25/Nov/05 05:25 PM   Updated: 07/Dec/05 06:03 PM
Return to search
Component/s: None
Affects Version/s: 0.8.1
Fix Version/s: 0.8.2

Time Tracking:
Not Specified

Environment: All

Resolution Date: 28/Nov/05 05:35 PM


 Description  « Hide
The StreamIOHandler implementation uses PipedInput/Output streams for providing read data.
PipedInputStream is quite strict about the relationship between the producer and consumer thread.
When blocking on a read, PipedInputStream checks every second to see if the last producer thread to write to it is still alive. If it detects that the producer thread is no longer alive, an IO Exception is thrown indicating "Pipe Broken".

This causes a problem in Mina becuase worker threads in the ThreadPoolFilter have a "keep alive time" (default is one second). So, if a user is blocked on a stream IO read (really a PipedInputStream), and the last ThreadPoolFilter thread which produced data for the stream idles out, the user encounters a "Pipe Broken" IOException (not related to session idle).

Users can currently work around the problem by increasing the keep-alive time on the ThreadPoolFilter.

My gut feeling is that ditching PipedInputStream / PipedOutputStream in favour of something more suited to Minas needs would be a good solution to the problem.


 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Trustin Lee added a comment - 28/Nov/05 02:57 PM
This issue affects 0.8, too. We need to fix it in 0.8.2.

Trustin Lee added a comment - 28/Nov/05 05:35 PM
I removed the use of PipedInput(Output)Stream in StreamIoHandler. Now, a brand-new and high-performing implementation replaces it. I tested a little bit with HTTP server example, and it seems to work great. Please confirm my fix and close this issue.

Thanks,
Trustin

dave irving added a comment - 07/Dec/05 06:03 PM
Fixed by Trustin