Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[tao-users] Question with respect to CORBA callbacks

2 views
Skip to first unread message

cjulw...@micron.com

unread,
Nov 3, 2009, 5:21:30 PM11/3/09
to tao-...@list.isis.vanderbilt.edu
TAO VERSION: 1.6.1
ACE VERSION: 5.6.1

HOST MACHINE and OPERATING SYSTEM:
If on Windows based OS's, which version of WINSOCK do you
use?:
Red Hat Enterprise Linux 5.1

TARGET MACHINE and OPERATING SYSTEM, if different from HOST:
COMPILER NAME AND VERSION (AND PATCHLEVEL):
Red Hat Enterprise Linux 5.1 ( GCC 4.1.1 )

THE $ACE_ROOT/ace/config.h FILE [if you use a link to a platform-
specific file, simply state which one]:
ace/config-linux.h

THE $ACE_ROOT/include/makeinclude/platform_macros.GNU FILE [if you
use a link to a platform-specific file, simply state which one
(unless this isn't used in this case, e.g., with Microsoft Visual
C++)]:
platform_linux.GNU

CONTENTS OF $ACE_ROOT/bin/MakeProjectCreator/config/default.features
(used by MPC when you generate your own makefiles):

AREA/CLASS/EXAMPLE AFFECTED:
Usage Question. How to close sockets of deactivated servants.

DOES THE PROBLEM AFFECT:
COMPILATION?
No
LINKING?
No
EXECUTION?
Yes, it doesn't appear that after deactivating my callback
that sockets are returned to the system.
OTHER (please specify)?

SYNOPSIS:
I have an application which connects to TAO corba servers
and registers a callback. It does some monitoring, then
connects to another remote server, and so on and so forth.
The problem I'm having is that I am calling deactivate_object
via the POA on the derived class, and CORBA::release()
on the pointer returned from the ->_this() call, but the
socket for the callback is not being returned to the system.
I am using the RootPOA, and monitoring socket usage via
ls /proc/<pid>/fd | wc -l

DESCRIPTION:
>From my research it appears that the RootPOA is designed to have
servants activated and deactivated. Once the servant is
deactivated and the reference count is 0 should the socket be
closed for that servant? Is there a way to trigger this
behavior?

This causes problems because the point of my app is to connect,
and register a callback with many different CORBA servers. The
app then queries some info and disconnects moving on to the next
server. I appear to be continually eating sockets when I register
my callback with a new server.

Is there a way to *delete* a servant that will no longer be
used ( instead of just deactivating it ) from the POA so
that any send/receive sockets it has open will be closed?

REPEAT BY:
1. Look at the /proc/<pid>/fd count of your application
2. Create a callback via the ->_this() call on a servant derived class
3. Register that callback with a server
4. <receive a callback>
5. Deactivate the derived class via POA->deactivate_object
6. CORBA::release() the pointer returned from the ->_this() call
7. The /proc/<pid>/fd count of your application has increased by 1

SAMPLE FIX/WORKAROUND:
[If available ]


Thank you for your time,
Charles

0 new messages