Bug 2170

Summary: Bug_1551_Regression fails
Product: TAO Reporter: Johnny Willemsen <jwillemsen>
Component: AMIAssignee: Johnny Willemsen <jwillemsen>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P3    
Version: 1.5.2   
Hardware: All   
OS: All   
Bug Depends on: 2503    
Bug Blocks:    

Description Johnny Willemsen 2005-06-27 03:15:55 CDT
The Bug_1551_Regression test fails. Probably this can be fixed by changing the
static initializers for the messaging back to the state where the static object
register the orbinitializer but this looks like hiding the real problem. I will
investigate this soon, making this bugzilla bug as a place holder.
Comment 1 Johnny Willemsen 2005-06-28 13:16:44 CDT
I will look at this
Comment 2 Johnny Willemsen 2005-06-28 13:16:52 CDT
accept
Comment 3 Johnny Willemsen 2006-06-08 11:45:44 CDT
Did some more testing, this has nothing todo with the static initializer but
with collocation and AMI. Locally I had patched PortableServer/get_arg to use a
dynamic_cast to check whether it should use the operation details or the server
args. With this change the excep method was called with a 0 exception holder. I
did handcraft the TestS.cpp file to not pass the skel_args and used the code
below in get_arg.h for the in argument, then the argument was taken from the
operation details and the test worked perfect. This is another tricky example of
the check whether the skel args or operation details should be used to get the
real argument value.

      typename TAO::SArg_Traits<T>::in_arg_val *val = 0;
      if (skel_args){
        val = dynamic_cast <typename TAO::SArg_Traits<T>::in_arg_val *>
(skel_args[i]);
        }
      if (val != 0)
        return val->arg ();
      else
      return
        (details != 0 && details->args () != 0)
        ? static_cast<typename TAO::Arg_Traits<T>::in_arg_val *> (
            details->args ()[i])->arg ()
        : static_cast<typename TAO::SArg_Traits<T>::in_arg_val *> (
            skel_args[i])->arg ();

The callstack when crashing

00409F7C POA_Test::short_sleep_excep_AMI_HelloHandler::execute(this=:013AF3C4)
0079A4D0 TAO::Upcall_Wrapper::upcall(this=:013AF38C, server_request=:013AF65C,
args=:013AF398, nargs=2, command=:013AF3C4, servant_upcall=:013AF4C8,
exceptions=NULL, nexceptions=0)
0040885E
POA_Test::AMI_HelloHandler::short_sleep_excep_skel(server_request=:013AF65C,
servant_upcall=:013AF4C8, servant=:00DCCB30)
00791998 TAO_ServantBase::synchronous_upcall_dispatch(this=:00DCCB74,
req=:013AF65C, servant_upcall=:013AF4C8, derived_this=:00DCCB30)
00409325 POA_Test::AMI_HelloHandler::_dispatch(this=:00DCCB30, req=:013AF65C,
servant_upcall=:013AF4C8)
007694E8 TAO_Object_Adapter::do_dispatch(this=:00DBE228, req=:013AF65C,
upcall=:013AF4C8)
007672C9 TAO_Object_Adapter::dispatch_servant(this=:00DBE228, key=:013AF6DC,
req=:013AF65C, forward_to={ :013AF7C0 })
0076837A TAO_Object_Adapter::dispatch(this=:00DBE228, key=:013AF6DC,
request=:013AF65C, forward_to={ :013AF7C0 })
00573EAB TAO_Adapter_Registry::dispatch(this=:00D9F1A4, key=:013AF6DC,
request=:013AF65C, forward_to={  })
005F5773 TAO_Request_Dispatcher::dispatch(this=:00DA50EC, orb_core=:00D9EF7C,
request=:013AF65C, forward_to={  })
0057B422 TAO::Collocated_Invocation::invoke(this=:013AF7AC, cpb=:0000DEAD,
strat=1 /* tao::tao_cs_thru_poa_strategy */)
005BEAEF TAO::Invocation_Adapter::invoke_collocated_i(this=:013AF930,
stub=:00DAD0D0, details=:013AF898, effective_target=:013AF84C, strat=1 /*
tao::tao_cs_thru_poa_strategy */)
005BE8FA TAO::Invocation_Adapter::invoke_i(this=:013AF930, stub=:00DAD0D0,
details=:013AF898)
005BE774 TAO::Invocation_Adapter::invoke(this=:013AF930, ex_data=NULL, ex_count=0)
00405820 Test::AMI_HelloHandler::short_sleep_excep(this=:00DA9E2C,
excep_holder=:00DA9E9C)
00405556 Test::AMI_HelloHandler::short_sleep_reply_stub(_tao_in=:013AFA28,
_tao_reply_handler=:00DAD1C8, reply_status=3)
007E5C39 TAO_Asynch_Reply_Dispatcher::connection_closed(this=:00DD594C)
005CE875 TAO_Muxed_TMS::clear_cache(this=:00DD1C68)
005CE749 TAO_Muxed_TMS::connection_closed(this=:00DD1C68)
0060FEF9 TAO_Transport::send_connection_closed_notifications(this=:00DD1B94)
0057CB2E TAO_Connection_Handler::close_connection_eh(this=:00DD1B08, eh=:00DD1A9C)
005AFD16 TAO_IIOP_Connection_Handler::close_connection(this=:00DD1A9C)
0057C750 TAO_Connection_Handler::handle_input_eh(this=:00DD1B08, h=:000006B8,
eh=:00DD1A9C)
005AFD35 TAO_IIOP_Connection_Handler::handle_input(this=:00DD1A9C, h=:000006B8)
004CB4B9 ACE_TP_Reactor::dispatch_socket_event(this=:00DAE150,
dispatch_info=:013AFC74)

The execute method was changed by hand to, so no sargs are passed

    virtual void execute (ACE_ENV_SINGLE_ARG_DECL)
    {
      TAO::SArg_Traits< ::Messaging::ExceptionHolder>::in_arg_type arg_1 =
        TAO::Portable_Server::get_in_arg< ::Messaging::ExceptionHolder> (
          this->operation_details_,
          0,
          1);
        
      this->servant_->short_sleep_excep (
        arg_1
        ACE_ENV_ARG_PARAMETER);
      ACE_CHECK;
    }
Comment 4 Johnny Willemsen 2006-06-08 11:47:03 CDT
problems is not related to windows
Comment 5 Johnny Willemsen 2006-08-09 08:41:31 CDT
This is really an AMI problem
Comment 6 Johnny Willemsen 2007-01-12 03:26:42 CST
fixed