[ 
https://issues.apache.org/jira/browse/DIRMINA-734?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12739975#action_12739975
 ] 

Emmanuel Lecharny commented on DIRMINA-734:
-------------------------------------------

When I run the sample, I get a NPE :

[12:06:39] MinaProxyThread WARN  [] [] 
[org.apache.mina.core.service.IoHandlerAdapter] - EXCEPTION, please implement 
org.apache.mina.example.proxy.ServerToProxyIoHandler.exceptionCaught() for 
proper handling:
java.lang.NullPointerException
        at 
org.apache.mina.example.proxy.AbstractProxyIoHandler.messageReceived(AbstractProxyIoHandler.java:73)
        at 
org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:713)
        at 
org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
        at 
org.apache.mina.core.filterchain.DefaultIoFilterChain.access$5(DefaultIoFilterChain.java:429)
        at 
org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:793)
        at 
org.apache.mina.core.filterchain.IoFilterEvent.fire(IoFilterEvent.java:71)
        at org.apache.mina.core.session.IoEvent.run(IoEvent.java:63)
        at 
org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.runTask(OrderedThreadPoolExecutor.java:780)
        at 
org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.runTasks(OrderedThreadPoolExecutor.java:772)
        at 
org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.run(OrderedThreadPoolExecutor.java:714)
        at java.lang.Thread.run(Thread.java:619)


This is due to the fact that the OTHER_IO_SESSION attribute is not stored into 
the session... Can you check on your side ?

> Regression with flushing in MINA 2.0.0-M7 trunk
> -----------------------------------------------
>
>                 Key: DIRMINA-734
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-734
>             Project: MINA
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.0.0-M7
>            Reporter: Serge Baranov
>         Attachments: mina-flush-regression.zip
>
>
> It looks like the present trunk of MINA in the repository
> has a bug. Updating from M7 built on 06.06.2009 to the current trunk
> broke some of our tests.
> I've tried to build it today and ran our application tests, some of
> them failed.
> Reverting back to 06.06.2009 build has fixed the problem.
> At the first look it appears that session.close(false) behaves like
> session.close(true), as a result some messages are truncated (not
> being flushed on session.close(false)).
> If I comment out a call to session.close(false) (i.e. not closing the
> session at all when needed), the problem goes away.
> This behavior is inconsistent, test fails/succeeds randomly. On the
> first run it may pass, on the second run it may fail. Test fails about
> 10% of runs. The part which is not flushed is also random. Could be a
> race condition somewhere in MINA introduced in the last 2 months.
> I can't provide a test case yet, but our application is a kind of
> proxy, so it behaves like this:
> 1. client connects to the app and send a request
> 2. app connects to another server and sends a request
> 3. app gets a reply from the server and sends it back to the client
> 4. when another server closes the connection, app is closing the
>    connection with the client using session.close(false)
> The app may be still flushing data to client when closing the
> connection. As I said it worked fine with previous MINA versions, but
> has broken only recently.
> We are using OrderedThreadPoolExecutor and CumulativeProtocolDecoder
> if that matters.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to