Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 03-26-2008
cmeyers cmeyers is offline
Registered User
 
Name: Curt Meyers
Organization: Willow Garage Inc.
Project: Autonomous Boat
 
Join Date: Mar 2008
Posts: 6
Client disconnect causes server to shutdown

I have built an application using Ice-E.

I have the code built and running on a desktop machine running linux with an Intel processor and it works fine.

I have cross compiled Ice-E to run on an ARM processor that is running linux.

When I run the server side on the ARM processor the server shuts down when a client disconnects. This exact same code runs on my Intel box. Do you have any suggestions?

I currently do not have a way to run a debugger on the ARM system.
Reply With Quote
  #2 (permalink)  
Old 03-26-2008
cmeyers cmeyers is offline
Registered User
 
Name: Curt Meyers
Organization: Willow Garage Inc.
Project: Autonomous Boat
 
Join Date: Mar 2008
Posts: 6
Further information:

I placed a print statement in the function ObjectAdapterFactory::waitForShutdown()

and found that the code

Quote:
while(_instance)
{
wait();
}
is looping continuously but on my Intel box it doesn't even enter this while loop.

Any ideas what this means?
Reply With Quote
  #3 (permalink)  
Old 03-26-2008
matthew's Avatar
matthew matthew is online now
ZeroC Staff
 
Name: Matthew Newhook
Organization: ZeroC, Inc.
Project: Internet Communications Engine
 
Join Date: Feb 2003
Location: NL, Canada
Posts: 1,061
If the code never waits in that loop then it means that something called shutdown prior to the code entering this function. When you say looping continuously do you mean spinning? The code should not spin, as it is using a monitor (and therefore a condition variable) to wait. This should not consume CPU while waiting to be signaled.
Reply With Quote
  #4 (permalink)  
Old 03-26-2008
cmeyers cmeyers is offline
Registered User
 
Name: Curt Meyers
Organization: Willow Garage Inc.
Project: Autonomous Boat
 
Join Date: Mar 2008
Posts: 6
I put a print statement in the while loop and it prints continuously when I start the server, so yes it is spinning.
Reply With Quote
  #5 (permalink)  
Old 03-26-2008
cmeyers cmeyers is offline
Registered User
 
Name: Curt Meyers
Organization: Willow Garage Inc.
Project: Autonomous Boat
 
Join Date: Mar 2008
Posts: 6
It seems that "_instance" should not be valid yet when the server starts and has called waitForShutdown() before any connections are made.

I feel that there is a memory problem, maybe my cross compiled version of IceE is picking up the wrong header files when it is built.
Reply With Quote
  #6 (permalink)  
Old 03-27-2008
cmeyers cmeyers is offline
Registered User
 
Name: Curt Meyers
Organization: Willow Garage Inc.
Project: Autonomous Boat
 
Join Date: Mar 2008
Posts: 6
The call to pthread_cond_wait in Cond.h is not working

Any ideas?
Reply With Quote
  #7 (permalink)  
Old 03-27-2008
matthew's Avatar
matthew matthew is online now
ZeroC Staff
 
Name: Matthew Newhook
Organization: ZeroC, Inc.
Project: Internet Communications Engine
 
Join Date: Feb 2003
Location: NL, Canada
Posts: 1,061
It seems that your cross-compilation environment is not setup correctly. If basic things like pthread_cond_wait do not work, then you have a serious problem.
Reply With Quote
  #8 (permalink)  
Old 03-28-2008
cmeyers cmeyers is offline
Registered User
 
Name: Curt Meyers
Organization: Willow Garage Inc.
Project: Autonomous Boat
 
Join Date: Mar 2008
Posts: 6
Solved the problem. Seems that the compiler was picking up the wrong header files when I was cross compiling. The pthread header is full of ifdef statements and possibly was the cause of the problem.

The lesson is to not use the "-B" option with gcc but instead use the "-isystem" option to specify the location of the header files when cross compiling.
Reply With Quote
  #9 (permalink)  
Old 03-28-2008
matthew's Avatar
matthew matthew is online now
ZeroC Staff
 
Name: Matthew Newhook
Organization: ZeroC, Inc.
Project: Internet Communications Engine
 
Join Date: Feb 2003
Location: NL, Canada
Posts: 1,061
Glad to hear everything is solved for you!
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
client ask a string to the server and the server send it to the client blade Help Center 6 08-15-2007 03:08 AM
How to shutdown a service instead of a Icebox server? Deqing Help Center 6 05-17-2006 06:24 PM
How can client know the status that client and server disconnceted? skyriver Help Center 2 06-08-2005 12:37 AM
How server initiatively send message to client, and client can responce to it? ouloba Help Center 3 11-26-2004 10:35 AM
Client Disconnect Callback tony_h Help Center 1 09-21-2004 12:41 PM


All times are GMT -4. The time now is 10:35 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.