Bug 2319 - Crash in asynchronous server request processing if server and client are collocated
Summary: Crash in asynchronous server request processing if server and client are coll...
Status: ASSIGNED
Alias: None
Product: TAO
Classification: Unclassified
Component: AMH (show other bugs)
Version: 1.5.10
Hardware: SPARC Solaris
: P3 normal
Assignee: DOC Center Support List (internal)
URL:
Depends on: 1986
Blocks:
  Show dependency tree
 
Reported: 2005-11-28 06:29 CST by im-scooter
Modified: 2007-08-27 08:30 CDT (History)
0 users

See Also:


Attachments
AMH_Crash.tar.gz test source code (5.58 KB, application/octet-stream)
2006-02-03 08:18 CST, im-scooter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description im-scooter 2005-11-28 06:29:13 CST
Asynchronous request handler AMH_<some interface>::<some method>_skel use 
TAO_Server_Request.incoming_ field to get a data of the request. But if client 
and server are collocated this field have a NULL value that cause crash. I 
suppose it may be a bug of TAO_IDL\be\be_visitor_operation/amh_ss.cpp.
Comment 1 Johnny Willemsen 2006-02-02 08:04:09 CST
can you provide a test program to reproduce this bug?
Comment 2 im-scooter 2006-02-03 08:18:18 CST
Created attachment 464 [details]
AMH_Crash.tar.gz test source code
Comment 3 im-scooter 2006-02-03 08:22:20 CST
1) Decompress the attachment info $(TAO_ROOT)/tests directory
2) run 'make' command
3) run 'server' binary

This test is modified AMH_Oneway test in $(TAO_ROOT)/tests drirectory.
Comment 4 Johnny Willemsen 2006-02-03 08:30:02 CST
thanks for the test, I will integrate in cvs after x.4.9 is out, no idea when
someone gets time to fix this, if you need a fix soon, contact commercial support
Comment 5 Johnny Willemsen 2006-02-03 08:30:22 CST
accept, test program crashes
Comment 6 Johnny Willemsen 2006-02-03 08:32:03 CST
Callstack in the crash:

0047208F ACE_Message_Block::base(this=NULL)
004720D7 ACE_Message_Block::rd_ptr(this=NULL)
0043F073 ACE_InputCDR::rd_ptr(this=NULL)
0043F094 ACE_InputCDR::adjust(this=NULL, size=8, align=8, buf=:0149F76C)
0043F0F8 ACE_InputCDR::adjust(this=NULL, size=8, buf=:0149F76C)
00441A4E ACE_InputCDR::read_8(this=NULL, x=:0149F7CC)
0043EBBE ACE_InputCDR::read_ulonglong(this=NULL, x=:0149F7CC)
0043F45E operator >>(is=NULL, x=:0149F7CC)
005771B2 operator >>(is=NULL, x=:0149F7CC)
004052E5
POA_Test::AMH_Roundtrip::test_method_skel(_tao_server_request=:0149FAAC, 
=:0149F910, _tao_servant=:0012FE88)
00785264 TAO_ServantBase::asynchronous_upcall_dispatch(this=:0012FE74,
req=:0149FAAC, servant_upcall=:0149F910, derived_this=:0012FE88)
004068B0 POA_Test::AMH_Roundtrip::_dispatch(this=:0012FE88, req=:0149FAAC,
context=:0149F910)
00759910 TAO_Object_Adapter::do_dispatch(this=:00DAECB4, req=:0149FAAC,
upcall=:0149F910)
00757673 TAO_Object_Adapter::dispatch_servant(this=:00DAECB4, key=:0149FB34,
req=:0149FAAC, forward_to={ :0149FC1C })
0075874A TAO_Object_Adapter::dispatch(this=:00DAECB4, key=:0149FB34,
request=:0149FAAC, forward_to={ :0149FC1C })
0057410F TAO_Adapter_Registry::dispatch(this=:00D8B66C, key=:0149FB34,
request=:0149FAAC, forward_to={  })
005EA20F TAO_Request_Dispatcher::dispatch(this=:00D915CC, orb_core=:00D8B454,
request=:0149FAAC, forward_to={  })
0057AAFE TAO::Collocated_Invocation::invoke(this=:0149FC08, cpb=:0000DEAD,
strat=1 /* tao::tao_cs_thru_poa_strategy */)
005BCF5F TAO::Invocation_Adapter::invoke_collocated_i(this=:0149FD94,
stub=:00DADAF0, details=:0149FCF4, effective_target=:0149FCA8, strat=1 /*
tao::tao_cs_thru_poa_strategy */)
005BCD6A TAO::Invocation_Adapter::invoke_i(this=:0149FD94, stub=:00DADAF0,
details=:0149FCF4)
005BCBE1 TAO::Invocation_Adapter::invoke(this=:0149FD94, ex_data=NULL, ex_count=0)
00403102 Test::Roundtrip::test_method(this=:00DBFE10, send_time=10)
00401200 start_client(_arg=:00DBFE10)
Comment 7 Johnny Willemsen 2006-02-07 08:32:27 CST
for amh it seems we should use TAO::Upcall_Wrapper::upcall more, in the
POA_Test::AMH_Roundtrip::test_method_skel method things crash because we don't
check for the collocated case. What we can use is:

  if (_tao_server_request.incoming ())
    {

this means we have a input cdr so can unmarshal things. If this is zero, we have
a collocated call we need an upcall command that takes the arguments from the
operation details of the tao-server-request and then invokes things. Seems a
change to the IDL compiler to generate an special upcall command and some
changes to the current generated AMH_ method.
Comment 8 Johnny Willemsen 2006-02-10 05:06:31 CST
regression is in cvs
Comment 9 Johnny Willemsen 2006-02-27 04:37:43 CST
updated version
Comment 10 Johnny Willemsen 2006-08-09 08:19:55 CDT
still valid for 1.5.2
Comment 11 Johnny Willemsen 2006-08-14 04:06:27 CDT
Changed component to AMH
Comment 12 Johnny Willemsen 2007-04-17 08:49:06 CDT
updated version, still valid
Comment 13 Johnny Willemsen 2007-04-20 09:07:31 CDT
needs work in the idl compiler and core libraries, several days of work to get this fixed
Comment 14 Johnny Willemsen 2007-08-27 08:30:37 CDT
still failing with x.5.10