Re: [xSocket-develop] XSocket non-blocking can't be established
Status: Inactive
Brought to you by:
grro
|
From: Steven Ma <ste...@em...> - 2009-08-05 09:37:07
|
Gregor,
We use jconsole to capture the status, there are no deadlock and the port is still listening for request. We are using JDK 1.6 update 14 to test and we have the following information:
State: BLOCKED on java.lang.Object@301d1507<mailto:java.lang.Object@301d1507> owned by: xDispatcherSrv15000#4
Total blocked: 2,924,997 Total waited: 0
Stack trace:
sun.nio.ch.WindowsSelectorImpl.wakeup(WindowsSelectorImpl.java:75)
org.xsocket.connection.IoSocketDispatcher.wakeUp(IoSocketDispatcher.java:309)
org.xsocket.connection.IoSocketDispatcher.register(IoSocketDispatcher.java:347)
org.xsocket.connection.IoSocketHandler.init(IoSocketHandler.java:149)
org.xsocket.connection.NonBlockingConnection.init(NonBlockingConnection.java:1011)
org.xsocket.connection.NonBlockingConnection.init(NonBlockingConnection.java:1005)
org.xsocket.connection.Server$LifeCycleHandler.onConnectionAccepted(Server.java:1067)
org.xsocket.connection.IoAcceptor.accept(IoAcceptor.java:221)
org.xsocket.connection.IoAcceptor.listen(IoAcceptor.java:200)
org.xsocket.connection.Server.run(Server.java:501)
java.lang.Thread.run(Thread.java:619)
Regards,
Steven Ma
From: Gregor Roth [mailto:gre...@gm...]
Sent: Wednesday, August 05, 2009 5:24 PM
To: Steven Ma
Cc: xso...@li...
Subject: Re: [xSocket-develop] XSocket non-blocking can't be established
Hi Steven,
what do you mean by "stopped". Does the thread block without returning? Or does it mean noting happens after the thread returns from the method. Do you have analyzed the log?
Gregor
----- Original Message -----
From: Steven Ma
Sent: 08/05/09 08:31 am
To: xso...@li...
Subject: [xSocket-develop] XSocket non-blocking can't be established
Dear sir,
We found that after a number of connections are established and then disconnected for a certain period of time, a new non-blocking connection can’t be established anymore. However, we are not sure about the timing of this period. It should be around 7 to 23 hours. According to xsocket source code, we go through the detail and we found that:
The program always stopped when calling connection.init(ioHandler) in Server.LifeCycleHandler.onConnectionAccepted(IoChainableHandler)
Below is the "Call Hierarchy" that we chase into:
IoAcceptor.accept()
-> Server.LifeCycleHandler.onConnectionAccepted(IoChainableHandler)
-> NonBlockingConnection.init(IoChainableHandler)
-> NonBlockingConnection.init(IoChainableHandler, IIoHandlerCallback)
-> IoSocketHandler.init(IIoHandlerCallback)
-> IoChainableHandler.setPreviousCallback(IIoHandlerCallback)
-> IoSocketDispatcher.register(IoSocketHandler, int)
-> ... (we guess the program may be stopped in this method somewhere)
xsocket.connection.Server.java
public void onConnectionAccepted(IoChainableHandler ioHandler) throws IOException {
// create a new connection
NonBlockingConnection connection = new NonBlockingConnection(connectionManager, handlerAdapter.getConnectionInstance());
// set default flush properties
………
// initialize the connection
connection.init(ioHandler);
// set timeouts (requires that connection is already initialized)
……..
// set transfer rates
………
}
We are testing it under xsocket v2.5.4. I’d like to know how to solve or work around this problem. Thanks.
Regards,
Steven Ma
________________________________
EMPEROR GROUP
>>From innovation to motivation - Since 1942
Head Office: 28/F Emperor Group Centre, 288 Hennessy Road, Wanchai, Hong Kong
Prime Line: (852) 2835 6688 .. Fax: (852) 2835 8188 ... Website: www.emperor.com.hk<http://www.gmx.com/fm07/cgi/derefer?TYPE=2&DEST=http%3A%2F%2Fwww.emperor.com.hk>
________________________________
DISCLAIMER
This email only contains the personal opinion of the sender. It does not constitute formal advice or commitment by the sender or Emperor Group. This email may contain confidential material. Any unauthorized use or dissemination is prohibited. If you are not the named recipient, please delete it and notify the sender immediately.
免責聲明
本郵件只包含寄件者的個人意見,並不構成寄件者或英皇集團的正式意見或承諾。本郵件可能含有機密的訊息,未經許可,不得使用或發送本郵件內任何資料。如你並非上列收件者,請你立即刪除本郵件並通知寄件者。
________________________________
EMPEROR GROUP
From innovation to motivation - Since 1942
Head Office: 28/F Emperor Group Centre, 288 Hennessy Road, Wanchai, Hong Kong
Prime Line: (852) 2835 6688 .. Fax: (852) 2835 8188 ... Website: www.emperor.com.hk
________________________________
DISCLAIMER
This email only contains the personal opinion of the sender. It does not constitute formal advice or commitment by the sender or Emperor Group. This email may contain confidential material. Any unauthorized use or dissemination is prohibited. If you are not the named recipient, please delete it and notify the sender immediately.
免責聲明
本郵件只包含寄件者的個人意見,並不構成寄件者或英皇集團的正式意見或承諾。本郵件可能含有機密的訊息,未經許可,不得使用或發送本郵件內任何資料。如你並非上列收件者,請你立即刪除本郵件並通知寄件者。
|