Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 01-24-2007
zhoubin zhoubin is offline
Registered User
 
Name: bin ge
Organization: proffessional
Project: partyManage
 
Join Date: Nov 2006
Location: beijing
Posts: 13
Send a message via MSN to zhoubin
-->
the usage of cpu goes to 100% when the network is disconnect

dear friends:
I use vc7.0 as the server,Java as the client.and the OS is Windows2003.
at the client(using java), when I make the network disconnect or I pull out the twisted-pair.the usage of cpu goes to 100%.
If I suspend the Ice.ThreadPool.Client-0 thread,the usage of cpu goes down. why?
My code as below:
private void conClient2Server()
{
try
{
ic = Ice.Util.initialize();

Ice.ObjectPrx base = ic.stringToProxy(
_appGateConnstring);
SingleApgInterfacePrx = APG.APGInterfacePrxHelper.checkedCast(base);
if (SingleApgInterfacePrx == null)
{
clientbeanLog.error("prox invalid!");
throw new Error("prox invalid!");
}
else
{
clientbeanLog.info("connect success!");
}
}
catch (Ice.LocalException e)
{
clientbeanLog.error(e, e);
e.printStackTrace();
}
catch (Exception e)
{
clientbeanLog.error(e, e);
System.err.println(e.getMessage());
}

Thank you!
__________________
zhoubin
www.channelsoft.com
Reply With Quote
  #2 (permalink)  
Old 01-24-2007
benoit's Avatar
benoit benoit is online now
ZeroC Staff
 
Name: Benoit Foucher
Organization: ZeroC, Inc.
Project: Ice
 
Join Date: Feb 2003
Location: Rennes, France
Posts: 1,534
Hi,

Which Java and Ice version are you using? What do you mean by suspending the "Ice.ThreadPool.Client-0" thread? Do you stop the client program?

The best to figure out what the client is doing would be to dump and post the JVM stack traces. On Windows, you can do this by hitting the Ctrl + Break keys in the command shell window where your Java client is running.

Cheers,
Benoit.
Reply With Quote
  #3 (permalink)  
Old 01-24-2007
zhoubin zhoubin is offline
Registered User
 
Name: bin ge
Organization: proffessional
Project: partyManage
 
Join Date: Nov 2006
Location: beijing
Posts: 13
Send a message via MSN to zhoubin
-->
Quote:
Originally Posted by benoit View Post
Hi,

Which Java and Ice version are you using? What do you mean by suspending the "Ice.ThreadPool.Client-0" thread? Do you stop the client program?

The best to figure out what the client is doing would be to dump and post the JVM stack traces. On Windows, you can do this by hitting the Ctrl + Break keys in the command shell window where your Java client is running.

Cheers,
Benoit.
Thank you for your quick reply,Benoit.
I use j2sdk1.4.2_04 and Ice V3.11.and my IDE is Eclipse v3.2.1.when I make the network disconnect or I pull out the twisted-pair.the usage of cpu goes to 100%. after I connect the network,the usage of cpu remain 100%.

I haven't stop the programm.I find there are 2 Ice threads running in my programm:Thread [Ice.ThreadPool.Client-0] and Thread[Ice.ConnectionMonitor] ,when I suspend the thread whose name is [Ice.ThreadPool.Client-0] in Eclipse v3.2.1,I find the usage of cpu goes down,If I resume it,the usage of cpu goes to 100%;but if I suspend[Ice.ConnectionMonitor],the usage of cpu has no change.
__________________
zhoubin
www.channelsoft.com
Reply With Quote
  #4 (permalink)  
Old 01-24-2007
marc's Avatar
marc marc is offline
ZeroC Staff
 
Name: Marc Laukien
Organization: ZeroC, Inc.
Project: The Internet Communications Engine
 
Join Date: Feb 2003
Location: Florida
Posts: 1,781
Before we dig deeper into this, can you please update your Java version, and try again? j2sdk1.4.2_04 is quite old. Here in these forums we only provide support for an up-to-date Java version.
Reply With Quote
  #5 (permalink)  
Old 01-24-2007
zhoubin zhoubin is offline
Registered User
 
Name: bin ge
Organization: proffessional
Project: partyManage
 
Join Date: Nov 2006
Location: beijing
Posts: 13
Send a message via MSN to zhoubin
-->
Thank you for your reply, marc.
If I update the jsdk version1.5,which means I have to update Vc7.0 to Visual Studio 2005?Because I use c++ as server.and I heard of jdk1.5 is compatible with Visual Studio 2005 while use Ice .Really?
Meanwhile,I had do a lot of work with jsdk 1.4.I am afraid it will have troubles If I update the jsdk version.
__________________
zhoubin
www.channelsoft.com
Reply With Quote
  #6 (permalink)  
Old 01-24-2007
zhoubin zhoubin is offline
Registered User
 
Name: bin ge
Organization: proffessional
Project: partyManage
 
Join Date: Nov 2006
Location: beijing
Posts: 13
Send a message via MSN to zhoubin
-->
the stack infomation as below:

org.apache.catalina.startup.Bootstrap at localhost:3841
Thread [main] (Running)
Thread [http-8080-Processor10] (Running)
Thread [http-8080-Processor11] (Running)
Thread [http-8080-Processor12] (Running)
Thread [http-8080-Processor13] (Running)
Thread [http-8080-Processor14] (Running)
Thread [http-8080-Processor15] (Running)
Thread [http-8080-Processor16] (Running)
Thread [http-8080-Processor17] (Running)
Thread [http-8080-Processor18] (Running)
Thread [http-8080-Processor19] (Running)
Thread [http-8080-Processor20] (Running)
Thread [http-8080-Processor9] (Running)
Thread [http-8080-Processor8] (Running)
Thread [http-8080-Processor7] (Running)
Thread [http-8080-Processor6] (Running)
Thread [http-8080-Processor5] (Running)
Thread [http-8080-Processor4] (Running)
Thread [http-8080-Processor3] (Running)
Thread [http-8080-Processor2] (Running)
Thread [http-8080-Processor1] (Running)
Thread [ContainerBackgroundProcessor[StandardEngine[Catalina]]] (Running)
Thread [TP-Monitor] (Running)
Thread [TP-Processor4] (Running)
Thread [TP-Processor3] (Running)
Thread [TP-Processor2] (Running)
Thread [TP-Processor1] (Running)
Thread [http-8080-Monitor] (Running)
Thread [http-8080-Processor25] (Running)
Thread [http-8080-Processor24] (Running)
Thread [http-8080-Processor23] (Running)
Thread [http-8080-Processor22] (Running)
Thread [http-8080-Processor21] (Running)
Thread [Ice.ThreadPool.Client-0] (Suspended)
WindowsSelectorImpl$SubSelector.poll0(long, int, int[], int[], int[], long) line: not available [native method] [local variables unavailable]
WindowsSelectorImpl$SubSelector.poll() line: 263
WindowsSelectorImpl$SubSelector.access$400(Windows SelectorImpl$SubSelector) line: 245
WindowsSelectorImpl.doSelect(long) line: 128
WindowsSelectorImpl(SelectorImpl).lockAndDoSelect( long) line: 59
WindowsSelectorImpl(SelectorImpl).select(long) line: 70
WindowsSelectorImpl(SelectorImpl).select() line: 74
ThreadPool.select() line: 1111
ThreadPool.run(BasicStream) line: 488
ThreadPool.access$100(ThreadPool, BasicStream) line: 12
ThreadPool$EventHandlerThread.run() line: 1248
Thread [Ice.ConnectionMonitor] (Running)
D:\j2sdk1.4.2_04\bin\javaw.exe (2007-1-24 下午03:26:30)
__________________
zhoubin
www.channelsoft.com
Reply With Quote
  #7 (permalink)  
Old 01-24-2007
marc's Avatar
marc marc is offline
ZeroC Staff
 
Name: Marc Laukien
Organization: ZeroC, Inc.
Project: The Internet Communications Engine
 
Join Date: Feb 2003
Location: Florida
Posts: 1,781
I believe there is even a newer version for JDK 1.4 available. Please check the Sun download pages for details.

I don't understand what you mean with JDK 1.5 being compatible with Visual C++ 7.0 only. As far as Ice is concerned, the version of Java you are using has no impact whatsoever on which C++ compiler you are using.

It would also be helpful if you could send us a few stack traces of the thread that uses 100% of the CPU. (After the JDK update )
Reply With Quote
  #8 (permalink)  
Old 01-24-2007
marc's Avatar
marc marc is offline
ZeroC Staff
 
Name: Marc Laukien
Organization: ZeroC, Inc.
Project: The Internet Communications Engine
 
Join Date: Feb 2003
Location: Florida
Posts: 1,781
Oops... I forgot to mention: Can you please update your user profile with your full name? Thanks!
Reply With Quote
  #9 (permalink)  
Old 01-24-2007
marc's Avatar
marc marc is offline
ZeroC Staff
 
Name: Marc Laukien
Organization: ZeroC, Inc.
Project: The Internet Communications Engine
 
Join Date: Feb 2003
Location: Florida
Posts: 1,781
The latest JDK 1.4 version is 1.4.2_13:

http://java.sun.com/j2se/1.4.2/ReleaseNotes.html#142_13

Looking through the release notes, it appears that several problems with select() have been fixed.
Reply With Quote
  #10 (permalink)  
Old 01-24-2007
zhoubin zhoubin is offline
Registered User
 
Name: bin ge
Organization: proffessional
Project: partyManage
 
Join Date: Nov 2006
Location: beijing
Posts: 13
Send a message via MSN to zhoubin
-->
Quote:
Originally Posted by marc View Post
The latest JDK 1.4 version is 1.4.2_13:

http://java.sun.com/j2se/1.4.2/ReleaseNotes.html#142_13

Looking through the release notes, it appears that several problems with select() have been fixed.
Thank you!
I have updated my profile. and I will update my jdk version and try again.
__________________
zhoubin
www.channelsoft.com
Reply With Quote
  #11 (permalink)  
Old 01-24-2007
zhoubin zhoubin is offline
Registered User
 
Name: bin ge
Organization: proffessional
Project: partyManage
 
Join Date: Nov 2006
Location: beijing
Posts: 13
Send a message via MSN to zhoubin
-->
Quote:
Originally Posted by zhoubin View Post
Thank you!
I have updated my profile. and I will update my jdk version and try again.
Thank you ,marc and benoit!
After updating jdk to jdk1.5.0_09,it's ok!
Best regards to you!
__________________
zhoubin
www.channelsoft.com
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
About Usage of freeze in ICE Grid Application AravindBabu Help Center 4 12-05-2006 08:54 AM
Help about one usage of AMD rc_hz Help Center 1 09-30-2006 12:19 AM
Icepatch2 checksum memory usage Ric Bug Reports 5 01-27-2006 08:10 AM
slice2cpp - DLL usage timp Help Center 2 01-12-2006 01:03 PM
Client Disconnect Callback tony_h Help Center 1 09-21-2004 12:41 PM


All times are GMT -4. The time now is 11:18 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.