[Ace-users] [tao-bugs] AMI, incorrect timeout settings?
Laurent LE GOFF
laurent.le-goff at sogeti.com
Mon Sep 3 04:30:59 CDT 2007
TAO Problem Report Form:
ACE VERSION: 5.5.10
TAO VERSION: 1.5.10
HOST MACHINE and OPERATING SYSTEM:
PC Pentium4, Redhat Entreprise Linux release 4
TARGET MACHINE and OPERATING SYSTEM, if different from HOST:
N/A
COMPILER NAME AND VERSION (AND PATCHLEVEL):
gcc3.4.6-8
THE $ACE_ROOT/ace/config.h FILE:
config-linux.h
THE $ACE_ROOT/include/makeinclude/platform_macros.GNU FILE :
platform_linux.GNU
CONTENTS OF $ACE_ROOT/bin/MakeProjectCreator/config/default.features:
N/A
AREA/CLASS/EXAMPLE AFFECTED:
[What example failed? What module failed to compile?]
N/A
DOES THE PROBLEM AFFECT:
COMPILATION?
No
LINKING?
No
EXECUTION?
yes
SYNOPSIS:
AMI call timeout set to 2seconds, during execution seems to be around 1sec
DESCRIPTION:
In my program I set a 2s delay for AMI call:
unsigned long delaiUL = delai * 1000; //delai is 20000, so I set the
delay to 2s
TimeBase::TimeT relative_rt_timeout = delaiUL;
CORBA::Any relative_rt_timeout_as_any;
relative_rt_timeout_as_any <<= relative_rt_timeout;
_orb->create_policy(Messaging::RELATIVE_RT_TIMEOUT_POLICY_TYPE,
relative_rt_timeout_as_any);
...
policy_current->set_policy_overrides(policy_list, CORBA::SET_OVERRIDE);
...
policy_manager->set_policy_overrides(policy_list, CORBA::SET_OVERRIDE);
Before my call I start a timer to verify elapsed time:
ACE_Profile_Timer profile_timer;
ACE_Profile_Timer::ACE_Elapsed_Time el;
profile_timer.start();
///
CORBA::Object_var noyauServeurObjet =
emNoyau().lirePointAcces().lireORB()->string_to_object(urlServeur.c_str());
emma_corba::Noyau_var noyauServeur =
emma_corba::Noyau::_narrow(noyauServeurObjet.in());
//
profile_timer.stop();
profile_timer.elapsed_time (el);
if ( CORBA::is_nil(noyauServeur.in()) )
{
throw ServeurInjoignable(urlServeur);
}
for each call where elapsed time id over 1s, my object noyauServeurObjet is
nil
when I set the timeout to 3s all the calls are ok (maximum delay is 1.2s)
when I set the timeout to 1s all the call under 0.4s are ok
Am I doing something wrong when I set the timeout?
(the same code is working OK under Redhat Entreprise Linux release 3 with
TAO1.4.8)
Thanks for your help
Regards
Laurent Le Goff
More information about the Ace-users
mailing list