directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Möller <dcmoel...@gmx.de>
Subject Re: [mina] Client hangs and sends no data
Date Fri, 30 Sep 2005 09:28:29 GMT
Hi Trustin,

> Hi Christian,
> 
> 2005/9/29, Christian Möller <dcmoeller@gmx.de <mailto:dcmoeller@gmx.de>>:
> 
>     I've got a problem with sending data from a client to a server using
>     MINA. Data are successfully written to ProtocolSession as I can see them
>     in the logging output. But they are never sent to the server: Absolutely
>     no data travels across the network; the client application hangs.
> 
> 
> Could you give me full thread dump for the application when it hangs?  I
> need to inspect it first to see if it is caused by therad pool filters.

OK, let's try it:

Main thread idles here as expected:
	while (session.isConnected()) {
		try {
			Thread.sleep(100); // <== HERE
		...

The other threads are as follows:

------------------
Thread [SocketIoProcessor] (Suspended)
	sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(long, int, int[],
int[], int[], long) line: not available [native method]
	sun.nio.ch.WindowsSelectorImpl$SubSelector.poll() line: not available
	sun.nio.ch.WindowsSelectorImpl$SubSelector.access$400(sun.nio.ch.WindowsSelectorImpl$SubSelector)
line: not available
	sun.nio.ch.WindowsSelectorImpl.doSelect(long) line: not available
	sun.nio.ch.WindowsSelectorImpl(sun.nio.ch.SelectorImpl).lockAndDoSelect(long)
line: not available
	sun.nio.ch.WindowsSelectorImpl(sun.nio.ch.SelectorImpl).select(long)
line: not available
	org.apache.mina.io.socket.SocketIoProcessor$Worker.run() line: 544
------------------
Thread [IoThreadPool-3] (Suspended)
	java.lang.Object.wait(long) line: not available [native method]
	org.apache.mina.util.BlockingSet(java.lang.Object).wait() line: not
available [local variables unavailable]
	org.apache.mina.util.BlockingSet.waitForNewItem() line: 61
	org.apache.mina.util.BaseThreadPool$Worker.fetchBuffer() line: 352
	org.apache.mina.util.BaseThreadPool$Worker.run() line: 325
------------------
Thread [ProtocolThreadPool-4] (Suspended)
	java.lang.Object.wait(long) line: not available [native method]
	org.apache.mina.util.BlockingSet(java.lang.Object).wait() line: not
available
	org.apache.mina.util.BlockingSet.waitForNewItem() line: 61
	org.apache.mina.util.BaseThreadPool$Worker.fetchBuffer() line: 352
	org.apache.mina.util.BaseThreadPool$Worker.run() line: 325
------------------

That's it.
On the server side there's only an openSession event in the log file -
nothing more.

>     I've looked at your example application delivered with the MINA 0.7.4:
>     Sumup Client and Server. There are no real differences (by the way, the
>     example app works locally). The only difference obvious to me is usage
>     of DemuxingProtocolCodecFactory - I'm using a kind
>     of  ProtocolCodecFactory.

By the way, there's another difference: We are talking SSL via MINA's
SSLFilter.

> It would be great if I can reproduce the problem by myself.  Please
> e-mail me the source code if you can provide it to me.

OK, I will try to extract all required classes to prevent sending the
whole content of our CVS repo ... :-)

Thanks in advance

Christian

Mime
View raw message