mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Schwarz (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DIRMINA-653) IoSession.write not thread-safe? Loosing messages under heavy multi-threaded write on same session.
Date Mon, 11 Apr 2011 12:09:05 GMT

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

Christian Schwarz commented on DIRMINA-653:
-------------------------------------------

@Emmanuel

Sometimes i get the following Exception, which appears after every decode once it occures:


org.apache.mina.filter.codec.ProtocolDecoderException: org.apache.mina.core.buffer.BufferDataException:
dataLength: 1996751083 (Hexdump: 77 04 00 EB 76 69 63 65 2E 6D 65 73 73 61 67 65 2E 4D 65
73 73 61 67 65 78 70 00 00 00 02 73 72 01 00 3C 63 6F 6D 2E 69 78 65 6C 6C 65 6E 63 65 2E
66 6D 73 2E 64 61 74 61 6D 6F 64 65 6C 2E 63 6F 6D 6D 2E 64 61 74 61 6D 6F 64 65 6C 2E 43
75 73 74 6F 6D 50 72 6F 00 19 73 71 00 7E 00 0D 00 00 00 00 77 04 00 00 00 0A 78 71 00 7E
26 68 73 71 00 7E 00 1C 70 70 73 71 00 7E 00 1E 73 71 00 7E 00 20 3F 40 00 00 00 00 00 0C
77 08 00 00 00 10 00 00 00 00 78 73 71 00 7E 00 22 73 71 00 7E 00 0D 00 00 00 00 77 04 00
00 00 0A 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 73 71 00 7E 00 12 77 0C 00 00 00 10
3F 40 00 00 00 00 00 06 71 00 7E 10 08 73 71 00 7E 00 14 74 00 0B 4D 41 4C 46 55 4E 43 54
49 4F 4E 74 00 08 53 74 C3 B6)


my Fiterchain:
fillterChain.addLast("compress", new CompressionFilter(COMPRESSION_MAX));
filterChain.addLast("codec",  new ProtocolCodecFilter(new ObjectSerializationCodecFactory(classLoader));
);
filterChain.addLast("logger", new LoggingFilter());

I hope it helps...
Christian




> IoSession.write not thread-safe? Loosing messages under heavy multi-threaded write on
same session.
> ---------------------------------------------------------------------------------------------------
>
>                 Key: DIRMINA-653
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-653
>             Project: MINA
>          Issue Type: Bug
>          Components: Core, Filter
>    Affects Versions: 2.0.0-M4
>         Environment: Windows Vista 64-bit
>            Reporter: Mauritz Lovgren
>             Fix For: 2.0.0-M5
>
>
> I am writing a stress-test that tests multi-thread safetyness of our stateless encoder
/ decoder under heavy load and I am observing that messages are silently lost during session.write(Object),
(the lost messages do not seem to reach the underlying socket buffer at all).
> I am using one encoder / decoder that is stateless. No executor filter, only the filter
codec and a basic io handler.
> Synchronizing on the session.write makes the problem go away;
> synchronized (session)
> {
>   future = session.write(message);
> }
> Do I really have to synchronize on the session to solve this issue?

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message