mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emmanuel Lecharny (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (DIRMINA-894) java.io.IOException: Broken Pipe infinite loop
Date Mon, 09 Jul 2012 16:03:35 GMT

     [ https://issues.apache.org/jira/browse/DIRMINA-894?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Emmanuel Lecharny resolved DIRMINA-894.
---------------------------------------

       Resolution: Fixed
    Fix Version/s: 2.0.5

There were no check that the session was closed or closing when we were calling the close(
now ) method.

A check has been added : 
http://svn.apache.org/viewvc?rev=1359234&view=rev

Hopefully, i should fix the problem (a check could help !)

Many thanks for the analysis and report !
                
> java.io.IOException: Broken Pipe infinite loop
> ----------------------------------------------
>
>                 Key: DIRMINA-894
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-894
>             Project: MINA
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.0.4
>            Reporter: Yannick Lecaillez
>            Priority: Critical
>             Fix For: 2.0.5
>
>
> An infinite java.io.IOException can occurs in when a session.close(false) is called in
a IoFilter.exceptionCaught().
> Indeed:
> AbstractPollingIoProcessor.flush(time) (line 777): 
>   This method flush all sessions contained in flushingSession. It does that until there
is no more flushingSession
> AbstractPollingIoProcessor.flushNow(session,time) (line 832):
>   Process write request. 
>   If an exception occurs during the write, IoFilter.exceptionCaught() is called ;
> IoFilter.exceptionCaught() (user code): 
>   call session.close(false);
> AbstractIoSession.close(false): (line 286) call closeOnFlush()
> AbstractIoSession.closeOnFlush() : 
>   add a CLOSE_REQUEST into the WriteQueue and flush() the session.
>   this session is then appended to the flushingSessions. 
>   
> Since the exception handling code in flushNow() doesn't reset the session.getCurrentWriteRequest(),
the writeRequestQueue is never polled and the processor will try to process the same write
request infinitly.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message