You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "jo,sung jun (JIRA)" <ji...@apache.org> on 2006/08/07 12:58:14 UTC

[jira] Created: (DIRMINA-241) When I used session.write(message), it was invoked deadlock.

When I used session.write(message), it was invoked deadlock.
------------------------------------------------------------

                 Key: DIRMINA-241
                 URL: http://issues.apache.org/jira/browse/DIRMINA-241
             Project: Directory MINA
          Issue Type: Bug
         Environment: windows xp
            Reporter: jo,sung jun
         Attachments: thread thump.txt

Hello,
Could you advise for me about this problem.
I attached server thread thumb.

I run the server , There are many clients,

When I use session.write , it happened deadlock.
I don't know why~


> this is some sample about multicast. 
	public void multicast(String channelName, Object message) {
		if (!(message instanceof ByteBuffer)) {
			return;
		}
		ByteBuffer rb = (ByteBuffer) message;
//		try{
			GameRoom channel = RoomManager.getRoom(channelName);
			List list = (List) channel.getUsers();
			Iterator it = list.iterator();
			while (it.hasNext()) {
				ByteBuffer buf = rb.duplicate();
				User user = (User) it.next();
				WrteFuture future = users.getSession().write(buf);
                                                                                     future.join();
				
			}
			rb.release();
//		}catch(Throwable t) {
//			}
	}



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (DIRMINA-241) When I used session.write(message), it was invoked deadlock.

Posted by "Trustin Lee (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/DIRMINA-241?page=comments#action_12429601 ] 
            
Trustin Lee commented on DIRMINA-241:
-------------------------------------

It seems like the deadlock occurred because you tried broadcasting messages to multiple sessions.  Two sessions were broadcasting messages to each other and it caused the deadlock in SSLFilter.  Please try to send messages in a dedicated background thread for now, or disable SSLFilter temporarilly.  We need to find out the best solution for this issue.

> When I used session.write(message), it was invoked deadlock.
> ------------------------------------------------------------
>
>                 Key: DIRMINA-241
>                 URL: http://issues.apache.org/jira/browse/DIRMINA-241
>             Project: Directory MINA
>          Issue Type: Bug
>         Environment: windows xp
>            Reporter: jo,sung jun
>         Attachments: thread thump.txt
>
>
> Hello,
> Could you advise for me about this problem.
> I attached server thread thumb.
> I run the server , There are many clients,
> When I use session.write , it happened deadlock.
> I don't know why~
> > this is some sample about multicast. 
> 	public void multicast(String channelName, Object message) {
> 		if (!(message instanceof ByteBuffer)) {
> 			return;
> 		}
> 		ByteBuffer rb = (ByteBuffer) message;
> //		try{
> 			GameRoom channel = RoomManager.getRoom(channelName);
> 			List list = (List) channel.getUsers();
> 			Iterator it = list.iterator();
> 			while (it.hasNext()) {
> 				ByteBuffer buf = rb.duplicate();
> 				User user = (User) it.next();
> 				WrteFuture future = users.getSession().write(buf);
>                                                                                      future.join();
> 				
> 			}
> 			rb.release();
> //		}catch(Throwable t) {
> //			}
> 	}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira