Naming service resolve crashed both application and naming service on Redhat 8.0

Naming service resolve crashed both application and naming service on Redhat 8.0

Post by Anders Hybert » Sat, 07 Dec 2002 16:41:09


I have been running ACE+TAO x.2.3 on RedHat 7.3, compiled with GCC 3.0.4
without any problems.

I now want to run the same application under RedHat 8.0 compiled with GCC
3.2. The problem I will explain later is both reproducible with ACE+TAO
x.2.3 and x.2.7.

The problem is that I want to query the naming service for a unknown object.
I'm doing that with the resolve function of the naming service - but it
crashes both the application and the naming service.

The naming service is running as multicast (Naming_Service -m 1) and my
application don't specify any arguments at all and there is no service init
files floating around. Both applications is running on the same host.

The reproducible example is done in generic CORBA - using as little ACE+TAO
added features as possible - just to get the reproducible code as simple as
#define ACE_NDEBUG 1

#include <orbsvcs/CosNamingS.h>
#include <orbsvcs/CosEventChannelAdminS.h>

int main
    int     argc,
    char*   argv[]
    // Potentional initializing the ORB with command line arguments
    CORBA::ORB_var  orb = CORBA::ORB_init (argc, argv );

    // Activate the POA
    CORBA::Object_var               object      =
orb->resolve_initial_references( "RootPOA" );
    PortableServer::POA_var         poa         =
PortableServer::POA::_narrow( () );
    PortableServer::POAManager_var  poa_manager = poa->the_POAManager();


    // Resolve and narrow the NameService
    CORBA::Object_var               obj         =
orb->resolve_initial_references( "NameService" );
    CosNaming::NamingContext_var    namingContext =
CosNaming::NamingContext::_narrow( );

    // Creating a CosNaming object, and initialize with a non-existing
    // object one the naming service
    CosNaming::Name     name;

    name[0].id      = CORBA::string_dup( "unknown" );

    // Now try to resolve/find the unknown object on the naming service
    CORBA::Object_var   objNc;

        objNc = namingContext->resolve( name );     // This should throw an
exception, but
                                                    // instead it core dumps
and the naming
                                                    // service crashes as
    catch( const CosNaming::NamingContext::NotFound& e )
        // Should be called if object don't exists
        std::cout << "Object not found on naming service" << std::endl;

        return 1;
        // Something else happend
        std::cout << "Something happend - but it was not good" << std::endl;

        return 2;

    std::cout << "Object was found on the naming service" << std::endl;

    return 0;


Compiled with the following line:


The definition of namingContext->resolve should throw an NotFound exception,
but don't
any ideas of what I'm doing wrong......

Best regards


PS: The stack trace of the core dump from my application is

(gdb) where
#0  0x42028cc1 in kill () from /lib/i686/
#1  0x42028ac8 in raise () from /lib/i686/
#2  0x4202a019 in abort () from /lib/i686/
#3  0x40737fb7 in __cxxabiv1::__terminate(void (*)()) (handler=0x42029e80
<abort>) at ../../../../libstdc++-v3/libsupc++/
#4  0x40738004 in std::terminate() () at
#5  0x40738176 in __cxa_throw () at
#6  0x405bd582 in
TAO_ORB_Core::service_raise_comm_failure(TAO_GIOP_Invocation*, TAO_Profile*)
(this=0x0, invoke=0x6, profile=0x8085980)
    at ORB_Core.cpp:1358
#7  0x4059e9f5 in TAO_GIOP_Synch_Invocation::invoke_i(unsigned char)
(this=0xbfffe970, is_locate_request=0 '\0') at Invocation.cpp:712
#8  0x4059ee6f in TAO_GIOP_Twoway_Invocation::invoke(TAO_Exception_Data*,
unsigned) (this=0xbfffe970, excepts=0x40241bb8, except_count=3)
    at Invocation.cpp:877
#9  0x402175b8 in
CosNaming::Name const&) (this=0x4025a6f0,
    _collocated_tao_target_=0x8098280, n=@0xbfffef70) at CosNamingC.cpp:3157
#10 0x4021c8d9 in CosNaming::NamingContext::resolve(CosNaming::Name const&)
(this=0x8098280, n=@0xbfffef70) at CosNamingC.cpp:5724
#11 0x0804918f in main ()
#12 0x420158d4 in __libc_start_main () from /lib/i686/

The Naming Service stack trace in the core dump is

(gdb) where
#0  0x42028cc1 in kill () from /lib/i686/
#1  0x4065c07d in raise () from /lib/i686/
#2  0x4202a019 in abort () from /lib/i686/
#3  0x4071efb7 in __cxxabiv1::__terminate(void (*)()) (handler=0x42029e80
<abort>) at ../../../../libstdc++-v3/libsupc++/
#4  0x4071f004 in std::terminate() () at
#5  0x4071f176 in __cxa_throw () at
#6  0x40063436 in TAO_Hash_Naming_Context::resolve(CosNaming::Name const&)
(this=0x40662e20, n=@0xbfffe280)
    at Naming/Hash_Naming_Context.cpp:370
#7  0x4005f7d8 in TAO_Naming_Context::resolve(CosNaming::Name const&)
(this=0x0, n=@0xbfffe280) at Naming/Naming_Context_Interface.cpp:92
#8  0x4008098d in
POA_CosNaming::NamingContext::resolve_skel(TAO_ServerRequest&, void*, void*)
    _tao_servant=0x8087e70, _tao_servant_upcall=0xbfffe3d0) at
#9  0x4008e744 in
POA_CosNaming::NamingContextExt::resolve_skel(TAO_ServerRequest&, void*,
void*) (req=@0xbfffe6c0, obj=0x40662b44,
    context=0xbfffe3d0) at CosNamingS.i:110
#10 0x401e99bc in
TAO_ServantBase::synchronous_upcall_dispatch(TAO_ServerRequest&, void*,
void*) (this=0x1, req=@0xbfffe6c0,
    servant_upcall=0xbfffe3d0, derived_this=0x8087e70) at
#11 0x401ea440 in virtual thunk to
TAO_ServantBase::synchronous_upcall_dispatch(TAO_ServerRequest&, void*,
void*) () at Servant_Base.h:37
#12 0x40088e4b in
POA_CosNaming::NamingContextExt::_dispatch(TAO_ServerRequest&, void*)
(this=0x40662b44, req=@0xbfffe6c0,
    servant_upcall=0xbfffe3d0) at CosNamingS.cpp:7238
#13 0x4008e5cf in virtual thunk to
POA_CosNaming::NamingContextExt::_dispatch(TAO_ServerRequest&, void*) () at
#14 0x401cf101 in TAO_Object_Adapter::dispatch_servant(TAO_ObjectKey const&,
TAO_ServerRequest&, CORBA_Object_out) (this=0x400b1e34,
    key=@0xbfffe72c, req=@0xbfffe6c0, forward_to={ptr_ = @0x400606a0}) at
#15 0x401d0062 in TAO_Object_Adapter::dispatch(TAO_ObjectKey&,
TAO_ServerRequest&, CORBA_Object_out) (this=0x8071510, key=@0xbfffe72c,
    request=@0xbfffe6c0, forward_to={ptr_ = @0xbfffe690}) at
#16 0x4040ed37 in TAO_Adapter_Registry::dispatch(TAO_ObjectKey&,
TAO_ServerRequest&, CORBA_Object_out) (this=0x805fc28, key=@0xbfffe72c,
    request=@0xbfffe6c0, forward_to={ptr_ = @0xbfffe690}) at
#17 0x40427ff6 in TAO_Request_Dispatcher::dispatch(TAO_ORB_Core*,
TAO_ServerRequest&, CORBA_Object_out) (this=0x8064488,
    orb_core=0x805fad0, request=@0xbfffe6c0, forward_to={ptr_ =
@0x400606a0}) at ORB_Core.i:170
#18 0x40430ab6 in TAO_GIOP_Message_Base::process_request(TAO_Transport*,
TAO_InputCDR&, TAO_OutputCDR&, TAO_GIOP_Message_Generator_Parser*)
    (this=0x80740e0, transport=0x80a8740, cdr=@0xbfffe820,
output=@0xbfffe860, parser=0xbfffe680) at ORB_Core.i:176
#19 0x404305fb in
TAO_Queued_Data*) (this=0x80740e0, transport=0x80a8740,
    qd=0xbfffebc0) at GIOP_Message_Base.cpp:682
