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] [Commented] (DIRMINA-653) IoSession.write not thread-safe? Loosing messages under heavy multi-threaded write on same session.
Date Tue, 05 Apr 2011 10:29:05 GMT

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

Emmanuel Lecharny commented on DIRMINA-653:
-------------------------------------------

I have added a synchronized section on ZLib.java, following Yannick suggestion. It's available
in http://svn.apache.org/viewvc/mina/branches/2.0.3/

here is the patch :
http://svn.apache.org/viewvc?rev=1088959&view=rev

Christian, can you tell me if it fixes your issue ?

> 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