[tao-users] TAO : rtorb private connection policy

LAURENT Julien julien.laurent at fr.thalesgroup.com
Tue Jun 6 09:46:09 CDT 2017


Hello,

I have trouble with using a private connection policy as described below.

   TAO VERSION: 2.4.3
    ACE VERSION: 6.4.3

    HOST MACHINE and OPERATING SYSTEM:
        Linux, Redhat 5

    TARGET MACHINE and OPERATING SYSTEM, if different from HOST:
        Linux, Elinos 5.2, gcc 4.4.5 (cross compilation)

    THE $ACE_ROOT/ace/config.h FILE [if you use a link to a platform-
    specific file, simply state which one]: 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++)]:
optimize=1
debug=0
inline=1

platform_has_quixtream=1
ssl=0
cidl=0
exceptions=1
shared_libs_only=1
rt_corba=1
smart_proxies=1
interface_repo=1
interceptors=1
threads=1
prism=1
stdcpplib=1
no_hidden_visibility=1

include $(ACE_ROOT)/include/makeinclude/platform_linux.GNU

TAO_ORBSVCS := NamingService

ifneq ($(ELINOS_BIN_PREFIX),)
ifneq ($(HOST_TAO_ROOT),)
  TAO_IDL := $(HOST_TAO_ROOT)/TAO_IDL/tao_idl
  TAO_IDLFLAGS += -g $(HOST_TAO_ROOT)/bin/gperf
  TAO_IDL_DEP := $(HOST_TAO_ROOT)/TAO_IDL/tao_idl$(EXEEXT)
endif
endif

    AREA/CLASS/EXAMPLE AFFECTED:


    DOES THE PROBLEM AFFECT:
        COMPILATION? NO
        LINKING? NO
        EXECUTION? YSE
        OTHER (please specify)?
[Please indicate whether ACE/TAO, your application, or both are affected.]

    SYNOPSIS:
The private connection policy does not seem to change the threading of a corba two-ways operation.

    DESCRIPTION:
Our server side application is configured to use the default rtorb policy (reactor per lane policy with a pool of thread).
I tried to configure the client side with a private connection policy.
When we analyse the threading of an operation with return (call to "bool isStarted" from the client side to the server side) I have the following scheduling:

1)  The operation call on the client side is done inside the client thread, we do not see any interaction with the orb thread => OK

2)  The server receives and executes the operation in the thread created during the configuration of the POA (thread pool with one thread) => OK

3)  The return operation involves two threads : the orb thread and the client thread => NOK => I expect the return operation to involve only the client thread with a private connection configuration

[cid:image001.png at 01D2DEE4.666C9EB0]

    REPEAT BY:
My program has a client side which calls periodicaly "bool isStarted" on the server side. The client and the server are runned on two different processus on the same core.
I analyse the threading with LTTNG (profiler) by adding "open" instruction before and after the call on the client side, and during the execution of the operation on the server side. (the open allows me to easily filter the system events).
I do not understand why the return operation involves the orb thread!
With or without the private connection configuration does not change the execution.

Here is my code for configuring the private connection:
        CORBA::ORB_var the_orb = ORBHelperClient::instance().getORB();
        CORBA::Object_var  rt_poa_obj = the_orb->resolve_initial_references("RTORB");
        RTCORBA::RTORB_var w_rtorb = RTCORBA::RTORB::_narrow(rt_poa_obj.in());

        if (CORBA::is_nil(w_rtorb.in()))
        {
               printf("Lwccm_FragmentRuntime : Can't manage to find RTORB \n");
               return -1;
        }

        //Try to get a private connection
        CORBA::PolicyList w_policies (1); w_policies.length(1);

        w_policies[0] = w_rtorb->create_private_connection_policy();

        CORBA::Object_ptr w_facetWithPrivateConnection = facet->_set_policy_overrides(w_policies, CORBA::SET_OVERRIDE);

        CORBA::PolicyList_var w_inconsistent_policies;
        CORBA::Boolean w_success = w_facetWithPrivateConnection->_validate_connection(w_inconsistent_policies);
        if(! w_success)
        {
               printf("Lwccm_FragmentRuntime : Can't validate private connection \n");
        }
        else
        {
               printf("Lwccm_FragmentRuntime : PRIVATE CONNECTION !!! \n");
        }

        //END
    IModing_ptr required_corba_facet = IModing::_narrow(w_facetWithPrivateConnection);

        //THEN USE of required_corba_facet to call isStarted. This configuration is done in the main thread while the call is done in an another thread configured in SCHED_FIFO.

    SAMPLE FIX/WORKAROUND:
No idea I try to understand what I should get.


Best wishes
Julien Laurent
Real time software architecture for Thales France

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.isis.vanderbilt.edu/pipermail/tao-users/attachments/20170606/b8c2d315/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 56646 bytes
Desc: image001.png
URL: <http://list.isis.vanderbilt.edu/pipermail/tao-users/attachments/20170606/b8c2d315/attachment-0001.png>


More information about the tao-users mailing list