Bug 3043 - Notify_Service start fails with __gnu_cxx::recursive_init
Summary: Notify_Service start fails with __gnu_cxx::recursive_init
Status: RESOLVED FIXED
Alias: None
Product: TAO
Classification: Unclassified
Component: Notification Service (show other bugs)
Version: 1.5.10
Hardware: SPARC Solaris
: P1 major
Assignee: Sam
URL:
Depends on: 2818 3045
Blocks:
  Show dependency tree
 
Reported: 2007-08-14 07:24 CDT by Sam
Modified: 2007-08-20 06:26 CDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sam 2007-08-14 07:24:31 CDT
While trying to simulate bug 2818, i've compiled ACE&TAO in with debug informations to be able to make a backtrace of failure point. After trying
to start this newly compiled Notify_Service, it fails with this message:

-bash-3.00# /opt/TAO/bin/Notify_Service -IORoutput /tmp/nos.ior -ORBRunThreads 10 -AllocateTaskperProxy -AsynchUpdates-ORBEndpoint iiop://1.0@belladona-2 -ORBInitRef NameService=file:///tmp/ns.ior -ORBDebugLevel 4
terminate called after throwing an instance of '__gnu_cxx::recursive_init'
  what():  N9__gnu_cxx14recursive_initE
Abort (core dumped)

Backtrace with gdb:

Starting program: /opt/TAO-1.5.10-dev/bin/Notify_Service -IORoutput /tmp/nos.ior -ORBRunThreads 10 -AllocateTaskperProxy -AsynchUpdates -ORBEndpoint iiop://1.0@belladona-2 -ORBInitRef NameService=file:///tmp/ns.ior -ORBDebugLevel 10
warning: Temporarily disabling breakpoints for unloaded shared library "/usr/lib/ld.so.1"
terminate called after throwing an instance of '__gnu_cxx::recursive_init'
  what():  N9__gnu_cxx14recursive_initE

Program received signal SIGABRT, Aborted.
0xfda40f90 in _lwp_kill () from /lib/libc.so.1
(gdb) bt
#0  0xfda40f90 in _lwp_kill () from /lib/libc.so.1
#1  0xfd9dfd80 in raise () from /lib/libc.so.1
#2  0xfd9bffa0 in abort () from /lib/libc.so.1
#3  0xfdc4cdf8 in __gnu_cxx::__verbose_terminate_handler () at ../../../../libstdc++-v3/libsupc++/vterminate.cc:97
#4  0xfdc4a930 in __cxxabiv1::__terminate (handler=0x2dc68) at ../../../../libstdc++-v3/libsupc++/eh_terminate.cc:43
#5  0xfdc4a980 in std::terminate () at ../../../../libstdc++-v3/libsupc++/eh_terminate.cc:53
#6  0xfdc4aac8 in __cxa_throw (obj=<value optimized out>, tinfo=0x0, dest=0xffffffff) at ../../../../libstdc++-v3/libsupc++/eh_throw.cc:77
#7  0xfdc4ad14 in acquire_1 (g=<value optimized out>) at ../../../../libstdc++-v3/libsupc++/guard.cc:161
#8  0xfdc4ae4c in __cxa_guard_acquire (g=0x1) at ../../../../libstdc++-v3/libsupc++/guard.cc:197
#9  0xfdecca80 in ACE::debug () at ../../ace/ACE.cpp:167
#10 0xfdf8608c in ACE_Service_Gestalt (this=0x2dbd0, size=1024, svc_repo_is_owned=false, no_static_svcs=true) at ../../ace/Service_Gestalt.cpp:249
#11 0xfdf80ed4 in ACE_Service_Config (this=0x2dbd0, ignore_static_svcs=1, size=1024, signum=1) at ../../ace/Service_Config.cpp:373
#12 0xfe059820 in ACE_Singleton (this=0x2dbc8) at ../../ace/Singleton.inl:13
#13 0xfe059884 in ACE_Unmanaged_Singleton (this=0x2dbc8) at ../../ace/Singleton.inl:18
#14 0xfe059978 in ACE_Unmanaged_Singleton<ACE_Service_Config, ACE_Recursive_Thread_Mutex>::instance () at ../../ace/Singleton.cpp:174
#15 0xfdf814e0 in ACE_Service_Config::global () at ../../ace/Service_Config.cpp:323
#16 0xff3813a4 in ACE_Service_Config::current () at ../../../TAO/../ace/Service_Config.inl:75
#17 0xff3813e0 in ACE_Service_Config::process_directive (ssd=@0xfe3cc158, force_replace=0) at ../../../TAO/../ace/Service_Config.inl:158
#18 0xfe1df998 in TAO_Codeset_Manager_Factory_Base::initialize () at ../../../TAO/tao/Codeset_Manager_Factory_Base.cpp:34
#19 0xfe287d04 in __static_initialization_and_destruction_0 (__initialize_p=1, __priority=65535) at ../../../TAO/tao/Codeset_Manager_Factory_Base.h:67
#20 0xfe287d3c in global constructors keyed to _ZN22TAO_Codeset_ParametersC2Ev () at ../../../TAO/tao/default_resource.cpp:1294
#21 0xfe290940 in __do_global_ctors_aux () at ../../../TAO/../ace/String_Base_Const.h:37
#22 0xfe1d2ecc in _init () from /opt/TAO/lib/libTAO.so.1
#23 0xff3bfeb0 in call_init () from /lib/ld.so.1
#24 0xff3cca0c in elf_bndr () from /lib/ld.so.1
#25 0xff3b390c in elf_rtbndr () from /lib/ld.so.1
#26 0xff3b390c in elf_rtbndr () from /lib/ld.so.1
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb)