#20 0x4034f41d in TAO_Transport::process_parsed_messages(TAO_Queued_Data*,
TAO_Resume_Handle&) (this=0x80a8740, qd=0xbfffebc0,
    rh=@0x40662b44) at Transport.cpp:1935
#21 0x4034dffc in TAO_Transport::handle_input_i(TAO_Resume_Handle&,
ACE_Time_Value*, int) (this=0x80a8740, rh=@0xbffff0a0,
    max_wait_time=0x0) at Transport.cpp:1419
#22 0x403553d1 in TAO_Connection_Handler::handle_input_eh(int,
ACE_Event_Handler*) (this=0x80a8678, h=10, eh=0x80a8618)
    at /usr/local/mamp/tools/ACE_wrappers/TAO/tao/Connection_Handler.inl:19
#23 0x4036737b in TAO_IIOP_Connection_Handler::handle_input(int)
(this=0x400b1e34, h=10) at IIOP_Connection_Handler.cpp:207
#24 0x40596eda in
(this=0x806fc40, dispatch_info=@0xbffff150)
    at TP_Reactor.cpp:789
#25 0x405965c0 in ACE_TP_Reactor::handle_socket_events(int&,
ACE_TP_Token_Guard&) (this=0x806fc40, event_count=@0xbffff1b4,
    guard=@0xbffff230) at TP_Reactor.cpp:562
#26 0x40596181 in ACE_TP_Reactor::dispatch_i(ACE_Time_Value*,
ACE_TP_Token_Guard&) (this=0x806fc40, max_wait_time=0x0, guard=@0xbffff230)
    at TP_Reactor.cpp:389
#27 0x40595a23 in ACE_TP_Reactor::handle_events(ACE_Time_Value*)
(this=0x806fc40, max_wait_time=0x0) at TP_Reactor.cpp:173
#28 0x40592ec5 in ACE_Reactor::handle_events(ACE_Time_Value*)
(this=0x40662b44, max_wait_time=0x0)
    at /usr/local/mamp/tools/ACE_wrappers/ace/Reactor.i:172
#29 0x403e2fb9 in TAO_ORB_Core::run(ACE_Time_Value*, int) (this=0x805fad0,
tv=0x0, perform_work=0) at ORB_Core.cpp:1731
#30 0x40395f7c in CORBA_ORB::run() (this=0x400b1e34) at
#31 0x080495a5 in TAO_Naming_Service::run() (this=0xbffff390) at
#32 0x08049961 in main (argc=3, argv=0xbffff444) at Naming_Server.cpp:20
#33 0x420158d4 in __libc_start_main () from /lib/i686/


1. how to get jac orb to resolve TAOs naming service?

Hi there,

this is probably no bug so i dont think it will be necessary to use
the prf.
I tried to resolve TAOs naming service from JacOrb 1.4.1 TAO versions
5.3 and 5.3.1.

here is what i tried (btw OCIweb's faq tell me to do exactly this as
well as any other faq or TAO dveloppers guide or Jacorb help)

start naming service:

Naming_Service -ORBEndpoint iiop://localhost:13013 -m 0 (i tried many
other ports in different ranges to make sure that's not the problem!)

Starting the (c++ TAO) server works great!

now starting the java client with the options:

-ORBInitRef NameService=iiop://oww30329:13013/NameService

-ORBInitRef NameService=corbaloc:iiop://oww30329:13013/NameService (i
know it's deprecated by now but why not try it?!?)

-ORBInitRef NameService=iioploc://oww30329:13013/NameService

and some other i don't even remind any more and probably are not
relevant either.

The error message is allways the same:
org.omg.CORBA.COMM_FAILURE minor_code 201

meaning "connection failure"

how do i have to set up the naming service , (TAO) server and

thanks for youre help!


2. HP6020i or Yamaha CDR?

3. querying name bindings registered in the Tao Name Service

4. A question about printer in Win2KPro

5. Naming Service: Binding compound names using a DLL_ORB

6. All win95 programmers: AN IDEA

7. about naming service and scheduling service on dialup ppp network

8. Install won't resume after reboot

9. Name Service resolution: NotifyEventChannelFactory resolution fails though service is running

10. Name Service & Event Service Configuration

11. Runing Naming service and ImpRepo service as persistent