[
https://issues.apache.org/jira/browse/DIRMINA-734?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12740133#action_12740133
]
Emmanuel Lecharny commented on DIRMINA-734:
-------------------------------------------
After having add some logs, I get those traces when the program fails :
...
1 <Client Message received for Session (0x00000031: nio socket, client,
/192.168.0.51:49669 => iktek.com/88.191.29.20:80)
2 <Client Scheduling session (0x00000031: nio socket, client,
/192.168.0.51:49669 => iktek.com/88.191.29.20:80) for removal, ret < 0 (1)
3 <Client Session (0x00000031: nio socket, client, /192.168.0.51:49669 =>
iktek.com/88.191.29.20:80) scheduled for removal
4 <Client Message received for Session (0x00000031: nio socket, client,
/192.168.0.51:49669 => iktek.com/88.191.29.20:80)
5 <Client Session (0x00000031: nio socket, client, /192.168.0.51:49669 =>
iktek.com/88.191.29.20:80) closed
6 >Server Scheduling session (0x00000030: nio socket, server, /127.0.0.1:39726
=> /127.0.0.1:8081) for removal in remove( T )
7 >Server Session (0x00000030: nio socket, server, /127.0.0.1:39726 =>
/127.0.0.1:8081) scheduled for removal
8 >Server Exception caught for session (0x00000030: nio socket, server,
/127.0.0.1:39726 => /127.0.0.1:8081)
[16:27:13] MinaProxyThread ERROR [] []
[org.apache.mina.example.serge.AbstractProxyIoHandler] - Error
org.apache.mina.core.write.WriteToClosedSessionException
As you can see, the remote server does not have anything more to send, or seems
to have nothing more to sent (line 2). The place where the removal is called is
in the read(Session) method, which tries to read bytes from the remote server
(http). But strange enough, there is another MessageReceived which is sent
(line 4), while the session is being closed...
May be the initial request was not complete ?
> 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
> Assignee: Emmanuel Lecharny
> Fix For: 2.0.0-M7
>
> 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.