ACE&TAO has been compiled with these options:

TAO_ROOT=/opt/TAO
../configure --prefix=$TAO_ROOT --disable-ace-examples --disable-ace-tests --enable-debug --disable-qos \
                --enable-ipv4-ipv6 --enable-optimize --enable-ssl --enable-acexml \
                --with-openssl-libdir=/usr/sfw/lib --with-openssl-include=/usr/sfw/include \
                --with-tao --disable-tao-examples --disable-tao-tests \
                --enable-static \
                LDFLAGS="-L/opt/devtools/lib -L/usr/local/lib -Wl,-R$(TAO_ROOT)/lib -Wl,-R/usr/local/lib" \
                CXXFLAGS="-g3 -ggdb3" \



Previously compiled TAO without CXXFLAGS containing -g3 and -ggdb3 flags started ok, but failed on other place. Other services like Naming_Service work fine.
Comment 1 Johnny Willemsen 2007-08-14 07:28:03 CDT
Can you try to build ACE/TAO with the regular way of compiling (config.h/platform_macros.GNU), the autoconf support is not tested for TAO. The fact that it compiles doesn't mean you get the same behaviour. It could for example be that "-z now" must be added to the linker flags when running on solaris
Comment 2 Johnny Willemsen 2007-08-14 07:28:38 CDT
reassign and added depends
Comment 3 Sam 2007-08-14 07:32:52 CDT
I'm already using TAO compiled via autoconf, but without CXXFLAGS='-g3 -ggdb3' and it works without problems, but ok - i can try to compile it this way.
Comment 4 Johnny Willemsen 2007-08-15 08:34:38 CDT
added depends
Comment 5 Johnny Willemsen 2007-08-20 03:48:36 CDT
changed to major
Comment 6 Sam 2007-08-20 06:26:06 CDT
I've added "-z now" argument in autoconf build and now it works ok, i think we can close this bug.

Configure used like this:

TAO_ROOT=/opt/TAO
../configure --prefix=$TAO_ROOT \
                LDFLAGS="-Wl,-z,now" \
                CXXFLAGS="-g3 -ggdb3"